Text Generation
Transformers
Safetensors
English
qwen3
medical
clinical
biomedical
instruction-following
tool-calling
function-calling
from-scratch
KOS-V5
university-of-kentucky
university-of-louisville
ccts
conversational
text-generation-inference
Instructions to use Kentucky-Open-Science/KOS-V5-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kentucky-Open-Science/KOS-V5-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kentucky-Open-Science/KOS-V5-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kentucky-Open-Science/KOS-V5-Instruct") model = AutoModelForCausalLM.from_pretrained("Kentucky-Open-Science/KOS-V5-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kentucky-Open-Science/KOS-V5-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kentucky-Open-Science/KOS-V5-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kentucky-Open-Science/KOS-V5-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Kentucky-Open-Science/KOS-V5-Instruct
- SGLang
How to use Kentucky-Open-Science/KOS-V5-Instruct 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 "Kentucky-Open-Science/KOS-V5-Instruct" \ --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": "Kentucky-Open-Science/KOS-V5-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Kentucky-Open-Science/KOS-V5-Instruct" \ --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": "Kentucky-Open-Science/KOS-V5-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Kentucky-Open-Science/KOS-V5-Instruct with Docker Model Runner:
docker model run hf.co/Kentucky-Open-Science/KOS-V5-Instruct
Card: Catbird logo + intro, official BFCL results
Browse files
README.md
CHANGED
|
@@ -81,7 +81,8 @@ Hugging Face Open LLM Leaderboard publishes as "IFEval."
|
|
| 81 |
| 55.9 | GPT-3.5-turbo-1106 (the original ChatGPT) | OpenAI, ~10,000-GPU supercomputer |
|
| 82 |
|
| 83 |
KOS-V5-Instruct **improves on KOS-V4-Instruct across every benchmark measured**: IFEval strict-avg
|
| 84 |
-
**61.6 → 67.01** (+5.4), MMLU **0.2782 → 0.3720** (+9.4),
|
|
|
|
| 85 |
**72.75/73.00/60.50 → 83.25/78.50/73.50** (+10.5 / +5.5 / +13.0). It clears both the original GPT-3.5-turbo
|
| 86 |
generation and the commercially trained Qwen2.5-3B on instruction following.
|
| 87 |
|
|
@@ -158,6 +159,25 @@ The 9 medical subjects of MMLU, extracted from the same official 5-shot run:
|
|
| 158 |
**+10.8 points over KOS-V4-Instruct**, and above the model's own full-MMLU average (0.3720) — the medical
|
| 159 |
subjects are where it is strongest.
|
| 160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
> ⚠️ **Why the MCQ numbers understate this model.** Our own measurements show KOS models place very little
|
| 162 |
> probability mass on MCQ answer *letters*: the format, not the knowledge, is the bottleneck. A model that ranks
|
| 163 |
> **1 of 17** at modelling clinical text while scoring modestly on multiple-choice is exhibiting exactly that gap.
|
|
@@ -173,6 +193,8 @@ subjects are where it is strongest.
|
|
| 173 |
**Google** verifier (`instructions_registry`, 25 instruction types).
|
| 174 |
- **MMLU** — stock `mmlu` group, official 57 subjects / 14,042 test items, 5-shot from `dev` (`first_n`),
|
| 175 |
loglikelihood over A–D, metric `acc` (not `acc_norm`), **no chat template**.
|
|
|
|
|
|
|
| 176 |
|
| 177 |
| benchmark | KOS-V5-Instruct | KOS-V4-Instruct | Δ |
|
| 178 |
| :-- | --: | --: | --: |
|
|
|
|
| 81 |
| 55.9 | GPT-3.5-turbo-1106 (the original ChatGPT) | OpenAI, ~10,000-GPU supercomputer |
|
| 82 |
|
| 83 |
KOS-V5-Instruct **improves on KOS-V4-Instruct across every benchmark measured**: IFEval strict-avg
|
| 84 |
+
**61.6 → 67.01** (+5.4), MMLU **0.2782 → 0.3720** (+9.4), medical QA (**PubMedQA 0.7200**, MedQA 0.3370,
|
| 85 |
+
MedMCQA 0.3282 — all up on V4), and official BFCL function-calling
|
| 86 |
**72.75/73.00/60.50 → 83.25/78.50/73.50** (+10.5 / +5.5 / +13.0). It clears both the original GPT-3.5-turbo
|
| 87 |
generation and the commercially trained Qwen2.5-3B on instruction following.
|
| 88 |
|
|
|
|
| 159 |
**+10.8 points over KOS-V4-Instruct**, and above the model's own full-MMLU average (0.3720) — the medical
|
| 160 |
subjects are where it is strongest.
|
| 161 |
|
| 162 |
+
### Medical QA benchmarks (official suites)
|
| 163 |
+
|
| 164 |
+
Official `medqa_4options`, `medmcqa` and `pubmedqa` from the same pristine lm-evaluation-harness,
|
| 165 |
+
5-shot, loglikelihood, metric `acc` — every model below scored in the same run on the same day.
|
| 166 |
+
|
| 167 |
+
| medical benchmark | **KOS-V5-Instruct** | KOS-V4-Instruct | YuLan-Mini-Instruct | marin-8b-instruct | Qwen3-4B-Instruct-2507 |
|
| 168 |
+
| :-- | --: | --: | --: | --: | --: |
|
| 169 |
+
| params | **3.7B** | 3.0B | 2.4B | 8.0B | 4.0B |
|
| 170 |
+
| **PubMedQA** | **0.7200** | 0.6860 | 0.6960 | 0.7500 | 0.7720 |
|
| 171 |
+
| MedQA (USMLE, 4-option) | **0.3370** | 0.2820 | 0.3511 | 0.4878 | 0.6159 |
|
| 172 |
+
| MedMCQA | **0.3282** | 0.2778 | 0.3856 | 0.4961 | 0.5804 |
|
| 173 |
+
|
| 174 |
+
**KOS-V5-Instruct improves on KOS-V4-Instruct on all three** (+5.5 MedQA, +5.0 MedMCQA, +3.4 PubMedQA).
|
| 175 |
+
|
| 176 |
+
**PubMedQA is the standout: 0.7200**, within 3 points of Stanford's Marin-8B at **less than half the
|
| 177 |
+
parameters**, and ahead of YuLan-Mini. PubMedQA tests comprehension of **biomedical literature** — the closest
|
| 178 |
+
of these three to what the base was actually trained on. The USMLE-style exam MCQs (MedQA, MedMCQA) are where
|
| 179 |
+
the answer-letter bottleneck below bites hardest.
|
| 180 |
+
|
| 181 |
> ⚠️ **Why the MCQ numbers understate this model.** Our own measurements show KOS models place very little
|
| 182 |
> probability mass on MCQ answer *letters*: the format, not the knowledge, is the bottleneck. A model that ranks
|
| 183 |
> **1 of 17** at modelling clinical text while scoring modestly on multiple-choice is exhibiting exactly that gap.
|
|
|
|
| 193 |
**Google** verifier (`instructions_registry`, 25 instruction types).
|
| 194 |
- **MMLU** — stock `mmlu` group, official 57 subjects / 14,042 test items, 5-shot from `dev` (`first_n`),
|
| 195 |
loglikelihood over A–D, metric `acc` (not `acc_norm`), **no chat template**.
|
| 196 |
+
- **Medical QA** — stock `medqa_4options`, `medmcqa`, `pubmedqa` tasks, 5-shot, loglikelihood, metric `acc`,
|
| 197 |
+
no chat template.
|
| 198 |
|
| 199 |
| benchmark | KOS-V5-Instruct | KOS-V4-Instruct | Δ |
|
| 200 |
| :-- | --: | --: | --: |
|