TL;DR
Training Large Language Models to reason via Reinforcement Learning (RL) is notoriously expensive, and shrinking the math down to ultra-fast 4-bit precision (FP4) usually breaks the learning process. This paper achieves the first end-to-end 4-bit RL post-training—meaning no 16-bit safety nets anywhere—by pinpointing a surprising culprit: activation outliers during text generation squash normal values to zero. With a lightweight sparse correction trick and a hierarchical 4-bit format (HiFloat4), the authors get 4-bit RL performing nearly identically to 16-bit precision at a fraction of the theoretical compute cost.
What Problem Does This Paper Address?
Teaching LLMs to solve complex math or write code relies heavily on Reinforcement Learning (like GRPO, a popular policy-gradient algorithm). Each RL step is a two-act play: a rollout phase, where the model generates long chains of thought, and a training phase, where the model scores those thoughts and updates its weights. Autoregressively generating all that text makes the rollout phase a massive computational bottleneck.
Quantization—shrinking numbers from 16-bit (BF16) down to 8-bit or 4-bit floating point (FP4)—speeds up matrix multiplications and slashes memory use. While prior work managed 8-bit RL, or 4-bit rollouts propped up by high-precision gradient adapters (like LoRA), true end-to-end FP4 RL—where forward and backward passes in both rollout and training run in 4-bit—has remained elusive because extreme quantization destabilizes optimization. Furthermore, standard offline quantization fixes fail here: as the RL policy updates, its activation statistics constantly drift, rendering static calibrations stale almost immediately.
Methods
Instead of relying on offline calibration, the authors combine a specialized number format with an on-the-fly error-catching mechanism applied strictly where it matters most.
- Format Foundations (Standard): They test two block-scaled 4-bit formats: open-standard MXFP4 (which shares one scale factor per 32 elements) and HiFloat4 (HiF4), which uses a three-level hierarchical scaling scheme over 64-element blocks to preserve both dynamic range and fine resolution.
- Rollout Residual Quantization / Rollout-ResQ (Novel): During the rollout forward pass, extreme outlier values in activation tensors stretch the quantization scale, causing smaller values to underflow to zero. Rollout-ResQ catches this lost information:
- It quantizes the activation tensor $X_\ell$ into $Q(X_\ell)$ and calculates the leftover quantization error, or residual: $\Delta X_\ell = X_\ell - Q(X_\ell)$.
- It quantizes that residual into FP4 as well: $Q(\Delta X_\ell)$.
- To avoid doubling the matrix multiplication cost, it applies a hardware-friendly 2:4 semi-structured sparsity pattern ($S_{2:4}$), keeping only the 2 largest values out of every 4 elements in the residual.
- The final layer output adds the standard dense FP4 multiplication to this lightweight sparse residual multiplication, while the training phase runs in standard, unassisted FP4.
Datasets
No new benchmarks are introduced; the authors use established mathematical reasoning datasets:
- Training:
Qwen2.5-3Bis trained on GSM8K, whileQwen2.5-Math-7Bis trained on the more challenging DAPO-Math-17K dataset. - Evaluation: Models are evaluated on GSM8K-test, Math-500, AIME-2024, AIME-2025, and AMC-2023.
Key Insights and Ideas
- The bottleneck is rollout generation, not gradient updates: Intuitively, you might expect 4-bit backward passes to ruin weight updates. Instead, keeping rollouts in BF16 while running training in FP4 recovers almost 100% of full-precision accuracy (86.88% vs. 86.96% on GSM8K). The degradation comes almost entirely from quantizing activations during the rollout phase.
- "Zero collapse" from outliers: Because block-scaled FP4 sets its scale based on the largest number in a block, a single massive activation outlier forces the scale to become huge, squashing the rest of the block's numbers to zero. In early transformer layers, post-quantization sparsity spikes above 80%!
- Upgrading training precision alone makes things worse: If you run rollouts in FP4 but "help" the model by keeping the training policy in crisp BF16, GSM8K accuracy plunges from 82.03% (all-HiF4) down to 78.01%—and crashes to 50.57% under MXFP4! Mixing precisions creates a severe numerical mismatch (high KL divergence) between the policy generating text and the policy learning from it.
- Residuals love sparsity: Quantized residuals are much more uniform and robust to 2:4 pruning than primary activations, incurring minimal error while unlocking sparse tensor core acceleration.
Key Results
- Closing the BF16 Gap (3B Model): Across 3-seed runs on
Qwen2.5-3B(GSM8K-test), naive HiF4 drops accuracy by 3.59% below BF16 (82.97% vs. 86.56%). AddingRollout-ResQ-S2:4shrinks that gap to just 1.39% (85.17%), and cuts the Math500 gap roughly in half (from -13.87% to -6.94%). - Format Ceiling Matters: On single-seed GSM8K runs,
Rollout-ResQ-S2:4narrows MXFP4's gap to BF16 from 13.65% down to 5.31%—a massive rescue, yet still trailing HiF4's 1.06% gap. HiF4's hierarchical scaling sets a fundamentally higher ceiling for extreme-precision RL. - Scaling to Harder Math (7B Model): On
Qwen2.5-Math-7B(DAPO-Math-17K),Rollout-ResQ-S2:4with HiF4 stabilizes training and outperforms all outlier-mitigation baselines, boosting AIME24 accuracy from 16.15% (naive HiF4) to 20.73% (vs. 27.29% BF16) and Math500 from 59.40% to 68.95% (vs. 74.59% BF16). - Theoretical Speedup: Assuming hardware where FP4 runs $4\times$ faster than FP16,
Rollout-ResQ-S2:4achieves a theoretical $2.67\times$ compute speedup over 16-bit GEMMs (compared to $2\times$ for a dense residual fallback).
Limitations and Future Work
- Simulated Hardware: Because native HiF4 hardware wasn't available to the authors, all experiments used software-simulated FP4 quantization. The simulation overhead prevented measuring real-world wall-clock speedups and limited experiments to 3B and 7B models.
- Fixed Sparsity: The study exclusively tests a 50% sparsity ratio (such as 2:4 semi-structured sparsity) to align with existing hardware kernels; exploring dynamic or varied sparsity levels to map out the broader accuracy-efficiency Pareto frontier is left for future work.
Summary updated