面向LLM的全流水线FP8强化学习
研究论文 · 2026/09/23
强化学习(RL)已成为提升大语言模型(LLM)推理和智能体能力的关键技术。尽管FP8量化可以加速RL训练,但在整个FP8 RL流程中保持稳定性仍然具有挑战性。以往工作主要关注通过TIS等校正技术解决训练-推理不匹配问题,但我们发现全流程FP8 RL仍然面临严重的训练不稳定性,表现为训练中期熵异常激增和输出乱码。我们将这种不稳定性追溯到一个此前被忽视的原因:复合FP8量化噪声扭曲了重要性比率,不成比例地将负优势token推出信任域,并错误地将其梯度置零。结果,病态输出没有得到适当惩罚,并在训练过程中累积。为了解决这个问题,我们提出了校准裁剪(Calibrated Clipping),一种动态方法,通过匹配下界裁剪分位数并相应重新平衡上界,使FP8裁剪边界与高精度BF16分布对齐。在GRPO和DAPO算法、8B到32B模型规模以及多种FP8缩放粒度上的大量实验表明,我们的方法成功消除了熵激增,并恢复了与BF16基线相当的性能。
该研究解决了FP8强化学习训练中的关键稳定性问题,提出的校准裁剪方法简单有效,能显著提升训练稳定性并保持性能,对大规模LLM的RL训练有重要实用价值。
Reinforcement learning (RL) has become a key technique for improving the reasoning and agentic abilities of large language models (LLMs). Although FP8 quantization can accelerate RL training, maintaining stability throughout an FP8 RL pipeline remains challenging. While previous works have focused on resolving train-inference mismatches using correction techniques like TIS, we reveal that full-pipeline FP8 RL still suffers from severe training instability, manifesting as anomalous mid-training entropy surges and garbled outputs. We trace this instability to a previously overlooked cause: compounded FP8 quantization noise distorts the importance ratio, disproportionately pushing negative-advantage tokens outside the trust region and erroneously zeroing out their gradients. As a result, pathological outputs are not properly penalized and accumulate over the course of training. To address this, we propose Calibrated Clipping, a dynamic method that aligns the FP8 clipping bounds with high-precision BF16 distributions by matching the lower-bound clipping quantile and rebalancing the upper bound accordingly. Extensive experiments across GRPO and DAPO algorithms, model scales from 8B to 32B, and multiple FP8 scaling granularities demonstrate that our approach successfully eliminates entropy surges and restores performance comparable to the BF16 baseline.