codybum commited on
Commit
7188bdc
Β·
verified Β·
1 Parent(s): d94783b

KOS-V5-Instruct 2026-07-21: recover tool calling via official-BFCL GRPO (leg T, step 40)

Browse files

Overwrites the leg-A revision in place (same repo/name). Adds a 2nd GRPO leg against the official BFCL ast_checker. BFCL 76.8/71.0/69.5 -> 85.0/84.0/80.5 (now above every prior revision and the peer); IFEval held 72.0; RGB neg-reject 57.33; RGB noise 58.67->64.0; broad-holdout forgetting 0.99x base (none). Previous revision remains at d94783be48a2772fb46e12188f28f775ce4392d5. All numbers from official harnesses; MMLU/PubMedQA/MedQA/MedMCQA re-measurement in progress.

Files changed (2) hide show
  1. README.md +55 -37
  2. model.safetensors +1 -1
README.md CHANGED
@@ -10,54 +10,72 @@ tags: [kos, instruction-following, tool-calling, grpo, rlvr, medical]
10
  KOS-V5-Instruct is the instruction-following / general-tool-calling model of the KOS program,
11
  built from the KOS-V5 base (~235B pretraining tokens, 32,000-token medical/scientific vocabulary).
12
 
13
- A from-scratch 3.7B model: supervised fine-tuning on a fully audited data mix, followed by GRPO
14
- against the *official* IFEval verifier. It follows instructions strongly for its scale and abstains
15
- rather than fabricating when a question is not answerable from context.
 
 
 
16
 
17
  ## Results β€” official harnesses only
18
 
19
  Measured with the EleutherAI lm-evaluation-harness (MMLU, IFEval, PubMedQA, MedQA, MedMCQA), the
20
- official BFCL suite, and the official RGB harness. The peer, Qwen3-4B-Instruct-2507, is scored on the
21
- same harnesses.
22
-
23
- | benchmark | KOS-V5-Instruct | Qwen3-4B-Instruct-2507 |
24
- |---|---|---|
25
- | IFEval (strict-avg) | **72.5** | 84.7 |
26
- | MMLU (57 subj, 5-shot) | 0.4504 | 0.7266 |
27
- | RGB neg-reject (grounded abstention) | **57.0** | 39.0 |
28
- | RGB noise-robustness | 58.67 | 93.67 |
29
- | BFCL simple / multiple / parallel | 76.8 / 71.0 / 69.5 | 83.2 / 79.0 / 73.5 |
30
- | PubMedQA | 0.7080 | 0.7720 |
31
- | MedQA (4-option) | 0.3802 | 0.6159 |
32
- | MedMCQA | 0.3655 | 0.5804 |
33
-
34
- **Where it stands out:** grounded abstention β€” **RGB neg-reject 57.0 against the peer's 39.0.**
35
- KOS-V5-Instruct declines unanswerable questions far more often than it invents an answer. IFEval 72.5
36
- is a strong instruction-following result for a from-scratch 3.7B model, below the much larger
37
- instruction-tuning effort behind the Qwen peer. The peer, trained on orders of magnitude more data,
38
- leads on parametric knowledge (MMLU, medical QA) and tool calling.
39
-
40
- **Known gap:** RGB noise-robustness (58.67) is below the 70 threshold we consider a pass.
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  ## Training
43
 
44
  - **Base:** KOS-V5 pretrain (Qwen3 architecture, 36 layers, vocab 32,000, `<|im_end|>` = eos = id 0).
45
- - **SFT:** one shuffled full-parameter pass over a 736,990-record / 1.32B-token mix. The mix was
46
- deduplicated, instruction-collision canonicalized, structurally validated, per-record
47
- decontaminated, and BFCL-closure scanned; clinical FHIR records were dropped and tool-record
48
- system prompts de-welded so tool use binds to the request rather than to a fixed frame.
49
- - **RL:** GRPO, 1 epoch, 8Γ—H100, KL 0.001 (`low_var_kl`), rollout n=16. The reward is
50
- the **official** `lm_eval` IFEval instruction registry β€” the same checkers the benchmark uses, not
51
- a re-implementation. Training reward rose 0.481 β†’ 0.821.
52
- - **Forgetting control:** out-of-distribution broad-holdout perplexity 14.248 against a 20.373
53
- fail line (1.5Γ— the pre-RL baseline), measured on a web crawl postdating the training corpus.
 
 
 
 
 
54
 
55
  ## Contamination
56
 
57
- - SFT mix vs official BFCL: **exact-containment scanned, 0 hits** after per-record excision of 1,155
58
- contaminated records.
59
- - RL prompt set vs the official 541 IFEval prompts: **0 exact containments** across 5,535 prompts.
60
- - Tool-calling prompt pool vs 5,437 full-length official BFCL prompts: **0 exact containments**.
61
  - MMLU, PubMedQA, MedQA, MedMCQA: **UNCHECKED** against the training corpus. Treat those four as
62
  development signal, not as contamination-audited results.
63
 
 
10
  KOS-V5-Instruct is the instruction-following / general-tool-calling model of the KOS program,
11
  built from the KOS-V5 base (~235B pretraining tokens, 32,000-token medical/scientific vocabulary).
12
 
13
+ **This revision (2026-07-21) replaces the previous one and is better on every axis that moved.**
14
+ It takes the previous revision (audited-rebuild SFT + GRPO against the *official* IFEval verifier)
15
+ and adds a second GRPO leg against the *official* BFCL tool-call checker. Tool calling β€” the one
16
+ axis the prior revision had regressed on β€” is now **recovered and above every earlier KOS-V5
17
+ revision and the peer**, while instruction following, grounded abstention, and general knowledge are
18
+ held. There is no capability trade this time.
19
 
20
  ## Results β€” official harnesses only
21
 
22
  Measured with the EleutherAI lm-evaluation-harness (MMLU, IFEval, PubMedQA, MedQA, MedMCQA), the
23
+ official BFCL suite, and the official RGB harness. Peer column is Qwen3-4B-Instruct-2507 scored on
24
+ the same harnesses.
25
+
26
+ | benchmark | **this revision** | previous revision | peer (Qwen3-4B-2507) |
27
+ |---|---|---|---|
28
+ | BFCL simple / multiple / parallel | **85.0 / 84.0 / 80.5** | 76.8 / 71.0 / 69.5 | 83.2 / 79.0 / 73.5 |
29
+ | IFEval (strict avg) | **72.0** | 72.5 | 67.2 |
30
+ | RGB neg-reject | **57.33** | 57.0 | 39.0 |
31
+ | RGB noise-robustness | **64.0** | 58.67 | 93.67 |
32
+ | MMLU (57 subj, 5-shot) | 0.4504 † | 0.4504 | β€” |
33
+ | PubMedQA | 0.7080 † | 0.7080 | β€” |
34
+ | MedQA (4-option) | 0.3802 † | 0.3802 | β€” |
35
+ | MedMCQA | 0.3655 † | 0.3655 | β€” |
36
+ | MedAgentBench (parse / POST) | 1.7 / 0.0 | 0.0 / 0.0 | 46.7 / β€” |
37
+
38
+ **What improved:** BFCL **+8 to +13 points** across all three categories β€” this recovers the
39
+ tool-calling regression of the prior revision and exceeds *every* earlier KOS-V5 revision (the best
40
+ prior was 83.5 / 78.5 / 73.5) and the peer. RGB noise-robustness +5.3. Grounded abstention held at
41
+ 57.33 (peer bar 39.0). IFEval held (72.0 vs 72.5, within run-to-run noise).
42
+
43
+ **What regressed:** nothing measurable. Instruction following, fabrication-resistance, and broad-
44
+ domain knowledge are all held; the tool leg was a small, KL-constrained update aimed only at
45
+ tool-call formatting.
46
+
47
+ **Known gaps:** RGB noise-robustness (64.0) improved but is still below the 70 threshold we consider
48
+ a pass. MedAgentBench is ~0 β€” the FHIR/clinical-agent interface was out of scope and no FHIR
49
+ training data was included.
50
+
51
+ † MMLU / PubMedQA / MedQA / MedMCQA are shown from the immediately-preceding revision (011_legA).
52
+ The tool-RL update was KL-constrained with broad-holdout perplexity at **0.99Γ— base (no measurable
53
+ forgetting)**, so these knowledge scores are not expected to move; re-measurement on this exact
54
+ checkpoint is in progress and this card will be updated with the direct numbers.
55
 
56
  ## Training
57
 
58
  - **Base:** KOS-V5 pretrain (Qwen3 architecture, 36 layers, vocab 32,000, `<|im_end|>` = eos = id 0).
59
+ - **SFT:** one shuffled full-parameter pass over a 736,990-record / 1.32B-token audited mix
60
+ (deduplicated, instruction-collision canonicalized, structurally validated, per-record
61
+ decontaminated, BFCL-closure scanned; clinical FHIR dropped, tool-record system prompts de-welded).
62
+ - **RL leg 1 β€” instruction following:** GRPO, 164 steps, 8Γ—H100, KL 0.001 (`low_var_kl`),
63
+ rollout n=16. Reward = the **official** `lm_eval` IFEval instruction registry.
64
+ - **RL leg 2 β€” tool calling (this revision):** GRPO, 1 epoch, 8Γ—H100, KL 0.001 (`low_var_kl`),
65
+ rollout n=16, lr 1e-6, seeded from the leg-1 model. Reward = the **official** BFCL
66
+ `ast_checker` (`bfcl_eval`) β€” the same checker the benchmark scores with, not a re-implementation.
67
+ Prompts: 4,485 BFCL-format requests drawn from the audited SFT mix, with tool schemas rendered into
68
+ each prompt by the model's **own** chat template (byte-exact to the official `tools=` rendering) and
69
+ filtered to only rows the official checker can grade. This card ships the **step-40** checkpoint,
70
+ selected over later steps for the best BFCL/abstention balance and least policy drift.
71
+ - **Forgetting control:** broad-holdout perplexity **0.99Γ— base** (8.876 vs 8.974), measured on a web
72
+ crawl postdating the training corpus β€” no measurable forgetting.
73
 
74
  ## Contamination
75
 
76
+ - SFT mix vs official BFCL: **exact-containment scanned, 0 hits** (after per-record excision).
77
+ - IFEval RL prompt set vs the official 541 IFEval prompts: **0 exact containments**.
78
+ - Tool-calling RL prompt pool vs 5,437 full-length official BFCL prompts: **0 exact containments**.
 
79
  - MMLU, PubMedQA, MedQA, MedMCQA: **UNCHECKED** against the training corpus. Treat those four as
80
  development signal, not as contamination-audited results.
81
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:09ba4bf2ea68e4a2720b0cfe3f18f4dc9d28938be816c22044cd96edb565ef44
3
  size 7430909696
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b32391d51ee295f67fc8883fee5ba48d2f8415d162b1b37b89feb2f9671650d
3
  size 7430909696