Manuscript Offprint

arXiv:2610.32229

Training an MoE LLM in MXFP4: How We Closed the Gap to BF16

Han Wang, Zhitao Wang, Natalia Frumkin, Xuanwu Yin, Alireza Khodamoradi, Dong Li, Emad Barsoum

ABSTRACT

Training large language models (LLMs) in sub-8-bit arithmetic promises substantial gains in memory bandwidth and compute throughput, yet FP4 formats introduce quantization error severe enough to destabilize optimization if left unaddressed. We present ALTO, an open-source training recipe for GPT-OSS-20B, a 20-billion-parameter mixture-of-experts (MoE) model, on the MLPerf Small MoE Training benchmark under the MXFP4 microscaling format. The recipe combines established techniques from Abecassis, Felix et al. [1] (hybrid 1D/2D block quantization, randomized Hadamard transforms, and stochastic rounding) with a simplified weight de-oscillation scheme adapted from TetraJet-v2 [2]. On C4 validation at global batch size 16, MXFP4 + RHT + SR + de-oscillation reaches a validation loss of 3.3350 at 16,128 steps, only 0.007 above the BF16 baseline (3.3283), closing roughly 50% of the gap left by MXFP4 without de-oscillation (3.3418). Measured by steps to reach the MLPerf quality target (validation loss 3.34), de-oscillation cuts the FP4 convergence overhead relative to BF16 from +20.0% to +5.0%. We also report negative end-to-end results from differential gradient estimation, outlier clipping, and macro-block scaling, despite each showing operator-level SNR gains. All experiments use simulated MXFP4 kernels on AMD MI300 hardware and wall-clock speed has not been optimized.

1 Introduction

Low-precision training means representing the weights, activations, and gradients used during pretraining in a narrower numerical format than the FP32/BF16 baseline, in exchange for some loss of numerical fidelity. This trade-off matters because operand size directly bounds two of the main costs of training large models: memory bandwidth and compute throughput. Fewer bits per value means less data to move between memory and compute units and, on hardware with matching low-precision matrix units, more throughput per GEMM. This is why the field has kept pushing bit width down, from FP16 and BF16 to FP8 and, more recently, to 4-bit floating-point formats standardized under the Open Compute Project (OCP) Microscaling (MX) specification [3]. MXFP4 encodes weights and activations as E2M1 (signed, 2 Exponent, and 1 Mantissa bit) values with per-block UE8M0 (Unsigned, 8 Exponent, and 0 Mantissa bit) scales, yielding a theoretical 4×4\times reduction in operand footprint relative to BF16. For sparse MoE models such as GPT-OSS-20B [4], where expert matrices dominate compute and memory, MXFP4 training could unlock disproportionate efficiency gains, since the largest tensors in the model are exactly the ones the format targets.

Realizing this in practice is not merely a matter of substituting GEMM kernels, because FP4 quantization interacts with training dynamics in ways that milder formats do not. One phenomenon central to this report is weight oscillation: the optimizer updates a full-precision master weight, but the GEMM only ever sees its quantized value, and that quantized value can jump between representable levels from step to step even when the underlying master weight is moving smoothly and by a negligible amount. This happens for two related reasons. First, an element sitting near a quantization bin boundary can flip which bin it rounds into from a tiny update, so the quantized weight oscillates between adjacent lower and higher bins while the full-precision weight barely moves. Second, an outlier element within a block can dominate that block's shared scale, so as gradients and neighboring values fluctuate, the scale shifts enough to repeatedly push the quantized weight across bin boundaries, even when the element itself is not

A PREPRINT

near a boundary. Beyond oscillation, FP4 quantization more generally amplifies sensitivity to tensor outliers, and straight-through estimation (STE) of gradients through non-differentiable quantizers introduces its own bias. All of these effects compound over long-horizon pretraining runs, and oscillation in particular tends to become more damaging later in training, once the loss enters a fine-grained convergence regime.

This paper describes our methodology for closing the accuracy gap between MXFP4 and BF16 training on the MLPerf Small MoE training task [5]. 2D block quantization, randomized Hadamard transforms, and stochastic rounding are adopted from Abecassis, Felix et al. [1] (Section 4.1 – 4.3). Our focus is on composing these methods into a training recipe suited to MX-format MoE models, implementing them in a unified stack based on Torchtitan [6], and evaluating which combinations matter at GPT-OSS-20B scale. Weight de-oscillation is adapted from TetraJet-v2 [2]. We additionally compare it against low-rank outlier compensation as a design choice. We state explicitly where the implementation remains a research prototype rather than a performance-optimized production system.

References (24)