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 README.md from PelaAI/KnowLine-0.8B-Gen1: direct link, hf CLI and curl.
- Browser
- Download file 8.5 kB
-
https://huggingface.co/PelaAI/KnowLine-0.8B-Gen1/resolve/main/README.md
- Command line
-
hf download hf://PelaAI/KnowLine-0.8B-Gen1/README.md
-
curl -L -o README.md https://huggingface.co/PelaAI/KnowLine-0.8B-Gen1/resolve/main/README.md
8.5 kB
| license: apache-2.0 | |
| library_name: transformers | |
| base_model: Qwen/Qwen3.5-0.8B | |
| base_model_relation: finetune | |
| pipeline_tag: image-text-to-text | |
| language: | |
| - en | |
| - zh | |
| tags: | |
| - qwen3.5 | |
| - decision-model | |
| - structured-prediction | |
| - text-classification | |
| - image-text-to-text | |
| # KnowLine-0.8B-Gen1 | |
| [Inference notes](INFERENCE.md) · [中文](README.zh.md) · weights Apache-2.0 · released together with [KnowLine-2B-Gen1](https://huggingface.co/PelaAI/KnowLine-2B-Gen1) · also: [KnowLine-9B-Gen1](https://huggingface.co/PelaAI/KnowLine-9B-Gen1), [KnowLine-4B-Gen5.5](https://huggingface.co/PelaAI/KnowLine-4B-Gen5.5) | |
| KnowLine-0.8B-Gen1 is a 0.8B decision model based on Qwen3.5-0.8B. It maps a structured state and one or more typed | |
| questions to probabilities over the supplied options: choice, yes/no and ordered score questions. It reads the probability | |
| of each option label directly and does not generate free-form text when it answers. KnowLine is developed by PelaAI. | |
| Highlights: | |
| - **Decision Index 0.3 public suite: 44.51** (self-run, fresh full run with the files in this repository, read twice; | |
| 140,178 of 140,178 scoreable requests answered, no errors). The board's full score comes from the maintainers' private | |
| run and is not yet available for this model. | |
| - **Small and fast:** one request at a time on one H20, 24.6 ms median and 39.6 ms mean. | |
| - **Other public benchmarks:** C-Eval 56.3, JevBench / JevBench-hard 71.9 / 49.5; see [Evaluation](#evaluation). | |
| - **Calibrated probabilities:** a readout temperature T = 1.54, fitted on held-out data, is folded into the weights. | |
| Computed with the board's method on the public suite, ECE is 0.008-0.012. | |
| - **S1MB (English v1, local run):** Task Avg 34.17 over 137 benchmarks (26,269 decisions, none failed or abstained). | |
| ## What it does | |
| - choice questions with named options; | |
| - yes/no questions; | |
| - ordered score questions; | |
| - a readout temperature folded into the language-model norm, so the front end reads at temperature 1; | |
| - read twice for short text-only requests (up to 3,000 tokens read once). | |
| ## Quickstart | |
| Install PyTorch with CUDA, `transformers` and SGLang 0.5.21, then start the included front end: | |
| ```bash | |
| bash serve_knowline.sh /path/to/KnowLine-0.8B-Gen1 0 8080 | |
| ``` | |
| The front end serves `/v1/systemone`: | |
| ```bash | |
| curl -s http://127.0.0.1:8080/v1/systemone \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "model": "m", | |
| "state": "The parcel arrived damaged.", | |
| "questions": { | |
| "refund": {"type": "noul", "instructions": "Should the customer receive a refund?"}, | |
| "route": {"type": "choice", "instructions": "Which team should handle this case?", "criteria": {"billing": "Payments and refunds", "support": "Technical troubleshooting"}} | |
| } | |
| }' | |
| ``` | |
| - **Front end:** `knowline_server.py`, `knowline_engine.py` and `knowline_layout.py` implement the scoring front end used | |
| for every result below; `temperatures.json` must sit next to `serve_knowline.sh`. | |
| - **Thinking off:** the front end renders prompts with thinking turned off (`enable_thinking=False`). The Qwen3.5-0.8B | |
| chat template in this repository turns thinking on by default, so pass `enable_thinking=False` if you build prompts | |
| yourself. | |
| - **Full settings:** see [INFERENCE.md](INFERENCE.md). | |
| ## How Gen1 was made | |
| - **Base model:** [Qwen/Qwen3.5-0.8B](https://huggingface.co/Qwen/Qwen3.5-0.8B). | |
| - **Training:** one epoch of LoRA SFT (rank 32, alpha 64, language-model linear layers only), merged into bf16 weights, | |
| at most 12,288 tokens per row. The released checkpoint is the end of training. Training examples include decision | |
| tasks written and labelled by LLM teachers. | |
| - **Readout temperature:** T = 1.54, fitted on held-out data and folded into `model.language_model.norm.weight` | |
| (see `CALIBRATION.json`). `temperatures.json` divides score-question logits by 0.6494 (= 1/1.54), so score questions | |
| are read at an effective temperature of 1.0. | |
| - **Images:** no image training; the vision tower is the base model's. | |
| The training data is not included in this repository. | |
| ## Comparison | |
| Board entries of a similar size, from the Decision Index board snapshot multimodalart/jev-decision-index @ c130faf6 (data generated 2026-10-29 14:04 UTC). The board's DI 0.4.1 full | |
| score comes from the maintainers' private run. | |
| | model | size | DI 0.3 public | DI 0.4.1 full | source | | |
| |---|---|---:|---:|---| | |
| | **KnowLine-0.8B-Gen1** | 0.8B | **44.51** | not yet scored | self-run, official kit | | |
| | GLiClass v4 edge (0.4B) | 0.4B | 47.49 | 31.21 | board | | |
| | OneJev1.6-0.8B | 0.9B | 48.76 | 29.58 | board | | |
| | crystal-0.8b | 0.9B | 42.79 | 29.37 | board | | |
| | vLLM-SR vela3-fast (0.4B) | 0.4B | 50.36 | 29.27 | board | | |
| | StartLux-Decision v1.1 0.8B | 0.9B | 53.79 | 28.88 | board | | |
| ## Evaluation | |
| ### Full public Decision Index 0.3 | |
| Measured on 2026-10-29 with the files in this repository (bf16, read twice): | |
| | measurement | result | | |
| |---|---:| | |
| | Public Decision Index | **44.51** | | |
| | Public raw index | 58.35 | | |
| | Requests / scoreable requests | 140,620 / 140,178 | | |
| | Scoreable answers / errors / unsupported | 140,178 / 0 / 0 | | |
| | One request at a time: median / mean / 95th percentile | 24.6 / 39.6 / 117.3 ms | | |
| - **How the run was made:** a fresh run of the 0.3 public suite with the official kit (commit `62d2f51`), sent to | |
| four identical H20 servers started with `serve_knowline.sh`, 32 client shards. No request needed a retry and no input | |
| was truncated. | |
| - **Hardware:** H20 measurements, not the board's reference hardware. | |
| ### Other public benchmarks | |
| Both models of this release, on the same files and serving: | |
| | suite | 2B-Gen1 | 0.8B-Gen1 | | |
| |---|---:|---:| | |
| | C-Eval (4 categories, macro) | 67.0 | 56.3 | | |
| | JevBench / JevBench-hard | 77.5 / 55.9 | 71.9 / 49.5 | | |
| ### S1MB (English v1) | |
| A local run of the S1MB English v1 category (evaluator `9ad06fea`, dataset `10bcb8c6`) against | |
| this repository at commit `b76c79d4`, run ID `knowline-08b-gen1-en-20261029-001`: 137 benchmarks, 18,701 cases, 26,269 decisions, none | |
| failed or abstained. Task Avg 34.17 (choice 47.2, yes/no 37.1, score 18.3). This is the evaluator's task average, not a Borda rank or a leaderboard position. | |
| ### Calibration | |
| Computed on the 0.3 public suite with the method described by the Decision Index board (benchmarks weighted equally, | |
| confidence = probability of the chosen option, 10 equal-width bins); ranges cover the plausible benchmark sets, because | |
| the board does not publish which ones it uses. | |
| | metric | KnowLine-0.8B-Gen1 | | |
| |---|---:| | |
| | ECE (lower is better) | 0.008-0.012 | | |
| | Brier score (lower is better) | 0.41-0.43 | | |
| | Confidence ≥ 95% but wrong | 0.3% | | |
| | Mean confidence / accuracy | 0.66-0.67 / 0.66-0.68 | | |
| - **Recommendation:** check calibration on your own data if your use depends on probability thresholds. | |
| ## Disclosures | |
| - **Decontamination:** the complete training file was screened with standard and strict decontamination against the | |
| Decision Index public suite and the public benchmarks we report before training. This does not exclude exposure | |
| during the base model's pretraining. | |
| - **Public suite:** the Decision Index public suite is public; the board's private tests may show a lower score. | |
| ## Limitations | |
| - **Small model:** a 0.8B model is well below our larger models on knowledge and reasoning-heavy questions (for example | |
| C-Eval 56.3 and JevBench-hard 49.5). | |
| - **Planted instructions:** put untrusted content in data fields of the state, not in the instructions, and keep it | |
| clearly delimited; the model can be steered by instructions planted in the input. | |
| - **Calibration:** probabilities are calibrated on average, not for every domain; check calibration on your own data. | |
| - **Images:** no image training; image use is zero-shot. | |
| - **Thinking:** use the included front end or pass `enable_thinking=False`; with the chat template's default the model | |
| would be prompted in thinking mode, which was not used in training. | |
| - **Long requests:** limited by the model and serving context; the front end does not truncate a request. | |
| - **Not a chat assistant:** it is a structured decision readout model. | |
| ## Files and license | |
| The weights and code are released under Apache 2.0. `SHA256SUMS` covers every file in this repository. The Qwen3.5-0.8B | |
| base model remains subject to its own license and terms. | |
| ## Citation | |
| ```bibtex | |
| @misc{knowline08bgen1, | |
| title = {KnowLine-0.8B-Gen1}, | |
| author = {PelaAI}, | |
| year = {2026}, | |
| howpublished = {Hugging Face model repository} | |
| } | |
| ``` | |