test(conformance): score exponent splits on the inference primitive, and correct the metric - #587
Merged
Merged
Conversation
split_rule_sweep.py scored round-trip error one element at a time with no scale. That is the wrong workload: every quantised deployment applies a per-tensor scale before encoding, which removes the dynamic-range pressure wide exponents pay for. This scores a scaled dot product -- amax scaling, then quantise weights, then multiply against unquantised activations and sum. It also corrects itself once. The first draft ranked on relative error alone and made the golden rule's e3m4 look like it beat both OCP FP8 splits at 8 bits. It does not: that metric is dominated by the largest term, so a format can zero almost the whole tensor and still score well. Under a 4096x outlier, e3m4 zeroes 81% of the tensor where the e4m3 split loses 1.4%. Ranking is now among the feasible only, gated at 1%. Rows carry FIELD WIDTHS and not the specials of the formats they are named after: this e4m3 tops out at 480 where OCP FP8 E4M3 stops at 448, and this e5m2 reaches 114688 where OCP E5M2 stops at 57344. Named "fields" for that reason -- calling a row "IEEE binary32" when it has different specials was the same mistake one file over. Regime note from the literature: E4M3 is the weight format and E5M2 the gradient/activation one, because activation outliers run ~100x typical while weight tails are milder. This quantises weights only.
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#586 scored splits on round-trip error, one element at a time, with no scale. That is the wrong workload for a quantised pipeline: every deployment applies a per-tensor scale before encoding, which removes exactly the dynamic-range pressure that wide exponents pay for.
This scores the primitive that actually runs — amax scaling, quantise weights, multiply against unquantised activations, sum.
It corrects itself once, and that is the finding
The first draft ranked on relative dot-product error alone. Under it, the golden rule's
e3m4beat both OCP FP8 splits at 8 bits, which looked like the first measured win for phi in this whole investigation.It is not. That metric is dominated by the largest term, so a format can zero almost the entire tensor and still score well:
That is what the wider splits are for, and it is why OCP FP8 carries more exponent than the golden section would give it. Ranking is now among the feasible only, gated at 1% flushed.
Results, after the gate
Rows are labelled "fields", deliberately
They carry the field widths of the named formats and not their specials. Measured: this
e4m3tops out at 480 where OCP FP8 E4M3 stops at 448 (its all-ones row is NaN); thise5m2reaches 114688 where OCP E5M2 stops at 57344. Naming a row after a standard it does not implement is how "IEEE binary32" ended up on a row with different specials in #586.Regime note, from the literature not from taste
E4M3 is the weight format and E5M2 the gradient/activation one, because activation outliers run around 100× the typical value while weight tails are far milder. This benchmark quantises weights only, so it exercises the E4M3 regime and says nothing about the one E5M2 exists for.
A tooling defect this uncovered
The format table read back as
e5m11on one run ande6m10on the next while the file on disk saide5m10both times. Cause: most mutations preserve the file's length, and Python decides a.pycis current from the source's(mtime, size)— restore inside the same filesystem second and the interpreter serves bytecode compiled from the mutant.tri mutatenow clears derived caches (t27#2177). Second contamination of this kind in two iterations.What this still does not establish
No network was run and no task accuracy was measured. Activations are unquantised and the accumulator is exact, so this isolates weight quantisation and nothing else.