破解MXFP4量化误差,三类误差各导致不同训练问题
Decomposing MXFP4 quantization error for LLM reinforcement learning: reducible bias, recoverable deadzone, and an irreducible floor

- 将量化误差分解为尺度偏移、死区截断和网格噪声三部分
- 修复后模型精度接近甚至超过原始浮点精度,提升1.0%
- 适合关注大模型低精度推理加速与训练稳定性的研究者
MXFP4算术可显著加速大语言模型(LLMs)强化学习(RL)的后训练过程,但量化误差导致严重精度下降。现有研究将量化误差视为单一噪声项,忽略了其不同机制对训练的影响。本文首次证明量化误差的精确三重分解:由2的幂次舍入带来的“尺度偏移”、小值置零引发的“死区截断”,以及四比特网格对齐产生的“网格噪声”。三者分别主导三种不同的强化学习失败模式:尺度偏移在反向传播中乘性累积,影响梯度精度;死区截断降低采样轨迹质量;网格噪声提高策略熵。为此提出针对性修正:宏块缩放降低尺度偏移,异常值回退恢复死区数据并部分缓解尺度误差,自适应量化噪声(AQN)控制策略熵。在Qwen2.5-3B稠密模型与Qwen3-30B-A3B-Base混合专家模型上,修正后精度恢复至BF16的0.7%以内,甚至超越BF16达+1.0%。
原文摘要 · Abstract (English)
MXFP4 arithmetic can dramatically accelerate reinforcement learning (RL) post-training of large language models (LLMs), yet the quantization error introduces severe accuracy degradation. Existing work treats the quantization error as a monolithic noise term, missing the distinct mechanisms upon interpreting how quantization error damages training. We prove an exact three-way decomposition of quantization error and show how each component dominates a distinct RL training pathway. Our theoretical and empirical analysis decomposes the MXFP4 quantization error into three additive components: "scale bias" from power-of-two rounding, "deadzone truncation" from zeroing small values, and "grid noise" from rounding to the nearest 4-bit grid. Each component dominates a distinct RL failure mode: scale bias accumulates multiplicatively through the backward pass, affecting gradient accuracy; deadzone truncation degrades rollout quality; and grid noise raises the policy's entropy. We combine corrections that are RL failure mode-targeted but not component-exclusive: Macro-block scaling to reduce scale bias, Outlier Fallback recovers deadzone entries, but also partially reduces scale bias induced error, and Adaptive Quantization Noise (AQN) for controlling the policy entropy. On Qwen2.5-3B dense and Qwen3-30B-A3B-Base mixture-of-experts model, the targeted corrections recover BF16 accuracy to within 0.7% and exceed BF16 by +1.0% respectively.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。