Skip to content

test(conformance): run the network, and retract the gate it contradicts - #588

Merged
gHashTag merged 2 commits into
mainfrom
measure/perplexity
Aug 18, 2026
Merged

test(conformance): run the network, and retract the gate it contradicts#588
gHashTag merged 2 commits into
mainfrom
measure/perplexity

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Every benchmark in this directory ended with the same refusal: no network was run and no task accuracy was measured. This runs three.

GPT-2 124M, pythia-160m, opt-125m on WikiText-2 test, transformer-block weights quantised per-tensor into each candidate split, metric = perplexity.

8 bits

split gpt2 pythia-160m opt-125m zeroed (gpt2, mean)
rule e3m4 1.003× 1.021× 0.998× 1.75%
e4m3 fields 1.009× 1.020× 1.005× 0.01%
e5m2 fields 1.015× 1.081× 1.016× 0.00%
e2m5 1.158× 1.561× 1.023× 12.65%

e3m4 — the split the golden-section rule picks — comes first on two models and second by 0.1% on the third. Against e4m3 that is a tie, not a win; against e5m2 it is a consistent advantage. At 16 bits every split is lossless (1.000×).

On opt-125m, e3m4 scores 0.998× — quantisation slightly beat the baseline. That is noise, and it is the scale at which differences between the top splits should be read.

This retracts the gate from #587

That PR introduced a hard 1%-flushed feasibility gate and called e3m4 UNUSABLE. The task metric contradicts it:

zeroed (mean) perplexity cost
e3m4 1.75% +0.3% (lowest of the four)
e2m5 12.65% +16%

Moderate flushing is cheap. The threshold was calibrated on a proxy, so the number is still reported — it is the thing relative error cannot see — but it no longer disqualifies. A task metric outranks a proxy gate, and leaving both verdicts in the repository would have been two truths side by side.

The fast path is verified, not assumed

The sweep cannot call gf_ref.py 85M times per configuration, so there is a vectorised numpy quantiser beside it — checked bit for bit against the oracle on 10,800 values across nine splits. Mutation-checked: rounding mode (both call sites) and the bias formula each fail that test. One narrow gap is recorded in the file rather than papered over.

What this still does not establish

Weights only, three small models, one dataset, 24 windows of 512 tokens rather than the full test split. No training, no activation or gradient quantisation, no larger architecture. The e5m2 regime — activations and gradients, where outliers run ~100× typical — remains untouched.

Every earlier benchmark here ended with the same refusal: no network was
run and no task accuracy was measured. This runs three -- GPT-2 124M,
pythia-160m and opt-125m -- on WikiText-2, quantising transformer-block
weights per-tensor into each candidate split, and reports perplexity.

At 8 bits, e3m4 (the split the golden-section rule picks) comes first on
gpt2 and opt-125m and second by 0.1% on pythia-160m. Against e4m3 that
is a tie; against e5m2 it is a consistent advantage. e2m5 is bad
everywhere. At 16 bits every split is lossless.

That retracts the 1%-flushed gate from dot_product_bench.py. On GPT-2,
e3m4 zeroes 1.75% of weights on average and still gives the LOWEST
perplexity of the four candidates, while e2m5 zeroes 12.65% and costs
16%. Moderate flushing is cheap; the threshold was calibrated on a
proxy. The number is still reported -- it is what relative error cannot
see -- but it no longer disqualifies, because a task metric outranks a
proxy gate.

The sweep cannot call gf_ref.py 85M times per configuration, so there is
a vectorised quantiser beside it, verified against the oracle bit for
bit on 10800 values across nine splits. Mutation-checked: rounding mode
and bias each fail that test.

On opt-125m, e3m4 scores 0.998x -- quantisation slightly beat the
baseline. That is noise, and it is the scale at which differences
between the top splits should be read.
# Conflicts:
#	conformance/dot_product_bench.py
#	conformance/dot_product_bench_test.py
@gHashTag
gHashTag merged commit 6fe8f8a into main Aug 18, 2026
32 of 39 checks passed
@gHashTag
gHashTag deleted the measure/perplexity branch August 18, 2026 06:58
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