🤖 AI Hot

Miles Brings MXFP8 and NVFP4 RL Training to Blackwell GPUs

A
Alex Chen

Most RL training pipelines still run in BF16 because switching precision formats introduces training-inference mismatch. The sampler and trainer diverge, rewards degrade, and the whole thing collapses. LMSYS just published a working counterexample. Their Miles framework now ships two Blackwell-native low-precision RL recipes — end-to-end MXFP8 and per-token NVFP4 for MoE experts — and both hold reward curves that overlap with BF16 baselines.

The work lands at an interesting time. NVIDIA’s hardware roadmap shows Blackwell-native FP4 Tensor Cores delivering 9 PFLOPS per B200, 13.5 PFLOPS per B300, and 35 PFLOPS per Rubin GPU, all well above the 2.25 PFLOPS that BF16 dense Tensor Cores deliver on the same hardware. The question was never whether the throughput ceiling is higher. It was whether you can train RL workloads at those precisions without the model forgetting how to think.

What Changed: End-to-End MXFP8 RL

The MXFP8 recipe is the more straightforward of the two. It extends LMSYS’s earlier FP8 RL work to Blackwell’s native microscaling format. Every major GEMM in the RL loop — rollout, forward propagation, weight-gradient, and data-gradient — runs in MXFP8. The innovation is in the precision contract, not any individual kernel.

In a standard FP8 RL setup, the training side stores forward activations in 1×128 FP8 tiles, then dequantizes and requantizes them before the backward GEMM. That extra step adds quantization noise that accumulates across weight updates. The Miles team instead uses TransformerEngine’s MXFP8 path, which materializes both row-wise and column-wise quantized copies during forward quantization. More memory, but one fewer source of train-inference mismatch.

On the rollout side, SGLang uses Blackwell MXFP8 kernels from FlashInfer and Triton. The team upstreamed the rollout path across FlashInfer and SGLang — five separate PRs covering attention projections, MoE experts, and weight-update synchronization. Almost all major GEMMs quantize to MXFP8, with explicit exceptions for high-precision layers like MLA projections.

The bit-exact quantizer contract is the part that matters most for RL practitioners. FlashInfer and TransformerEngine now agree byte-for-byte on MXFP8 quantization across random data, boundary cases, zero tensors, and maximum-value tensors. This alignment is enforced through unit tests that the Miles team upstreamed into FlashInfer. Without it, the sampler and trainer would see different low-precision models after each weight update, and the RL signal would erode.

Per-Token NVFP4: More Aggressive, Selective Application

NVFP4 is Blackwell’s native 4-bit format — two bits for the exponent, one for the mantissa, stored as E2M1 values with one E4M3 scale per 16-value block. It is aggressive. The Miles team applies it only to MoE expert weights, which makes sense when you look at the numbers: in a model like DeepSeek-V3 with roughly 671B parameters, MoE experts account for about 656.5B of them, or 97.8% of the total. Target the experts, and you capture nearly all the memory benefit without forcing every layer into the most volatile precision format.

The per-token scaling decision is where the recipe differs from NVFP4 pretraining approaches. If you use per-tensor scaling, a token’s quantized representation depends on which other tokens happen to be in the batch. That batch-variance is manageable during pretraining, where gradient signals are stable and weight updates are large. RL is different. Gradients are noisy, rewards are high-variance, and useful updates are small and delicate. If the scale of one token leaks into another, the quantized representation becomes a function of batch composition rather than the token itself. In RL, that is a recipe for performance collapse.

The Miles recipe computes one FP32 activation scale per token online, fused into FlashInfer’s activation quantization kernel. The same call that emits packed FP4 activations and E4M3 block scales also returns the per-token FP32 scales. No separate calibration pass needed. Train-inference consistency also requires matching expert-tensor-parallel sizes between SGLang and Megatron — if they partition the tensor differently, they compute different scales, and the precision contract breaks.

The Results: Overlapping Reward Curves

The headline result is a Qwen3-30B-A3B recipe ablation on 8× B200 GPUs. BF16 and all five low-precision configurations produce raw reward curves that closely overlap. The low-precision variants do not just avoid collapse — they track BF16 step for step.

The practical win shows up in rollout time. MXFP8 and NVFP4 both reduce rollout latency compared to BF16, which matters because RL is often rollout-bound. Long-context attention and inter-GPU communication consume enough of the end-to-end time that backward-pass throughput is rarely the bottleneck. Spending a little extra memory on high-precision backward GEMMs — the Miles team’s “high-precision backward” and “dequantized backward” modes — is a rational trade in this regime.

The memory data backs this up. For MXFP8 linear layers, high-precision backward mode cuts forward allocation by 28% and end-to-end allocation by 44% compared to the default low-precision backward path. For NVFP4, high-precision backward cuts end-to-end allocation by 70%. These savings come from not needing to generate and retain the column-wise quantized copy that the default low-precision backward GEMMs require. In a memory-constrained RL setup running large models on 8-GPU nodes, 44-70% less peak memory per linear layer is the difference between fitting and not fitting.

The Backward Mode Tradeoff

The Miles team exposes two backward modes: high-precision (original BF16 operands) and dequantized (BF16 dequantizations of the exact low-precision operands from forward). Both avoid running backward GEMMs in low precision, so neither needs stochastic rounding or Random Hadamard Transforms from the NVFP4 pretraining recipe. They trade backward throughput for higher-precision gradient computation.

The companion post from humans& covers the algorithmic motivation: RL gradients are noisy by nature, and adding quantization noise on top of that noise can overwrite fragile capabilities that took many RL steps to acquire. Keeping backward in BF16 is cheap insurance.

The dequantized backward mode sits between the two. It runs backward GEMMs on dequantized values rather than original BF16 values, so it reflects the forward-pass quantization in the backward signal without running the backward pass itself in low precision. For NVFP4, this mode adds about 7% to backward allocation compared to high-precision backward, but still saves 50% on end-to-end allocation versus the default path.

What Is Not Yet Solved

Two open issues deserve attention. First, the Miles team still maintains an extra BF16 weight copy alongside the low-precision weights. Dropping it would further reduce memory but requires refactoring the weight-update interface so that optimizer states and weight gradients work directly on the quantized representation. That is a significant engineering effort with unclear numerical consequences.

Second, occasional gradient spikes appear in the NVFP4 recipe. The team does not characterize them in detail, but gradient spikes in RL are dangerous — a single large update can undo many steps of careful capability acquisition. Whether these spikes are inherent to NVFP4 quantization or solvable through recipe tuning remains open.

Third, and more broadly, the precision contract approach that makes this work — bit-exact quantization across training and inference, per-token scaling, matched parallelism — is a lot of engineering surface area. Every new model architecture, every new parallelism strategy, every new rollout configuration needs to respect the same contract or risk divergence. The Miles team has upstreamed their components across five separate projects (TransformerEngine, FlashInfer, SGLang, Megatron, cuDNN frontend), but downstream adopters with custom stacks will need to replicate much of this work.

Where This Matters

The Blackwell hardware generation is the first where FP4 compute throughput hits 4-6× BF16 throughput. If RL training is your bottleneck — and for most post-training pipelines, it is — the incentive to adopt these recipes is real. A team running Qwen3-30B-A3B on B200 nodes can cut rollout time and peak memory without sacrificing reward, using the same hardware they already have.

The broader arc is that RL is becoming the dominant post-training paradigm. Labs are spending more compute on RL than on pretraining for frontier models. Getting RL to run efficiently on Blackwell-native formats is not an optimization — it is table stakes for anyone who wants to compete on model quality without burning unreasonable amounts of GPU hours.

Fine-Grained Precision Control: Not a Global Switch

One of the less flashy but operationally important contributions is the fine-grained precision control system. In practice, a single global precision switch does not work for low-precision RL. Some tensors need to stay in BF16, and they need to stay in BF16 consistently across Hugging Face checkpoint conversion, Megatron training, SGLang rollout, and live weight updates.

The Miles team built this as a reusable interface. Selected tensors — final layers, attention output projections, normalization layers — can be pinned to BF16 through a precision-control configuration, and that decision propagates automatically across every component of the RL stack. If you change the precision of a layer during checkpoint conversion, SGLang and Megatron both respect the same setting without manual synchronization.

The practical implication is that teams can start conservatively — keep attention and final layers in BF16, quantize everything else — and then progressively lower precision on additional layers as they validate stability. This incremental approach is how precision adoption actually happens in production, as opposed to flipping a global flag and hoping nothing breaks.

The Throughput Ceiling Is Moving

One underappreciated detail in the NVIDIA hardware numbers is the FP4-to-BF16 ratio across generations. On B200, FP4 delivers 4× BF16 dense throughput. On B300, that ratio climbs to 6×. On Rubin, it hits 8.75×. The gap is widening with each hardware generation, which means the cost of staying in BF16 grows every year.

For RL workloads specifically, the rollout phase is often the bottleneck. Each training step requires sampling new trajectories from the current policy, and if the rollout runs in BF16 while the hardware can do FP4 at 4-9× the throughput, the sampler is leaving most of the GPU’s compute capacity idle. The Miles recipes close that gap for the rollout phase while keeping the training phase numerically stable through the backward-mode selection.

There is a software ecosystem angle here too. The Miles team upstreamed components across five separate open-source projects: TransformerEngine training kernels, cuDNN frontend FP4 kernels, FlashInfer rollout kernels, SGLang weight-update synchronization, and Megatron NVFP4 recipe integration. This is not a single-repo patch. It is a cross-stack contribution that makes Blackwell-native training accessible to anyone running these frameworks. For the open-source RL community, that lowers the barrier from “write your own FP4 training pipeline” to “set a config flag.”

What to Watch Next

The roadmap items in miles#615 suggest this is not a finished project. Dropping the extra BF16 weight copy is the obvious next optimization — if the weights live exclusively in NVFP4 or MXFP8, memory drops another ~50% for the weight tensors themselves. The gradient spike issue in NVFP4 also needs characterization. If those spikes are inherent to per-token FP4 scaling in RL rather than a recipe bug, teams may need to choose between the memory savings of NVFP4 and the stability of MXFP8, rather than using both freely.

LMSYS has a track record of shipping practical RL infrastructure — their earlier FP8 RL post and INT4 QAT work both became reference points for the community. This release continues that pattern but raises the stakes: with Rubin hardware promising 35 PFLOPS of FP4 compute per GPU, the gap between what BF16-only pipelines can extract and what the silicon can deliver is about to become too wide to ignore.

Miles is open-source, the PRs are upstreamed, and the recipe configurations are documented. The barrier to trying this is lower than the engineering complexity might suggest. If you are running RL on Blackwell hardware and still using BF16, the gap between what you are getting and what the hardware can deliver just got wider.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen