Skip to content

Label every published result with the precision it was measured at - #28

Merged
AndreSlavescu merged 2 commits into
mainfrom
label-published-precision
Jul 30, 2026
Merged

Label every published result with the precision it was measured at#28
AndreSlavescu merged 2 commits into
mainfrom
label-published-precision

Conversation

@AndreSlavescu

Copy link
Copy Markdown
Owner

Three artifacts reported end-to-end model speedups with no statement of the precision behind them,
and they were the most quotable numbers in the repository. m5-mlx-lm-bf16-models.json shows decode
speedups of 1.37x to 1.75x — and those runs had meTile quantizing the down projection to affine8
while MLX ran bf16. A representation change, not a kernel win, with nothing in the file saying so.

I quoted from that file earlier in exactly the way it invites.

The writer was never the problem

It refuses to emit an unlabelled result at schema 19, _validate_suite even rejects a label that
disagrees with the recorded plan, and the chart renderer has been printing "mixed precision; not
BF16-vs-BF16"
all along. What none of them could do is police artifacts written at schemas 2, 3 and 5,
before labels existed — which is precisely where the unlabelled ones were. Validation at write time
cannot reach a file already on disk.

So the audit now covers the directory rather than the writer, and age is no longer an exemption.

Two requirements, one borrowed from MLPerf

Every published result must carry a precision class and say whether both sides ran the same weight
representation. A mixed-precision result must additionally carry an accuracy metric, following
MLPerf's rule for quantized submissions: arbitrary reproducible quantization is allowed, but it must be
described and must meet an accuracy target. A speedup at a different precision with no accuracy
evidence beside it is not a result anyone can act on. The calibration fidelity justifying the affine8
decode was already recorded — it simply wasn't connected to the claim.

Labels are derived, not re-measured

The label is a function of which features ran, and every file records that in selected_plan. The
backfill calls the same _precision_comparison the writer uses rather than reimplementing its rules —
a second implementation would be free to drift, and the audit checking labels against plans would then
be checking a copy. Each is marked derived_from: selected_plan so nobody mistakes it for something the
original run emitted. Baseline dtype stays as the function reports it: those schemas recorded no model
dtype, and inferring one from the filename would be a guess dressed as data.

What the labels say — the point of the exercise

artifact class
m5-mlx-lm-bf16-models.json mixed_precision_affine_int8_decode ← the 1.37x–1.75x figures
m5-mlx-lm-models.json same_precision
m5-mlx-lm-bf16-dense-qwen15.json same_precision

So the 4-bit end-to-end numbers are like-for-like, and decode there is parity. The bf16 figures are
not
, and should not be quoted as a speedup.

4 audit tests over every published file. 679 pass with 7 correctly skipping the mixed-precision accuracy
check as same-representation comparisons.

Sources: MLPerf Inference Rules

🤖 Generated with Claude Code

AndreSlavescu and others added 2 commits July 29, 2026 20:47
…ole shape

Head dimension 256 was recorded as an unsupported attention shape, and the kernel was never the
problem. It computes correctly at five of the six block sizes the tuner offers -- 32 through 512 all
match MLX -- and reaches the threadgroup memory limit only at 1024, where it wants 40960 bytes
against 32768. The tuner compiled candidates in a loop with no guard, so that one candidate raised
and took the whole shape with it. Attention on Qwen3-VL then fell back to MLX for every shape.

Task framing was wrong too, worth saying: this was carried as "make the attention decode kernel fit
head_dim 256". Nothing needed to fit. Measuring each block size individually is what showed the
kernel was already correct at D=256 and the selector was at fault, and no amount of work on the
kernel would have fixed it.

Threadgroup memory exhaustion is now a typed OutOfResources rather than a bare RuntimeError, and
the three MLX tuners prune on it. Only on it: a candidate asking for more memory than the part has
is a fact about that candidate, while any other compile failure is a bug that must surface, and
catching RuntimeError broadly would swallow both. This is the distinction Triton draws with its own
OutOfResources, whose autotuner prunes shared-memory failures the same way.

Fixing it in the tuners rather than in attention fixes all three -- attention, rms_norm and
add_rms_norm all had the same unguarded loop, and only attention had a config list that reached the
limit in practice.

meTile attention at head dimension 256 now runs and agrees with MLX exactly, 0.0 maximum absolute
difference on the shape that previously fell back.

The unsupported-shape backstop stays, since shapes that genuinely cannot run still need one, but its
comment no longer cites head_dim 256 as the motivating case.

6 new tests, including one asserting that only OutOfResources is pruned and that a plain
RuntimeError still propagates. 661 pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three artifacts reported end-to-end model speedups with no statement of the precision behind them,
and they were the most quotable numbers in the repository. m5-mlx-lm-bf16-models.json shows decode
speedups of 1.37x to 1.75x, and those runs had meTile quantizing the down projection to affine8 while
MLX ran bf16 -- a representation change, not a kernel win, with nothing in the file saying so. I
quoted from that file earlier in exactly the way it invites.

The writer was never the problem. It refuses to emit an unlabelled result at schema 19 and
_validate_suite even rejects a label that disagrees with the recorded plan, and the chart renderer has
been printing "mixed precision; not BF16-vs-BF16" all along. What none of them could do is police
artifacts written at schemas 2, 3 and 5, before labels existed, which is precisely where the
unlabelled ones were. Validation at write time cannot reach a file already on disk.

So the audit now covers the directory rather than the writer, and age is no longer an exemption.
Every published result must carry a precision class and say whether both sides ran the same weight
representation. A mixed-precision result must additionally carry an accuracy metric somewhere in it,
following MLPerf's rule for quantized submissions: arbitrary reproducible quantization is allowed, but
it has to be described and it has to meet an accuracy target. A speedup at a different precision with
no accuracy evidence beside it is not a result anyone can act on. The calibration fidelity that
justifies the affine8 decode was already recorded; it simply was not connected to the claim.

Labels are derived rather than re-measured, because the label is a function of which features ran and
every one of these files records that in selected_plan. The backfill calls the same
_precision_comparison the writer uses instead of reimplementing its rules, since a second
implementation would be free to drift from the first and the audit checking labels against plans would
then be checking a copy. Each one is marked derived_from: selected_plan so nobody mistakes it for
something the original run emitted, and the baseline dtype stays as the function reports it -- those
schemas recorded no model dtype, and inferring one from the filename would be a guess dressed as data.

What the labels say, which is the point:

    m5-mlx-lm-bf16-models.json        mixed_precision_affine_int8_decode   <- the 1.37x-1.75x figures
    m5-mlx-lm-models.json             same_precision
    m5-mlx-lm-bf16-dense-qwen15.json  same_precision

So the 4-bit end-to-end numbers are like-for-like, and decode there is parity. The bf16 figures are
not, and should not be quoted as a speedup.

4 audit tests over every published file, 18 passing with 7 correctly skipping the mixed-precision
accuracy check as same-representation comparisons. 679 pass with 7 skipped in the fast suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@AndreSlavescu
AndreSlavescu merged commit b8f20be into main Jul 30, 2026
4 checks passed
@AndreSlavescu
AndreSlavescu deleted the label-published-precision branch July 30, 2026 04:08
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