jaredpalmer/kev-8b

Model

kev-8b — research preview

0

3 commits

1 linked in READMEs

updated Sep 19, 2026

See the code
calibration
decision-model
lora
model-index
multiple-choice
peft
research-preview
safetensors
text-classification
typesafe

README

kev-8b — research preview

kev-8b is a decision model: one document (the state) and a set of typed questions in, a probability distribution per question out, in one forward pass. No text generation. It is a LoRA adapter (r=16) plus a pointer head on Qwen/Qwen3-8B-Base (revision 49e3418f), serving TypeSafe's public /v1/systemone contract.

Research preview, not a versioned release. It is the best checkpoint of any size under a frozen, checksummed protocol (best in-distribution accuracy, best Brier), trained with the low-learning-rate recipe found at 4B. Its out-of-domain accuracy is statistically indistinguishable from kev-4b (+0.4 pp, 95% CI [−3.9, +4.5]); it is better calibrated and better on date arithmetic. It does not pass the release screen we set in advance (held-out policy pairs: 0.62 both-correct, screen 70%).

  • Hub: jaredpalmer/kev-8b (this repo; trial recipe-8b-r1/00-trial-0)
  • Code, suites, every trial with hashes and paired bootstraps: github.com/jaredpalmer/kevPLAN.md, runs/leaderboard.md

Results (same frozen items for every row)

| | kev-0.5b | kev-0.6b preview | kev-4b preview | kev-8b preview | Jev | |---|---|---|---|---| | in-distribution accuracy (decision-v4 dev, 1,200 q) | 0.712 | 0.805 | 0.843 | 0.869 | 0.845 | | out-of-domain accuracy (transfer-v4 dev, 560 q) | 0.575 | 0.598 | 0.759 | 0.774 | 0.855 | | out-of-domain Brier | 0.50 | 0.521 | 0.346 | 0.339 | 0.221 | | confident errors out of domain (p ≥ 0.9 and wrong) | – | 5.2% | 5.5% | 8.2% | 5.5% | | held-out policy structures, both siblings correct | – | 0.11 | 0.62 | 0.61 | 0.95 | | option-order flip rate | 0.21 | 0.02 | 0.00 | 0.02 | 0.00 |

Per-source out-of-domain accuracy (kev-8b / Jev): QNLI 0.93 / 0.925, SciQ 1.00 / 0.99, TweetEval-offensive 0.71 / 0.81, PAWS 0.76 / 0.79, MMLU 0.69 / 0.90, Emotion 0.57 / 0.60, deadline (3-level date arithmetic) 0.70 / 0.95.

Seeds: three seeds with this recipe on this suite: transfer 0.774 / 0.779 / 0.774, in-distribution 0.869 / 0.868 / 0.866, held-out pairs 0.61 / 0.67 / 0.59, MMLU 0.69 / 0.74 / 0.75. lr 2e-5 gives 0.770 (no gain). Against kev-4b (three seeds at 0.758-0.759) the 8B is +1.5-2 pp on transfer and +2.5 pp in-distribution.

Locked test, one exploratory read (runs/locked/kev-8b-preview-ungated/, labelled ungated because the checkpoint fails the held-out-pair screen): in-distribution 0.869 (Brier 0.191), out-of-domain 0.799 (Brier 0.296, confident errors 4.9%). This partition will not be read again for this checkpoint.

What we learned building it

  • Capacity dominates out of domain. With public examples and synthetic budget held equal, 0.6B → 4B is +14–19 pp; 4B → 8B is +1–7 pp.
  • Fine-tuning erodes base capability, and the learning rate controls it. The 4B base, zero-shot with a letter readout, scores 0.688 on the same MMLU items and 0.787 on PAWS; the default recipe (lr 2e-4) trained down to 0.60–0.66 / 0.56–0.71. Lowering lr to 5e-5 recovers most of it and is the single largest recipe improvement we found; fewer LoRA target modules and smaller ranks help less.
  • More public training data raises in-distribution accuracy and lowers transfer at 4B (10k vs 3.4k records: −3 pp). Knowledge MCQ sources (ARC, OpenBookQA, CommonsenseQA) raise in-distribution accuracy to 0.86 without moving transfer.
  • Programmatic contrastive policy pairs teach the trained rule structures (both-correct 0.85–1.0) but transfer to unseen structures only partially (0.5–0.6 at 4B, 0.03–0.11 at 0.6B).

Known limits

  • Held-out policy reasoning (unseen rule compositions, date arithmetic with grace periods) is far from Jev.
  • Product-shaped questions with no training analogue are not guaranteed; measure on your own inputs.
  • Out-of-domain probabilities are usable but not calibrated (raw ECE 0.128); temperature fitted in-domain does not transfer.
  • 8B fp32 needs ~33 GB and does not fit a 32 GB Mac; KEV_DTYPE=bf16 (~17 GB) does. Training took ~70 min on one H100.

Training

Frozen suite evals/v6/decision-v6 (development/test bytes identical to v4): 13,000 public records (1,000 per source: the ten v4 sources plus ARC-Challenge, OpenBookQA, CommonsenseQA) plus two programmatic policy arms of 448 records, two epochs, LoRA r=16 on attention and MLP projections, pointer head from scratch, cross-entropy on the option distribution, lr 5e-5 (OneCycle), effective batch 8, bf16 autocast with fp32 master weights, gradient checkpointing, one H100 (~70 min). Augmentation: option permutation, none-of-the-above insertion, distractors, none minimal pairs on 25% of Choice records. No Jev outputs were used for training.

Evaluation protocol

Development partitions select models; the locked test partition is read at most once per candidate. Every number carries suite hash, code hashes, and git commit in result.json. See PLAN.md for the corrections we made to our own earlier claims.

Use

uv run --extra serve python -m kev.serve --run jaredpalmer/kev-8b --port 8008      # KEV_DTYPE=bf16 on a 32 GB Mac

Any TypeSafe-compatible client works: TypeSafeClient(api_key="local", base_url="http://127.0.0.1:8008", model="kev-latest").

License

Apache-2.0 for the adapter and head; Qwen3 base is Apache-2.0; datasets carry their own licenses.

Contributors

jaredpalmer

3 commits

jaredpalmer/kev-8b

Model

kev-8b — research preview

0

3 commits

1 linked in READMEs

updated Sep 19, 2026

See the code
calibration
decision-model
lora
model-index
multiple-choice
peft
research-preview
safetensors
text-classification
typesafe

README

kev-8b — research preview

kev-8b is a decision model: one document (the state) and a set of typed questions in, a probability distribution per question out, in one forward pass. No text generation. It is a LoRA adapter (r=16) plus a pointer head on Qwen/Qwen3-8B-Base (revision 49e3418f), serving TypeSafe's public /v1/systemone contract.

Research preview, not a versioned release. It is the best checkpoint of any size under a frozen, checksummed protocol (best in-distribution accuracy, best Brier), trained with the low-learning-rate recipe found at 4B. Its out-of-domain accuracy is statistically indistinguishable from kev-4b (+0.4 pp, 95% CI [−3.9, +4.5]); it is better calibrated and better on date arithmetic. It does not pass the release screen we set in advance (held-out policy pairs: 0.62 both-correct, screen 70%).

  • Hub: jaredpalmer/kev-8b (this repo; trial recipe-8b-r1/00-trial-0)
  • Code, suites, every trial with hashes and paired bootstraps: github.com/jaredpalmer/kevPLAN.md, runs/leaderboard.md

Results (same frozen items for every row)

| | kev-0.5b | kev-0.6b preview | kev-4b preview | kev-8b preview | Jev | |---|---|---|---|---| | in-distribution accuracy (decision-v4 dev, 1,200 q) | 0.712 | 0.805 | 0.843 | 0.869 | 0.845 | | out-of-domain accuracy (transfer-v4 dev, 560 q) | 0.575 | 0.598 | 0.759 | 0.774 | 0.855 | | out-of-domain Brier | 0.50 | 0.521 | 0.346 | 0.339 | 0.221 | | confident errors out of domain (p ≥ 0.9 and wrong) | – | 5.2% | 5.5% | 8.2% | 5.5% | | held-out policy structures, both siblings correct | – | 0.11 | 0.62 | 0.61 | 0.95 | | option-order flip rate | 0.21 | 0.02 | 0.00 | 0.02 | 0.00 |

Per-source out-of-domain accuracy (kev-8b / Jev): QNLI 0.93 / 0.925, SciQ 1.00 / 0.99, TweetEval-offensive 0.71 / 0.81, PAWS 0.76 / 0.79, MMLU 0.69 / 0.90, Emotion 0.57 / 0.60, deadline (3-level date arithmetic) 0.70 / 0.95.

Seeds: three seeds with this recipe on this suite: transfer 0.774 / 0.779 / 0.774, in-distribution 0.869 / 0.868 / 0.866, held-out pairs 0.61 / 0.67 / 0.59, MMLU 0.69 / 0.74 / 0.75. lr 2e-5 gives 0.770 (no gain). Against kev-4b (three seeds at 0.758-0.759) the 8B is +1.5-2 pp on transfer and +2.5 pp in-distribution.

Locked test, one exploratory read (runs/locked/kev-8b-preview-ungated/, labelled ungated because the checkpoint fails the held-out-pair screen): in-distribution 0.869 (Brier 0.191), out-of-domain 0.799 (Brier 0.296, confident errors 4.9%). This partition will not be read again for this checkpoint.

What we learned building it

  • Capacity dominates out of domain. With public examples and synthetic budget held equal, 0.6B → 4B is +14–19 pp; 4B → 8B is +1–7 pp.
  • Fine-tuning erodes base capability, and the learning rate controls it. The 4B base, zero-shot with a letter readout, scores 0.688 on the same MMLU items and 0.787 on PAWS; the default recipe (lr 2e-4) trained down to 0.60–0.66 / 0.56–0.71. Lowering lr to 5e-5 recovers most of it and is the single largest recipe improvement we found; fewer LoRA target modules and smaller ranks help less.
  • More public training data raises in-distribution accuracy and lowers transfer at 4B (10k vs 3.4k records: −3 pp). Knowledge MCQ sources (ARC, OpenBookQA, CommonsenseQA) raise in-distribution accuracy to 0.86 without moving transfer.
  • Programmatic contrastive policy pairs teach the trained rule structures (both-correct 0.85–1.0) but transfer to unseen structures only partially (0.5–0.6 at 4B, 0.03–0.11 at 0.6B).

Known limits

  • Held-out policy reasoning (unseen rule compositions, date arithmetic with grace periods) is far from Jev.
  • Product-shaped questions with no training analogue are not guaranteed; measure on your own inputs.
  • Out-of-domain probabilities are usable but not calibrated (raw ECE 0.128); temperature fitted in-domain does not transfer.
  • 8B fp32 needs ~33 GB and does not fit a 32 GB Mac; KEV_DTYPE=bf16 (~17 GB) does. Training took ~70 min on one H100.

Training

Frozen suite evals/v6/decision-v6 (development/test bytes identical to v4): 13,000 public records (1,000 per source: the ten v4 sources plus ARC-Challenge, OpenBookQA, CommonsenseQA) plus two programmatic policy arms of 448 records, two epochs, LoRA r=16 on attention and MLP projections, pointer head from scratch, cross-entropy on the option distribution, lr 5e-5 (OneCycle), effective batch 8, bf16 autocast with fp32 master weights, gradient checkpointing, one H100 (~70 min). Augmentation: option permutation, none-of-the-above insertion, distractors, none minimal pairs on 25% of Choice records. No Jev outputs were used for training.

Evaluation protocol

Development partitions select models; the locked test partition is read at most once per candidate. Every number carries suite hash, code hashes, and git commit in result.json. See PLAN.md for the corrections we made to our own earlier claims.

Use

uv run --extra serve python -m kev.serve --run jaredpalmer/kev-8b --port 8008      # KEV_DTYPE=bf16 on a 32 GB Mac

Any TypeSafe-compatible client works: TypeSafeClient(api_key="local", base_url="http://127.0.0.1:8008", model="kev-latest").

License

Apache-2.0 for the adapter and head; Qwen3 base is Apache-2.0; datasets carry their own licenses.

Contributors

jaredpalmer

3 commits