Graphcore's MXNorm Makes Llama 3 Normalization 2.4x Faster for Free
Graphcore researchers show RMSNorm can be replaced by reusing block scales from MXFP8 quantization, cutting reduction size 32x with matched accuracy.
ProTakeaways
- Graphcore proposes MXNorm, a drop-in RMSNorm replacement that reuses MXFP8 block scales.
- Cuts the reduction feeding normalization by 32x by piggybacking on the quantization pass.
- Matches RMSNorm training loss and zero-shot OLMES scores on Llama 3 up to 8B parameters.
- Delivers up to 2.4x kernel speedup and 2.6% end-to-end speedup on NVFP4 with torch.compile.
- Only the p=2 variant is stable at 8B; p=1 allows outliers due to weaker output bounds.
- Reference PyTorch implementation of MXNormLinear included in the paper appendix.
As GPU matrix multiplications get faster with every generation, the humble operations sitting next to them, normalization, elementwise math, reductions, are quietly becoming the new bottleneck. A team at Graphcore has proposed a way to make one of those bottlenecks, RMSNorm, mostly free by piggybacking on work the accelerator is already doing for low-precision quantization.
Their new layer, MXNorm, is a drop-in replacement for RMSNorm that estimates the root mean square from the block scale factors computed during an MXFP8 cast, rather than doing a full pass over the tensor. It enables a 32x decrease in the size of reduction needed for normalization, and the authors report matched pre-training accuracy on Llama 3 models up to 8B parameters.
Why norms became a bottleneck
The paper opens with a stark accelerator scoreboard. Over the past eight years GPU tensor-core throughput for low-precision matmuls has improved roughly 80x, while CUDA-core throughput and memory bandwidth have only improved by 5.1x and 8.9x respectively. That gap makes anything memory-bound, like a reduction over the hidden dimension of an activation tensor, disproportionately expensive on modern hardware such as GB200 and the anticipated Rubin generation.
RMSNorm, used in Llama, DeepSeek-V3, gpt-oss and most current frontier models, is precisely such an operation. In a Pre-Norm transformer it sits immediately before each QKV projection and each FFN input projection, and it reduces along the full hidden dimension to compute the inverse RMS. In an MXFP8 training recipe that reduction happens right before another reduction, the per-block absmax used to compute the MX scale factor. MXNorm's core observation is that these two passes can be collapsed into one.
The trick: RMS from block absmaxes
MX formats work by chopping a tensor row into blocks (typically 32 elements) and storing a per-block scale in E8M0 alongside 8-bit or 4-bit values. During the cast, the kernel already computes the absmax of every block. MXNorm reuses those block absmaxes to approximate the inverse RMS, then fuses normalization and quantization into a single pass over the tensor.
The theoretical justification is a clean scaling argument: if a vector is scaled by some factor, both its RMS and the generalized power mean of its block absmaxes scale by the same factor, so their ratio is a constant that depends only on block size, the chosen power p, and the underlying distribution. The authors prove convergence for i.i.d. samples from a scale family, and estimate the correction constant via Monte Carlo sampling from a Gaussian.
Concretely, given block absmaxes m for each block of a row, the approximation is:
rho ~= c * ( mean_k( m_k^p ) )^(-1/p)with p=1 giving the arithmetic mean and p=2 giving the quadratic mean over block absmaxes. The 32-element block size means the reduction feeding the normalization sees 32x fewer values than a naive RMS pass.
The p=1 vs p=2 story
One of the more instructive parts of the paper is the ablation between these two variants. At 125M and 1B parameters both looked fine, but at 8B the difference became sharp. MXNorm with p=1 reached a noticeably worse final loss of 2.175 while MXNorm with p=2 matched RMSNorm at 2.126 versus 2.132. Zero-shot OLMES evaluations followed the same pattern, with p=2 and RMSNorm tying on 5 of 10 benchmarks.
Digging into why p=1 failed, the authors traced loss spikes to sudden outlier features and showed that the failure was not about RMS estimate quality. Instead, it came from the bound on the norm output:
- RMSNorm bounds the max output by sqrt(D), where D is the hidden dimension.
- MXNorm with p=2 gives a similar sqrt(K) bound (K is the number of blocks), around 17 for their setup.
- MXNorm with p=1 gives an O(K) bound, roughly 133 in the same setup, allowing much larger values through and destabilizing training.
Tighter output bounds correlate with more stable training, an insight that lines up with recent work replacing normalization with saturating nonlinearities like tanh.
What it costs and what it delivers
Because normalization and quantization are now fused, the design has to handle the affine gain parameter carefully. The trick is to move gamma into the following linear layer's weights, exploiting the fact that norms are almost always followed by a linear in transformer architectures. Gradients reuse the standard RMSNorm backward pass as a straight-through estimator, and the authors provide a full PyTorch reference implementation of MXNormLinear in the appendix.
Performance numbers, all generated with torch.compile on GB200 hardware:
| Setting | Speedup vs RMSNorm+MXCast |
|---|---|
| Max kernel speedup | 2.4x |
| Geometric mean, MXFP8 kernel (B=32, E4M3) | 1.417x |
| Geometric mean, NVFP4 kernel (B=16, E2M1) | 1.312x |
| Llama 3 8B transformer block, MXFP8 | 1.3% |
| Llama 3 8B transformer block, NVFP4 | 2.6% |
The layer-level speedups are larger in NVFP4 than in MXFP8, consistent with the claim that non-matmul operations matter more as precision drops. As FP4 and eventually narrower formats become standard, that gap should widen further.
Where it fits and where it does not
MXNorm is aimed squarely at Pre-Norm transformers that already use MX-format quantization for their matmuls, meaning modern LLM pre-training pipelines using TorchTitan and TorchAO. It is less relevant if you are training in BF16 or FP16 without block quantization, since there are no block scales to reuse.
A few practical caveats worth noting:
- The gain parameter has to be folded into the next linear weight, which requires some care during training but is trivial for inference.
- Only p=2 was shown to be stable at 8B. The authors did not test beyond 8B, so behavior at frontier scales remains open.
- The 1.3% end-to-end speedup on MXFP8 is modest, but the technique generalizes to narrower formats like INT2 and ternary, where the relative cost of normalization is higher.
The paper does not appear to ship a standalone repository, but the appendix contains enough code, including the Monte Carlo constants for common block sizes, to reproduce the approach on top of TorchAO. The broader message is arguably more important than the specific 1.3% number: as matmuls get cheaper, the leftover pieces of the transformer, norms, RoPE, gated MLPs, are where the next round of optimization work lives.