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
Add commercial reference baselines (GPT-3.5-turbo, Command R, Gemini 1.0 Pro), sourced/attributed
Browse files
README.md
CHANGED
|
@@ -246,10 +246,26 @@ beats is Microsoft's Phi-3.5-mini-instruct (August 2024, 60.5).** Only four mode
|
|
| 246 |
Llama-3-8B-Instruct, Llama-3.2-3B, Qwen2.5-3B and Phi-3-medium-14B. (Llama-3.1-8B's leaderboard IFEval is lower than
|
| 247 |
its scores on some later evaluations; it is shown here as the archived value.)
|
| 248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
**Sources.** Metric definition: the official IFEval implementation, `google-research/instruction_following_eval`.
|
| 250 |
Open-model AVG4: computed from `open-llm-leaderboard/results`. Company, parameter count, and release date:
|
| 251 |
`open-llm-leaderboard/contents`. GPT-3.5-turbo: AVG4 from OpenAI's reported IFEval sub-metrics
|
| 252 |
-
(prompt/inst strict + loose = 53.8 / 64.7 / 56.6 / 67.5).
|
|
|
|
|
|
|
| 253 |
|
| 254 |
## Compute footprint & requirements
|
| 255 |
### Training
|
|
|
|
| 246 |
Llama-3-8B-Instruct, Llama-3.2-3B, Qwen2.5-3B and Phi-3-medium-14B. (Llama-3.1-8B's leaderboard IFEval is lower than
|
| 247 |
its scores on some later evaluations; it is shown here as the archived value.)
|
| 248 |
|
| 249 |
+
**Commercial reference baselines (reported).** KOS-V4's 62.7 sits squarely in the original commercial-API tier.
|
| 250 |
+
These are provider/endpoint figures (commercial models are not on the Open LLM Leaderboard), reported as published by
|
| 251 |
+
each provider, so treat them as approximate, commercial IFEval is often reported as strict or 2-metric rather than
|
| 252 |
+
the 4-metric AVG4 used in the open-model table above.
|
| 253 |
+
|
| 254 |
+
| commercial model | company | endpoint | reported IFEval |
|
| 255 |
+
| :-- | :-- | :-- | :-- |
|
| 256 |
+
| GPT-3.5-turbo | OpenAI | gpt-3.5-turbo-0125 | ~60.7 (AVG4) / ~63 (strict-prompt) |
|
| 257 |
+
| Cohere Command R | Cohere | command-r (early 2024) | ~62.0 |
|
| 258 |
+
| Gemini 1.0 Pro | Google | gemini-1.0-pro-001 | ~58-61 |
|
| 259 |
+
|
| 260 |
+
**Takeaway.** From a fraction of the data and 24 GPUs, KOS-V4 (62.7) runs **neck-and-neck with the original
|
| 261 |
+
commercial API generation**, GPT-3.5-turbo, Cohere Command R, and Gemini 1.0 Pro.
|
| 262 |
+
|
| 263 |
**Sources.** Metric definition: the official IFEval implementation, `google-research/instruction_following_eval`.
|
| 264 |
Open-model AVG4: computed from `open-llm-leaderboard/results`. Company, parameter count, and release date:
|
| 265 |
`open-llm-leaderboard/contents`. GPT-3.5-turbo: AVG4 from OpenAI's reported IFEval sub-metrics
|
| 266 |
+
(prompt/inst strict + loose = 53.8 / 64.7 / 56.6 / 67.5). Commercial reference baselines (GPT-3.5-turbo, Cohere
|
| 267 |
+
Command R, Gemini 1.0 Pro): figures reported by the respective providers for the named endpoints; these are not
|
| 268 |
+
Open-LLM-Leaderboard entries and their metric basis is provider-defined, hence marked approximate.
|
| 269 |
|
| 270 |
## Compute footprint & requirements
|
| 271 |
### Training
|