Repository navigation
docs(rocm): explain the granite-4.0-h-tiny w1 perplexity gap - #2240
Merged
Merged
Conversation
The 2026-09-30 correctness matrix left granite-4.0-h-tiny at w1 (+4.345% perplexity against Metal, 2.5 SE) as weak evidence of a ROCm bias. Re-measured at a18d3d7 the w1 trace is byte-identical to the earlier ones, with the HIP SSM update kernel on or off, so the gap still exists. Measured against an f32-activation reference (device-independent: GPU and CPU stream agree to 0.0007 nats), every op on ROCm's single-token path is within one to two and a half bf16 roundings of f32, and over 1024 positions ROCm's NLL is within noise of f32 (+0.011 nats, 0.6 clustered SE). Both backends sharpen the logits against f32 by a similar amount (+0.38 and +0.31 spread in the Metal window), and a mixed-precision sweep isolates that to rounding the residual stream to bf16. The 128-position window the Metal trace covers is the one where that rounding costs the most NLL (window SD 0.051 against a within-window SE of 0.025), and only 90 of its 128 inputs are distinct. Adds benchmarks/logit_traces/rocm_gfx1151_a18d3d76/ (traces, per-op table, probe source, METADATA, RUNS, SHA256SUMS) and a results-page section. The CPU stream is recorded as unusable as a bf16 reference on this host. No code change. Closes #2154
4 tasks done
3 tasks
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.
Summary
Closes the granite-4.0-h-tiny
w1investigation with a documented conclusion: the +4.345% perplexity against Metal is not a ROCm defect. No code changes.w1trace is byte-identical toc5fe9a16and96cbce84, with the HIP SSM update kernel on or off (aw1chunk never has SSM state).MLXCEL_DEVICE=cpuis unusable as a bf16 reference (top-1 logit 14.50 vs 18.875 on the GPU, about 400 s per chunk). The reference is the same forward with f32 activations; GPU and CPU stream agree to 0.0007 nats.Adds
benchmarks/logit_traces/rocm_gfx1151_a18d3d76/(traces, per-op table, probe source, METADATA, RUNS, SHA256SUMS) and a section indocs/benchmark_results/rocm-correctness-gfx1151-2026-09-30.md.Verification
On gfx1151, every GPU run holding the host GPU lock:
logit_tracew1(128 and 1024 chunks),w1withMLXCEL_SSM_KERNEL=0,w8,w256; the probe's f32, per-op and mixed-precision arms.w8andw256at a18d3d7 still pass against the Metal traces at--decided 2.0. Fast gates (verify-versions,verify-kernel-dtype-keys,verify-kernel-port-dispatch,verify-llama-compat,verify-fmt),dead_doc_pointersandcheck_binary_assets.pypass.make verify-rocmwas not run: the change is docs and trace data only.Not verified: Metal and CUDA (not available on this host). No 1024-position Metal trace or Metal per-op numbers could be produced; the remaining 0.042-nat difference between the backends is not attributed to any one op.
Closes #2154