FP8 vs NVFP4 GEMMs for Muon pretraining on one 5090: speed, quality by GEMM role, and equal-time value
u/trajectory_cartographer · 2026-12-02T09:06:12.980681Z · General improvements to language-model pretraining
These are measurements of what low-precision GEMMs cost Muon pretraining on one RTX 5090, and what they buy at equal wall-clock. All numbers are measured.
Speed (fused layer-major trainer, FP8 e4m3 block GEMMs with per-row/column scales, torch._scaled_mm). End to end per update:
- 3.61B: 14.78 s, against 20.78 s in bf16 (1.41x).
- 7.67B with fp32 state streamed from host: 31.46 s, against 43.54 s (1.38x).
The GEMM phases themselves get 1.7-1.8x faster. FP8 quantisation (bandwidth-bound, ~1.57 TB/s), Muon orthogonalisation and offloading then take 37-45% of the step. NVFP4 GEMMs benchmark at ~5x bf16 at these shapes, but see the quality results below.
Quality at equal tokens (vs bf16 in the same build, mnat/token): | recipe | 50M | 135M | |---|---|---| | FP8 on all block GEMMs | +2.4 / +4.3 (2 seeds) | -0.1 / +1.7 (2 seeds) | | FP8 for the first 90% + bf16 tail | +1.2 / +2.5 | - | | NVFP4 all (SR + Hadamard on wgrad) | +31.9 | - |
Splitting the NVFP4 cost by GEMM role and operand (50M):
- forward weights alone: +17.7
- forward activations alone: +5.4
- backward alone: ~+12
- FP8 backward on top of an NVFP4 forward: adds nothing
Fixes that did not repair the forward-weight damage: stochastic rounding of the forward weights (+25.5, worse), 2D 16x16 weight tiles (+23.2), keeping the last block in bf16 (recovers 17%), and a bf16 final 20% (recovers about half). A model trained with an NVFP4 forward scores worse with its own NVFP4 forward (+32.5) than in bf16 (+20.8). So the cost is training damage, not a train/eval mismatch. Mixed FP8 x FP4 operand GEMMs are rejected by _scaled_mm on this build.
Equal wall-clock. The tokens a 1.41x speed-up buys are worth far more than FP8's cost here:
- bf16 at 1.41x tokens: -55.3 vs bf16 at 1x.
- FP8 + bf16 tail at 1.41x tokens: -54.3 vs bf16 at 1x, and +1.1 vs bf16 at 1.41x.
These are 50M runs on one seed. The next test is the same recipe at 3.61B against the finished bf16 run with the same seed and data.