Skip to content

docs(paper-c): decode framing parity section + static-int8/soup experiment scripts - #213

Merged
ronaldtse merged 4 commits into
mainfrom
docs/framing-paper-ledger
Sep 12, 2026
Merged

ronaldtse merged 4 commits into
mainfrom
docs/framing-paper-ledger

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

The framing finding, written into the paper and armed as an experiment.

Paper C §5.1 — decode framing is a parity axis. Dynamically quantized ONNX graphs compute activation scales per fed tensor (DynamicQuantizeLinear), so batch shape changes the decode on the same machine, runtime, and artifact — a variable cross-runtime and cross-hardware parity studies do not cover. Measured: KV divergence ~0.03/element (fp32 agrees to ~1e-6), drafter==verifier self-acceptance 33/66, speculative acceptance 0.99 under uniform framing vs 0.46 under runtime framing. Contract consequence: quantized quality parity is framing-scoped, and acceptance figures must disclose their framing.

The structural fix, pre-registered (rababa TODO.impl/11). scripts/static_int8_experiment.py re-quantizes the 2.1 decoder with static QUInt8 activation scales (MatMul-only, head fp32 — the shipped node policy), calibrated on 365 real decode feeds sampled across BOTH framings. Gates: framing-equality (identical single-step vs batched trajectories), fp32 drift no worse than dynamic int8; speed recorded. If both clear, all quantized artifacts re-export through the static path and the framing claim joins the contract.

Seed-soup probe. modal_teacher_sadeed --soup-both weight-averages r6+r7 50/50 and runs the same windowed protocol — the free pre-r8 check (same-basin soup works, or garbage output closes the axis).

Ronald Tse added 4 commits September 12, 2026 14:33
…+ soup probe scripts

Paper C gains section 5.1: dynamically quantized graphs compute
activation scales per fed tensor, so decode framing (batch shape) is
a parity variable on the same machine/runtime/artifact - measured
0.03/element KV divergence, 33/66 self-acceptance, 0.99-vs-0.46
framing-relative acceptance. Quantized quality parity is
framing-scoped; static scales are the proposed structural fix.

scripts/static_int8_experiment.py: the pre-registered experiment
(TODO.impl/11) - quantize_static on the 2.1 decoder calibrated over
365 real decode feeds in both framings; measures framing equality
(gate), fp32 drift (proxy), and speed vs the shipped dynamic int8.

modal_teacher_sadeed: --soup-both probes the r6+r7 50/50 weight
average under the same windowed protocol (same-basin check; garbage
output closes the axis on its own).
@ronaldtse
ronaldtse merged commit 7305df1 into main Sep 12, 2026
11 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