codybum commited on
Commit
505b3cc
Β·
verified Β·
1 Parent(s): 91c9261

Card: restore full peer comparison (Qwen3-4B-2507) that was wrongly stripped; update KOS column to leg-T (BFCL now above peer, IFEval/knowledge honest vs peer)

Browse files
Files changed (1) hide show
  1. README.md +45 -54
README.md CHANGED
@@ -10,71 +10,62 @@ 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
- **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.4512** | 0.4504 | β€” |
33
- | PubMedQA | 0.7060 | 0.7080 | β€” |
34
- | MedQA (4-option) | 0.3802 | 0.3802 | β€” |
35
- | MedMCQA | 0.3648 | 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
- All four knowledge benchmarks (MMLU, PubMedQA, MedQA, MedMCQA) were re-measured **directly on this
52
- checkpoint** with the official lm-evaluation-harness and are flat vs the prior revision β€” exactly as
53
- the 0.99Γ— broad-holdout forgetting gate predicted (MMLU 0.4504β†’0.4512, PubMedQA 0.7080β†’0.7060, MedQA
54
- unchanged at 0.3802, MedMCQA 0.3655β†’0.3648). No knowledge was traded for the tool-calling gain.
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.
 
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 two GRPO
14
+ legs against *official* verifiers β€” the IFEval instruction registry, then the BFCL tool-call checker.
15
+ It follows instructions strongly for its scale, calls tools accurately, and abstains rather than
16
+ fabricating when a question is not answerable from context.
 
 
17
 
18
  ## Results β€” official harnesses only
19
 
20
  Measured with the EleutherAI lm-evaluation-harness (MMLU, IFEval, PubMedQA, MedQA, MedMCQA), the
21
+ official BFCL suite, and the official RGB harness. The peer, Qwen3-4B-Instruct-2507, is scored on the
22
+ same harnesses.
23
+
24
+ | benchmark | KOS-V5-Instruct | Qwen3-4B-Instruct-2507 |
25
+ |---|---|---|
26
+ | IFEval (strict-avg) | 72.0 | **84.7** |
27
+ | MMLU (57 subj, 5-shot) | 0.4512 | **0.7266** |
28
+ | RGB neg-reject (grounded abstention) | **57.33** | 39.0 |
29
+ | RGB noise-robustness | 64.0 | **93.67** |
30
+ | BFCL simple / multiple / parallel | **85.0 / 84.0 / 80.5** | 83.2 / 79.0 / 73.5 |
31
+ | PubMedQA | 0.7060 | **0.7720** |
32
+ | MedQA (4-option) | 0.3802 | **0.6159** |
33
+ | MedMCQA | 0.3648 | **0.5804** |
34
+
35
+ **Where it stands out:** general **tool calling** β€” BFCL 85.0 / 84.0 / 80.5, now *above* the peer on
36
+ all three categories β€” and **grounded abstention**, RGB neg-reject 57.33 against the peer's 39.0
37
+ (KOS-V5-Instruct declines unanswerable questions far more often than it invents an answer). IFEval
38
+ 72.0 is a strong instruction-following result for a from-scratch 3.7B model, below the much larger
39
+ instruction-tuning effort behind the Qwen peer. The peer, trained on orders of magnitude more data,
40
+ leads on parametric knowledge (MMLU, medical QA).
41
+
42
+ **Known gap:** RGB noise-robustness (64.0) is below the 70 threshold we consider a pass β€” improved
43
+ from the prior revision's 58.67 but not yet passing.
 
 
 
 
 
 
 
 
 
44
 
45
  ## Training
46
 
47
  - **Base:** KOS-V5 pretrain (Qwen3 architecture, 36 layers, vocab 32,000, `<|im_end|>` = eos = id 0).
48
+ - **SFT:** one shuffled full-parameter pass over a 736,990-record / 1.32B-token mix. The mix was
49
+ deduplicated, instruction-collision canonicalized, structurally validated, per-record
50
+ decontaminated, and BFCL-closure scanned; clinical FHIR records were dropped and tool-record
51
+ system prompts de-welded so tool use binds to the request rather than to a fixed frame.
52
+ - **RL leg 1 β€” instruction following:** GRPO, 1 epoch, 8Γ—H100, KL 0.001 (`low_var_kl`), rollout n=16.
53
+ The reward is the **official** `lm_eval` IFEval instruction registry β€” the same checkers the
54
+ benchmark uses, not a re-implementation. Training reward rose 0.481 β†’ 0.821.
55
+ - **RL leg 2 β€” tool calling:** a second GRPO leg seeded from the leg-1 model, same optimizer settings.
56
+ The reward is the **official** BFCL `ast_checker` (`bfcl_eval`); each prompt renders its tool schemas
57
+ through the model's own chat template, and the prompt set is filtered to only rows the official
58
+ checker can grade. This lifted BFCL from 76.8 / 71.0 / 69.5 to **85.0 / 84.0 / 80.5** with
59
+ instruction following, abstention, and knowledge all held.
60
+ - **Forgetting control:** out-of-distribution broad-holdout perplexity at **0.99Γ— the pre-RL base**
61
+ (8.88 vs 8.97), measured on a web crawl postdating the training corpus β€” no measurable forgetting
62
+ (MMLU/PubMedQA/MedQA/MedMCQA moved by ≀0.002 across the tool-calling leg).
63
 
64
  ## Contamination
65
 
66
+ - SFT mix vs official BFCL: **exact-containment scanned, 0 hits** after per-record excision of 1,155
67
+ contaminated records.
68
+ - IFEval RL prompt set vs the official 541 IFEval prompts: **0 exact containments** across 5,535 prompts.
69
  - Tool-calling RL prompt pool vs 5,437 full-length official BFCL prompts: **0 exact containments**.
70
  - MMLU, PubMedQA, MedQA, MedMCQA: **UNCHECKED** against the training corpus. Treat those four as
71
  development signal, not as contamination-audited results.