通过动态修剪词汇表,解决大模型强化学习中的数值不一致问题。
Dynamic Vocabulary Pruning: Stable LLM-RL by Taming the Tail
- 动态裁剪低概率词尾,避免训练与推理的数值偏差
- 实验证明能实现稳定训练,理论推导出偏差上界
- 适合做大模型强化学习的工程师和研究者
大型语言模型的强化学习面临一个根本矛盾:高吞吐推理引擎与高精度训练引擎之间的数值差异。尽管参数相同,但二者生成的概率分布略有不同,造成训练-推理不匹配。我们证明该不匹配导致的对数概率偏差上限随(1−p)变化,其中p为词元概率。该尺度导致显著不对称性:高概率词偏差消失,而低概率词尾的偏差仍显著。采样时,这些尾部词引入系统性误差,并在序列中累积,破坏梯度估计稳定性。我们提出动态词汇裁剪(DVP),将强化学习目标限制在动态确定的“安全”词汇集内,排除极端尾部词。该策略以微小且有界的优化偏置,换取大幅减少的不稳定数值误差。我们通过实证验证了训练稳定性,并理论推导出诱导偏差的严格上界。
原文摘要 · Abstract (English)
Reinforcement Learning (RL) for Large Language Models (LLMs) faces a fundamental tension: the numerical divergence between high-throughput inference engines and numerically precise training engines. Although these systems share the same parameters, they produce slightly different probability distributions, creating a training-inference mismatch. We prove that the bound on the log-probability divergence arising from this mismatch scales as $(1-p)$, where $p$ is the token probability. This scaling induces a highly asymmetric effect: the bound vanishes for high-probability tokens but remains significant for low-probability tokens in the distribution tail. When sampled, these tail tokens introduce systematically biased errors that accumulate over sequences, thereby destabilizing gradient estimation. Instead of applying post-hoc corrections, we propose Dynamic Vocabulary Pruning (DVP), which constrains the RL objective to a dynamically determined ''safe'' vocabulary that excludes the extreme tail. This strategy trades large, destabilizing numerical errors for a small, bounded optimization bias. We validate DVP empirically by demonstrating stable training, and theoretically by deriving strict bounds on the induced bias.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。