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-in-context: use leaderboard-comparable strict-average (61.4) consistently
Browse files
README.md
CHANGED
|
@@ -211,19 +211,21 @@ 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 |
-
Where KOS-V4-Instruct
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
| 218 |
|
| 219 |
**Size-fair view, small instruct models (≤ 4B params).** Among comparable-size models, KOS-V4 trails only two
|
| 220 |
big-lab distilled 3B models and beats the rest:
|
| 221 |
|
| 222 |
-
| model | params | IFEval |
|
| 223 |
| :-- | :-- | :-- |
|
| 224 |
| Llama-3.2-3B-Instruct | 3.2B | 73.9 |
|
| 225 |
| Qwen2.5-3B-Instruct | 3.0B | 64.7 |
|
| 226 |
-
| **KOS-V4-Instruct (ours)** | **3.0B** | **
|
| 227 |
| Phi-3.5-mini-instruct | 3.8B | 57.7 |
|
| 228 |
| Llama-3.2-1B-Instruct | 1.2B | 57.0 |
|
| 229 |
| gemma-2-2b-it | 2.6B | 56.7 |
|
|
@@ -232,11 +234,10 @@ big-lab distilled 3B models and beats the rest:
|
|
| 232 |
| Qwen2.5-1.5B-Instruct | 1.5B | 44.8 |
|
| 233 |
| Qwen1.5-4B-Chat | 4.0B | 31.6 |
|
| 234 |
|
| 235 |
-
**It also matches or beats much larger instruct models.** On the same
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
metric; single-metric strict prompt-level accuracy is lower for every model here, ours included.)
|
| 240 |
|
| 241 |
## Compute footprint & requirements
|
| 242 |
### 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 |
+
Where KOS-V4-Instruct sits among well-known open models on the **archived Open LLM Leaderboard** (2024–2025 snapshot,
|
| 215 |
+
`open-llm-leaderboard/contents`), using **exact canonical model IDs** (not community fine-tunes). Both this column
|
| 216 |
+
and our own IFEval are **aggregates**, but of different sub-metrics: the leaderboard's IFEval is the **strict**
|
| 217 |
+
prompt/instruction average, while our headline **62.7 is AVG4** (all four strict + loose metrics). To compare like
|
| 218 |
+
with like, KOS-V4 is listed below at its **strict-average, 61.4** (our AVG4 headline is 62.7). Calibration anchor:
|
| 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 (leaderboard strict) |
|
| 225 |
| :-- | :-- | :-- |
|
| 226 |
| Llama-3.2-3B-Instruct | 3.2B | 73.9 |
|
| 227 |
| Qwen2.5-3B-Instruct | 3.0B | 64.7 |
|
| 228 |
+
| **KOS-V4-Instruct (ours)** | **3.0B** | **61.4** |
|
| 229 |
| Phi-3.5-mini-instruct | 3.8B | 57.7 |
|
| 230 |
| Llama-3.2-1B-Instruct | 1.2B | 57.0 |
|
| 231 |
| gemma-2-2b-it | 2.6B | 56.7 |
|
|
|
|
| 234 |
| Qwen2.5-1.5B-Instruct | 1.5B | 44.8 |
|
| 235 |
| Qwen1.5-4B-Chat | 4.0B | 31.6 |
|
| 236 |
|
| 237 |
+
**It also matches or beats much larger instruct models.** On the same strict metric, KOS-V4 (61.4) is at or above
|
| 238 |
+
Mistral-7B-Instruct v0.2 / v0.3 (55.0 / 54.7), Llama-3.1-8B-Instruct (49.2), gemma-1.1-7b-it (50.4), Zephyr-7B
|
| 239 |
+
(49.5), Qwen1.5-7B-Chat (43.7), Llama-2-13b-chat (39.8), and gemma-7b-it (38.7). Ahead of it sit Phi-3-medium-14B
|
| 240 |
+
(64.2), Qwen2.5-3B (64.7), and the strongest small models, Llama-3-8B-Instruct (74.1) and Llama-3.2-3B (73.9).
|
|
|
|
| 241 |
|
| 242 |
## Compute footprint & requirements
|
| 243 |
### Training
|