Text Generation
Transformers
Safetensors
English
qwen3
clinical
medical
instruction-following
tool-calling
function-calling
KOS-V4
from-scratch
conversational
text-generation-inference
Instructions to use Kentucky-Open-Science/KOS-V4-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kentucky-Open-Science/KOS-V4-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kentucky-Open-Science/KOS-V4-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-V4-Instruct") model = AutoModelForCausalLM.from_pretrained("Kentucky-Open-Science/KOS-V4-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-V4-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-V4-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-V4-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Kentucky-Open-Science/KOS-V4-Instruct
- SGLang
How to use Kentucky-Open-Science/KOS-V4-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-V4-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-V4-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-V4-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-V4-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Kentucky-Open-Science/KOS-V4-Instruct with Docker Model Runner:
docker model run hf.co/Kentucky-Open-Science/KOS-V4-Instruct
IFEval context on the standard AVG4 metric for all models (62.7 consistent)
Browse files
README.md
CHANGED
|
@@ -211,33 +211,32 @@ tool-use data. The same holds on IFEval, where newer, more heavily distilled sma
|
|
| 211 |
results are notable for its data and compute budget, not a claim to lead the current frontier.
|
| 212 |
|
| 213 |
## IFEval in context (recognizable models)
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
Qwen2.5-3B shows leaderboard 64.7 vs our strict-average 64.0.
|
| 220 |
|
| 221 |
**Size-fair view, small instruct models (≤ 4B params).** Among comparable-size models, KOS-V4 trails only two
|
| 222 |
big-lab distilled 3B models and beats the rest:
|
| 223 |
|
| 224 |
-
| model | params | IFEval
|
| 225 |
| :-- | :-- | :-- |
|
| 226 |
-
| Llama-3.2-3B-Instruct | 3.2B |
|
| 227 |
-
| Qwen2.5-3B-Instruct | 3.0B |
|
| 228 |
-
| **KOS-V4-Instruct (ours)** | **3.0B** | **
|
| 229 |
-
| Phi-3.5-mini-instruct | 3.8B |
|
| 230 |
-
| Llama-3.2-1B-Instruct | 1.2B |
|
| 231 |
-
| gemma-2-2b-it | 2.6B |
|
| 232 |
-
| Phi-3-mini-4k-instruct | 3.8B |
|
| 233 |
-
| SmolLM2-1.7B-Instruct | 1.7B |
|
| 234 |
-
| Qwen2.5-1.5B-Instruct | 1.5B |
|
| 235 |
-
| Qwen1.5-4B-Chat | 4.0B |
|
| 236 |
-
|
| 237 |
-
**It also matches or beats much larger instruct models
|
| 238 |
-
Mistral-7B-Instruct v0.2 / v0.3 (
|
| 239 |
-
|
| 240 |
-
(
|
| 241 |
|
| 242 |
## Compute footprint & requirements
|
| 243 |
### Training
|
|
|
|
| 211 |
results are notable for its data and compute budget, not a claim to lead the current frontier.
|
| 212 |
|
| 213 |
## IFEval in context (recognizable models)
|
| 214 |
+
Every model here is scored on the **same standard metric, IFEval AVG4** (the mean of the four strict + loose
|
| 215 |
+
sub-metrics, exactly as reported for KOS-V4 above). Competitor AVG4 values are computed from the **archived Open LLM
|
| 216 |
+
Leaderboard** per-model results (`open-llm-leaderboard/results`, 2024–2025) using **exact canonical model IDs** (not
|
| 217 |
+
community fine-tunes). Calibration: our own harness measures Qwen2.5-3B at AVG4 65.4 vs the leaderboard's 66.0
|
| 218 |
+
(within ~0.6), so KOS-V4's 62.7 is directly comparable.
|
|
|
|
| 219 |
|
| 220 |
**Size-fair view, small instruct models (≤ 4B params).** Among comparable-size models, KOS-V4 trails only two
|
| 221 |
big-lab distilled 3B models and beats the rest:
|
| 222 |
|
| 223 |
+
| model | params | IFEval AVG4 |
|
| 224 |
| :-- | :-- | :-- |
|
| 225 |
+
| Llama-3.2-3B-Instruct | 3.2B | 76.6 |
|
| 226 |
+
| Qwen2.5-3B-Instruct | 3.0B | 66.0 |
|
| 227 |
+
| **KOS-V4-Instruct (ours)** | **3.0B** | **62.7** |
|
| 228 |
+
| Phi-3.5-mini-instruct | 3.8B | 60.5 |
|
| 229 |
+
| Llama-3.2-1B-Instruct | 1.2B | 58.9 |
|
| 230 |
+
| gemma-2-2b-it | 2.6B | 57.8 |
|
| 231 |
+
| Phi-3-mini-4k-instruct | 3.8B | 57.1 |
|
| 232 |
+
| SmolLM2-1.7B-Instruct | 1.7B | 55.0 |
|
| 233 |
+
| Qwen2.5-1.5B-Instruct | 1.5B | 46.8 |
|
| 234 |
+
| Qwen1.5-4B-Chat | 4.0B | 33.2 |
|
| 235 |
+
|
| 236 |
+
**It also matches or beats much larger instruct models** (same AVG4 metric): Yi-1.5-9B-Chat (62.7, a tie),
|
| 237 |
+
OpenChat-3.5 (62.2), Mistral-7B-Instruct v0.2 / v0.3 (57.5 / 56.6), gemma-1.1-7b-it (52.9), Zephyr-7B (51.2),
|
| 238 |
+
Llama-3.1-8B-Instruct (51.0), Llama-2-13b-chat (46.5), and Qwen1.5-7B-Chat (46.1). Ahead of it sit Phi-3-medium-14B
|
| 239 |
+
(65.7) and the strongest small models, Llama-3-8B-Instruct (77.3) and Llama-3.2-3B (76.6).
|
| 240 |
|
| 241 |
## Compute footprint & requirements
|
| 242 |
### Training
|