超越精度:训练-推理不匹配是一个优化问题,简单的学习率调度器可以解决它
Beyond Precision: Training-Inference Mismatch is an Optimization Problem and Simple LR Scheduling Fixes It
AI总结:
本文提出通过动态学习率调度器解决强化学习中训练-推理不匹配问题,通过减少学习率来抑制梯度噪声,从而稳定训练过程。
摘要:
强化学习(RL)用于训练大语言模型(LLM) notoriously 不稳定。虽然最近的研究将其归因于"训练推理不匹配根源",来自不一致的混合引擎,标准的缓解方法,如重要采样,在长时间的训练运行中可能会失效。在本文中,我们通过优化的视角分析这种不稳定性,证明梯度噪声和训练-推理不匹配在训练过程中同步增加。同时,我们发现通过缩小更新规模可以有效抑制不匹配。综合来看,我们得出结论,不匹配不仅仅是静态的数值差异,而是一种与模型优化相关的动态失败。基于这一见解,我们提出了一种简单而有效的解决方案:一种专门的学率调度器。与传统学习率调度器中的预定义衰减计划不同,我们的方法根据响应长度动态触发学习率衰减,这是我们识别为即将到来的不稳定性可靠早期预警信号。实证证据表明,通过在梯度噪声增加时减少学习率,我们可以一致地稳定RL训练,并将训练-推理不匹配保持在安全水平。
英文摘要:
Reinforcement Learning (RL) for training Large Language Models is notoriously unstable. While recent studies attribute this to "training inference mismatch stemming" from inconsistent hybrid engines, standard remedies, such as Importance Sampling, might fail during extended training runs. In this work, we analyze this instability through the lens of optimization, demonstrating that gradient noise and training-inference mismatch escalate in tandem as training progresses. Meanwhile, we find that the mismatch can be effectively suppressed by shrinking the update size. Taken together, we deduce that the mismatch is not merely a static numerical discrepancy, but a dynamic failure coupled with the model's optimization. Based on this insight, we propose a simple yet effective solution: a specialized Learning Rate (LR) scheduler. Instead of pre-defined decay schedule in traditional LR scheduler, our method dynamically triggers LR decay based on response length, which we identify as a reliable early-warning signal for impending instability. Empirical evidence suggests that by reducing the learning rate as gradient noise rises, we can consistently stabilize RL training and keep the training-inference mismatch at a safe level.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。