Developed by
University of Kentucky
University of Louisville
KOS-V5.1-Instruct is the first KOS model built by weight-space programming. Its released weights were written by arithmetic on weight vectors, not taken from a training checkpoint. They are KOS-V5-Instruct plus two task vectors, applied to chosen layers of the feed-forward network and kept only where measurement showed a gain.
A configuration fix, described below, comes with it.
⚠️ Research use only. This model is provided for research purposes only and must not be used for any commercial, clinical, legal, or production-grade application. The user assumes all risks associated with its use.
V5.1 = V5 + τ_identity (MLP, all 36 layers) − τ_replay (MLP, layers 12–23)
Adding τ_identity installs the model's own identity. Subtracting τ_replay removes the drift that the replay data causes. This is task arithmetic [3].
Only MLP weights change. Attention, embeddings and norms are bit-identical to KOS-V5-Instruct. The arithmetic is done
in fp32 and stored in bf16. Weights sha256: 7492922a4a80e14d3974e83e275b53a011abd183afe591579a9a8509be961199.
Subtracting τ_replay was tested on three blocks of 12 layers:
Merging the two edits evenly, the midpoint of the task-vector dial, also failed on Med-HALT. Extrapolating the post-SFT change on layers 4–11, ExPO-style [4], undid the tool-refusal gain. Both were rejected.
KOS-V5.1-Instruct is the only weight program that passed. It has 7 metrics significantly better and none worse.
Weight-space programming and its critics:
Editing and merging weights:
Learning over weights (metanetworks):
Moving knowledge across tokenizers:
Measurement:
KOS-V5-Instruct also shipped with a configuration defect. Its config.json stores the RoPE base only inside
rope_parameters. vLLM 0.11 with transformers 4.57 reads the top-level rope_theta, finds none, and silently serves
the model at θ = 10,000. The model was trained at θ = 25,000. We confirmed this by inspecting the rotary layer vLLM
builds for each file.
V5.1 adds the top-level "rope_theta": 25000.0 and sets use_cache: true. Under vLLM this restores long context,
shown in the RULER table below. Engines that read rope_parameters already ran KOS-V5-Instruct at 25,000, so the fix
changes nothing for them.
All comparisons below are paired runs on the same harnesses, measured on 2026-11-16. "V5" is KOS-V5-Instruct as published, and changes are in percentage points.
Each benchmark uses its official package or the authors' released code. The only additions are the plumbing needed to reach a locally served model. For the AfriMed-QA paper question set (n = 3,910, the paper's Table 3), one later-added line of the released code that narrows the set to 160 questions is disabled.
| V5 | V5.1 | |
|---|---|---|
| Answers as KOS (University of Kentucky and University of Louisville) | 0 / 15 | 14 / 15 |
| Claims another vendor made it (V5: almost always OpenAI) | 6 / 15 | 1 / 15 |
V5, asked "Which company developed you?", answered "I am an AI language model developed by OpenAI." The cause was the V5 fine-tuning data. It contained the line "as an AI developed by OpenAI" about 1,800 times and never taught the model its own identity.
| Benchmark | V5 | Change | p |
|---|---|---|---|
| Med-HALT FCT (authors' code) | 8.1 | +3.62 | 9e-106 |
| BFCL live_irrelevance (bfcl-eval, unedited) | 43.1 | +9.62 | 2e-13 |
| Med-HALT NOTA | 60.8 | +0.67 | 1e-5 |
| BFCL irrelevance | 64.6 | +7.08 | 2e-5 |
| BFCL multi_turn_base | 1.0 | +3.50 | 0.016 |
| TruthfulQA MC2 (lm-eval) | 43.4 | +0.31 | 0.016 |
| BFCL parallel_multiple | 70.5 | +5.00 | 0.041 |
| IFEval, four metrics (lm-eval, chat template) | 66.7 prompt-strict | −1.8 to −2.2 | ≥ 0.085 |
| Med-HALT FQT | 27.8 | −0.38 | 0.37 |
| AfriMed-QA MCQ, paper set (authors' code) | 32.7 | +0.46 | 0.59 |
| Other 12 BFCL categories, TruthfulQA MC1 | — | no significant change | ≥ 0.12 |
| Benchmark | V5 | V5.1 | Change | p |
|---|---|---|---|---|
| BBH, 27 chain-of-thought tasks, 3-shot (lm-eval) | 40.52 | 42.60 | +2.09 | 0.0004 |
| MMLU-Pro, 14 subjects, 5-shot (lm-eval) | 29.36 | 30.23 | +0.87 | 0.029 |
| ASDiv chain-of-thought, 8-shot (lm-eval) | 38.3 | 41.0 | +2.78 | 3e-5 |
| HellaSwag, 10-shot | 46.7 | 46.9 | +0.21 | 0.011 |
| MMLU, 5-shot | 46.9 | 46.7 | −0.14 | 0.31 |
| GSM8K, 5-shot, strict | 52.1 | 51.6 | −0.45 | 0.62 |
| MathQA, LSAT-AR, ARC, BoolQ, PIQA, WinoGrande, OpenBookQA, COPA, CommonsenseQA, LAMBADA | — | — | no significant change | ≥ 0.05 |
On BBH, object counting rose +21.6, geometric shapes +18.4, multistep arithmetic +14.4 and formal fallacies +10.0. Web of lies fell −10.0.
| Context | V5 | V5.1 |
|---|---|---|
| 4K | 77.0 | 82.2 |
| 8K | 61.9 | 71.5 |
| 16K | 21.6 | 56.0 |
| 24,576 (trained context) | 11.0 | 31.1 |
Single-needle retrieval goes from 35–40% to 88–99% at 16K, and from 9–27% to 53–72% at 24,576. These gains come from the configuration fix. The weight program moves RULER by at most ±2.6 points. Nothing is claimed beyond 24,576 tokens.
Disclosed deliberately.
Adding "repetition_penalty": 1.05 to generation_config.json also passed the gate, with 6 metrics better and none
worse. The pre-registered tie-break (count of significant gains) kept the shipped default. Against V5, this setting
gives:
Only engines that read the generation config apply it: vLLM's OpenAI server and transformers generate.
| Attribute | Detail |
|---|---|
| Architecture | Decoder-only Transformer (Qwen3ForCausalLM), Grouped-Query Attention |
| Parameters | 3.715 B |
| Hidden / Layers | 2560 / 36 |
| Attention | 32 query / 8 KV heads (GQA 4:1), head_dim 128, per-head QK-RMSNorm |
| Feed-forward | SwiGLU, intermediate 9728 |
| Vocabulary | 32,000, custom medical byte-level BPE (unchanged from V5) |
| Context length | 24,576 trained, 32,768 configured |
| Position encoding | RoPE, θ = 25,000 (now in both rope_theta and rope_parameters) |
| Embeddings | tied |
| Precision | bfloat16 (7.43 GB, single shard) |
The chat template and tokenizer are byte-identical to KOS-V5-Instruct.
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Write a haiku about Kentucky. Do not use any commas.<|im_end|>
<|im_start|>assistant
Tool / function calling uses the model's native <tools> … </tools> schema block and <tool_call> … </tool_call>
response format. Pass your function schemas via the tokenizer's apply_chat_template(..., tools=[...]).
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Kentucky-Open-Science/KOS-V5.1-Instruct"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "Write a haiku about Kentucky. Do not use any commas."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
vLLM: vllm serve Kentucky-Open-Science/KOS-V5.1-Instruct --max-model-len 24576. V5.1 runs at θ = 25,000 under vLLM
with no overrides.
Research use only. English only. Not for clinical, commercial, legal, or production-grade use. Outputs may be factually wrong or fabricated. This model must not be used to make or inform medical decisions.
The program is KOS (KOS-V1..V6). V5.1 is a weight-space-programmed release within the KOS-V5 generation.
Kentucky-Open-Science/KOS-V5-Instruct