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
KnowLine-9B-Gen1
KnowLine-9B-Gen1 is a 9B decision model based on Qwen3.5-9B. It maps a structured state and one or more typed questions to probabilities over the supplied options. It supports choice, yes/no, and ordered score questions, and does not generate free-form reasoning during decision readout.
The model is released as a bf16 merged checkpoint. The vision components remain those of the Qwen3.5-9B base model; this release is intended primarily for text decision tasks. Images are not trained in the 9B Gen1 mix and should be treated as zero-shot.
What it does
- choice questions with up to 255 named options;
- yes/no questions;
- ordered score questions;
- calibrated readout temperature folded into the language-model norm;
- read-twice serving for short text-only requests.
Quickstart
Install a compatible PyTorch/CUDA environment and SGLang, then use the included front end:
bash serve_knowline.sh /path/to/KnowLine-9B-Gen1 0 8080
The front end exposes /v1/systemone:
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"}}
}
}'
The included knowline_server.py, knowline_engine.py, and knowline_layout.py implement the scoring front end used for the evaluation below. The default front end reads short text-only requests twice and reads the option-label probabilities directly.
How Gen1 was made
- Base model: Qwen/Qwen3.5-9B.
- Training: one epoch of LoRA SFT, rank 32, alpha 64, language-model linear layers, bf16.
- Training data: the mixU Qwen3.5 decision dataset, 1,143,656 rendered training rows after cleaning.
- Maximum training sequence length: 12,288 tokens.
- The final checkpoint is the 0.90 WiSE interpolation candidate selected from the 9B-U post-training variants.
- The readout temperature
T=1.18is folded intomodel.language_model.norm.weight; seeCALIBRATION.json.
The training data is not included in this repository. The checkpoint, tokenizer, chat template, inference front end, and checksums are included.
Evaluation
Full public Decision Index 0.3
Measured on 2026-10-25 with the released weights and corrected bf16 front end, read twice enabled:
| Measurement | Result |
|---|---|
| Public Decision Index | 65.67 |
| Public raw index | 73.88 |
| Requests / scoreable requests | 140,620 / 140,178 |
| Scoreable answers / errors / unsupported | 140,178 / 0 / 0 |
| Sequential latency, median / mean | 96.7 / 207.7 ms |
The full suite was sent fresh to two H20 servers with 16 client shards. Two initial HTTP 504 transport failures were retried with unchanged payloads, weights and serving; no successful answers were retried based on correctness. Official scoring excludes 442 requests. No input was truncated. A separate sequential pass of 300 requests compared 477 answers with this model's own full run: 476 agreed, and the sole disagreement was a near-tie (margins 0.006 and 0.021). These are H20 measurements, not the board's hardware or private Full score.
Earlier internal candidate comparison
The following FP8-at-load sample/proxy measurements were used to compare 9B candidates. They are not full public runs or official private leaderboard scores.
| candidate | Decision Index public sample | S | O noproc | predicted board Full | NDT5 headline |
|---|---|---|---|---|---|
| KnowLine-9B-Gen1 WiSE 0.90 | 65.68 | 60.10 | 43.80 | 59.55 | 62.4 |
| kf9b baseline | 67.88 | 60.84 | 40.80 | 58.52 | 59.3 |
The predicted board Full is the internal full_noproc + 1.0 estimate used for the 9B comparison. The candidate is below the current 9B board reference elephant-1 at 60.26 and is not presented as the board leader.
The mix-T pilot evaluation showed consistent gains on the six paired-convention development bundles. That result measures the data intervention, not a board-ranking claim.
Disclosures
The 1,143,656-row mix combines 873,134 or1d rows, 241,781 Kf rows absent from or1d, 16,824 additional injection-invariance rows and 11,917 paired-convention pilot rows. It includes public benchmark training splits and programmatically/teacher-generated decision examples. The build report classifies 32.1% of rows as Decision Index-style training (including 1.2% alternate-format copies); training exposure is not limited to generic instruction data.
The complete mix was screened with standard and strict decontamination against the public DI suite and the project's evaluation roots. After filtering and the documented injection-restoration rules, the mix decreased from 1,160,834 to 1,143,656 rows, including the removal of ten residual shadow-probe matches. This procedure does not imply absence of pretraining exposure in Qwen3.5. The six pilot development bundles were excluded from training. The WiSE fraction was selected using internal evaluation results.
Calibration
CALIBRATION.json records the folded readout temperature. The front end uses temperature 1 after the temperature has been folded into the norm. Do not apply the same temperature a second time.
Limitations
- The 9B Gen1 training mix is smaller than the largest public decision-model mixtures.
- No image training was used in this release; image performance is zero-shot.
- The model is not trained with block-bidirectional attention.
- Long requests are subject to the model and serving context limits; the front end does not silently truncate a request.
- The model should not be treated as a general-purpose chat assistant. It is a structured decision readout model.
Files and license
The model weights and code are released under Apache 2.0. SHA256SUMS covers every file in this repository. The Qwen3.5-9B base model remains subject to its own license and terms.
Citation
@misc{knowline9bgen1,
title = {KnowLine-9B-Gen1},
author = {PelaAI},
year = {2026},
howpublished = {Hugging Face model repository}
}
- Downloads last month
- 106