Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5
qwen3.5
decision-model
structured-prediction
text-classification
conversational
Instructions to use PelaAI/KnowLine-0.8B-Gen1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PelaAI/KnowLine-0.8B-Gen1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PelaAI/KnowLine-0.8B-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-0.8B-Gen1") model = AutoModelForMultimodalLM.from_pretrained("PelaAI/KnowLine-0.8B-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-0.8B-Gen1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PelaAI/KnowLine-0.8B-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-0.8B-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-0.8B-Gen1
- SGLang
How to use PelaAI/KnowLine-0.8B-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-0.8B-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-0.8B-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-0.8B-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-0.8B-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-0.8B-Gen1 with Docker Model Runner:
docker model run hf.co/PelaAI/KnowLine-0.8B-Gen1
Download SHA256SUMS from PelaAI/KnowLine-0.8B-Gen1: direct link, hf CLI and curl.
- Browser
- Download file 1.85 kB
-
https://huggingface.co/PelaAI/KnowLine-0.8B-Gen1/resolve/main/SHA256SUMS
- Command line
-
hf download hf://PelaAI/KnowLine-0.8B-Gen1/SHA256SUMS
-
curl -L -o SHA256SUMS https://huggingface.co/PelaAI/KnowLine-0.8B-Gen1/resolve/main/SHA256SUMS
1.85 kB
| 89476b263b822be269c466ca087858cfd982722a4e53d610ba0f0d599156b765 CALIBRATION.json | |
| c9acc2f4c82283356fa46dea2db9f08d325fe81409c233de4e6a78ab42a43fe9 INFERENCE.md | |
| 50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32 LICENSE | |
| 102ba2f51f5d72be619667e27a757f8662629c0f1acdab248f2defbcbc1160b8 README.md | |
| 5aed493d57b749b6c4c7b5a5b07ffd0ff906749f1dea1df23c7391fd4e884bab README.zh.md | |
| 273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja | |
| b90b86f35c8e6925ef74ee04d0e758f0a845c83a42089ad82bbaa948de9b4204 config.json | |
| 2d4464e2ead06bc9bc718c781309ad1e7baded626d66e8dcdc8b469ba185faf0 configuration.json | |
| 367189cc68bb7e75ffaeba2fc31744d32ae3b76f1c5a37b0bbf72950d8ec755b knowline_engine.py | |
| 2e839fa24f1ad9c980898b2a9aa62e2154ba3f57618bd5f2fedb5756f61f062f knowline_layout.py | |
| 982f58d9b1812772d03a899d9216b248a52d360ff54970c3d88dbe9cbbf3a5eb knowline_server.py | |
| a9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d merges.txt | |
| b3d623fe186d4a1af87373d133751de382e05a4a7ec5f232e7e0cee81d892f4b model-extra-from-base.safetensors | |
| 433818210672e99e186f2f874a19568f4337a8714aeafd6b5c86a3ed83b3be0f model.safetensors | |
| 1af6724fc50cbfd14aa0da571a40c38b1eaf215ab2fa862a909b1851ac7dea31 model.safetensors.index.json | |
| 27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516 preprocessor_config.json | |
| 79c4568a3f7ae97fb64ff949aa478ade36ca68c4beacf4bcc3056f38aa696fe4 serve_knowline.sh | |
| aef62724291c261df3b42c6f51d22b11abe6515bd87adf077d55a042d5fb0283 temperatures.json | |
| 5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42 tokenizer.json | |
| 49e2b6e395f959f077f1e992b338919c0d4a9732fc6e613995e06557f843500c tokenizer_config.json | |
| 7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13 video_preprocessor_config.json | |
| ce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003 vocab.json | |