Skip to content

1.2.0: harden the eval scenario, fix the fp32 dtype, publish both 60-case measurements - #2

Merged
DawnofGenX merged 13 commits into
mainfrom
release/1.2.0
Nov 18, 2026
Merged

DawnofGenX merged 13 commits into
mainfrom
release/1.2.0

Conversation

@DawnofGenX

Copy link
Copy Markdown
Owner

What changed

The eval scenario is no longer a 20-case arithmetic stub. At 20 cases one case is worth 5.00 points, so the shipped --max-drop-points 2.0 was unreachable and the gate silently enforced zero-new-errors. Both sets are now 60 cases (1.67 points/case), the harness computes granularity, and the CLI warns — or exits 2 with --strict-granularity.

  • evals/sets/arith-tiered.jsonl — 60 arithmetic word problems, 20 easy / 20 medium / 20 hard, across add/sub/mul/div.
  • evals/sets/classify.jsonl — 60 balanced sentiment cases with declared answer aliases, so a closed-label task is scored exactly.
  • Case gained accept, category, difficulty; reports gained per-category tallies, regressed/recovered case ids, and one JUnit <testcase> per case.

fp32 was not fp32. transformers loads a checkpoint in its config dtype (Qwen2.5-0.5B declares bf16), so the fp32 arm ran bf16 weights and quantize_dynamic then raised expected scalar type Float but found BFloat16. --precision fp32 now casts, int8 casts before quantizing, and every arm records the dtype it actually measured — including the baseline, which is how the mislabel got published.

The measuring tool could manufacture a false green. regen_real_model.py scored the sentiment set with the numeral scorer: 0/60 at both precisions, and the gate printed PASS. --scorer auto now picks numeral-only-when-numeric, and --max-new-tokens defaults to 32 (8 truncated every word problem that reasons).

Published measurement, regenerable in ~2 min of CPU:

set fp32 int8 bf16
arith-tiered 33.3% (20/60) 3.3% (2/60) 33.3% (20/60)
classify 98.3% (59/60) 3.3% (2/60) —

bf16 matches fp32 case for case; int8 destroys both capabilities. The README says plainly that the arithmetic baseline is weak (and shows the per-tier split) rather than implying competence.

Action surface: response-cache is now an input and passes the entrypoint whitelist — the CLI flag existed but was unreachable from the Action.

Verification

  • Full suite green locally and on 3.10/3.11/3.12.
  • tests/test_claims_are_reproducible.py pins every README figure to the committed artifact.

…ranularity guard

Cases accept optional accept/category/difficulty; the built-in scorer honours
accept aliases while custom scorers keep the (pred, expected) contract.
ComparisonResult reports points_per_case, tolerance_reachable and a
granularity_warning when --max-drop-points is smaller than one case, plus
regressed/recovered case ids per precision. results/int8_collapse.json is
regenerated for the new report schema.
20 easy / 20 medium / 20 hard across add, sub, mul, div (30 distinct expected
values) so a drop tolerance in whole points is actually reachable.
30 positive / 30 negative, 46 rows carry accept aliases so an answer that is
semantically right but worded differently is not scored as a regression.
…ment script

The Action now passes --response-cache through to the CLI with a whitelisted
flag, and scripts/regen_real_model.py takes --set/--precisions/--out/
--min-accuracy/--max-cases so any eval set can be measured and its JSON
records eval + points_per_case for the claims test.
transformers 5.x loads a checkpoint in its config's dtype, so
Qwen2.5-0.5B-Instruct and SmolLM2-135M-Instruct arrive as bfloat16. The fp32
arm was a bare 'return model', which meant the baseline of every published
comparison was really bf16 while the report said fp32, and dynamic int8 died
with 'RuntimeError: expected scalar type Float but found BFloat16'.

fp32 now casts to float32, int8 widens before quantize_dynamic, and every
report records the measured weight dtype ('torch.qint8' for a quantized arm)
so the label is auditable instead of assumed.
The 'no committed result' branch sat inside 'if out_path.exists()', so it could
never run and a typo'd --out path quietly started a ten-minute CPU run.
20 cases means one case is 5.00 points, so the default --max-drop-points 2.0
was unreachable and the real policy was 'zero new errors' while the flag
claimed a 2-point budget. The CLI now warns on stderr before loading any
model, --strict-granularity turns that into exit 2, the markdown report gains
per-category tallies and the regressed case ids, and JUnit gains one testcase
per flipped case so a regression points at what actually broke.
… arm

The published table labelled a bf16 run 'fp32' because to_dict only carried
'dtype' on candidates. The baseline is an arm too; give it the same audit
fields so a mislabelled precision cannot be committed again.
--scorer auto picks the numeral scorer only when every expected answer is a
numeral, and the harness default (exact match + declared aliases) otherwise.
Running the numeral scorer over the sentiment set scored 0/60 at every
precision and the gate printed PASS: a false green produced by the measuring
tool itself.

--max-new-tokens defaults to 32 (was 8) because 8 truncated every word problem
that reasons before answering.
The arithmetic table now states what the model can actually do (33.3% at fp32,
per tier) instead of implying competence, the sentiment table carries the same
collapse from a 98.3% baseline, and both carry the dtype that was measured.
Drops the stale 20-case results/real_model.json: the set it was generated from
no longer exists, and its baseline ran bf16 under an fp32 label.
results/* is ignored by default so a local run cannot be committed by accident;
the artefacts behind a published claim have to be named explicitly, and those
two names replaced the deleted 20-case one.
@DawnofGenX
DawnofGenX merged commit 505fd54 into main Nov 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant