Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5
qwen3.5
decision-model
structured-prediction
text-classification
conversational
Instructions to use PelaAI/KnowLine-9B-Gen1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PelaAI/KnowLine-9B-Gen1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PelaAI/KnowLine-9B-Gen1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("PelaAI/KnowLine-9B-Gen1") model = AutoModelForMultimodalLM.from_pretrained("PelaAI/KnowLine-9B-Gen1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PelaAI/KnowLine-9B-Gen1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PelaAI/KnowLine-9B-Gen1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PelaAI/KnowLine-9B-Gen1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/PelaAI/KnowLine-9B-Gen1
- SGLang
How to use PelaAI/KnowLine-9B-Gen1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "PelaAI/KnowLine-9B-Gen1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PelaAI/KnowLine-9B-Gen1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "PelaAI/KnowLine-9B-Gen1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PelaAI/KnowLine-9B-Gen1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use PelaAI/KnowLine-9B-Gen1 with Docker Model Runner:
docker model run hf.co/PelaAI/KnowLine-9B-Gen1
File size: 2,241 Bytes
f214278 d8f7d9a a421fc4 d8f7d9a a421fc4 4083a79 f214278 d8f7d9a f214278 d8f7d9a f214278 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 93691240311786c93e1c21b53dfb9d52743cf02958709c1048fab77760aacb73 CALIBRATION.json
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 FIXED
39880bb24c44aea652a15eb8d1908f5ee85f0ad303a7513382382aaf5f9c9a37 INFERENCE.md
50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32 LICENSE
ab25a1399625bdaa46d8cd31bf805f4a56e7a3254af7ef1f1e94a02bcf6a1a1c README.md
b5bd4c94126b15f6c158c75909b0361f8019e05c7d7e6c76a8d81d8b64933615 README.zh.md
a210ce25dadbcc9a920e486c832f78c27f9ab6102a89010be4f657ec18679a48 TRAINING_SOURCES.json
a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja
d0883072e01861ed0b2d47be3c16c36a8e81c224c7ffaa310c6558fb3f932b05 config.json
2d4464e2ead06bc9bc718c781309ad1e7baded626d66e8dcdc8b469ba185faf0 configuration.json
4f05e06b6021e6b0b5f00d4c6bc2f98a3a824c9a254ec901ba42c9070ac50ac9 knowline_engine.py
2e839fa24f1ad9c980898b2a9aa62e2154ba3f57618bd5f2fedb5756f61f062f knowline_layout.py
13ca50c4001fac0aa3899a35ff01e60f311132c571b17a8c3dc7aa6001ad2f3f knowline_server.py
a9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d merges.txt
fe50afcf194c87e6faaf5c89ef74caf4f9e635f70ca8a5e8b14231383415d13d model-00001-of-00004.safetensors
4981e1d31be80bb4bacfaa57b0ad9c3370ce170eee5f71451229017b5a52a2f7 model-00002-of-00004.safetensors
f901558f89699dc6d96343ba9cdb29c916d0db1377c4ecfa546f2d280cc5373a model-00003-of-00004.safetensors
1740ac4322df8d622829c34cb92ac2619d5ec2ae2f703e7f8c6dcaf0567cf882 model-00004-of-00004.safetensors
c41ed69b9d21f0772737d4fb74bf48283a473ec34fb5df07afb487f35d67c28f model-extra-from-base.safetensors
efee6aea7d27319549e35f3bf76600eeb1313fa6bedf353d810e053bbdff8a81 model.safetensors.index.json
27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516 preprocessor_config.json
401aa4b029b48967633807a577767448ac937c3c35d43b598d6c042982ba70b4 serve_knowline.sh
5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42 tokenizer.json
316230d6a809701f4db5ea8f8fc862bc3a6f3229c937c174e674ff3ca0a64ac8 tokenizer_config.json
7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13 video_preprocessor_config.json
ce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003 vocab.json
|