arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.13545cs.LGstat.ML
收藏

通过随机舍入缩小强化学习后训练中BF16与FP16的收敛速度差距

Closing the BF16-FP16 Convergence Speed Gap in RL Post-Training with Stochastic Rounding

NVIDIA(英伟达)

Mahdi Nazemi, Oleg Rybakov, Tijmen Blankevoort, Asit Mishra, Carlo del Mundo

AI总结:

该研究针对强化学习后训练中BF16收敛慢于FP16的问题,提出用随机舍入量化FP32影子权重为BF16,既匹配FP16收敛速度,又保留BF16宽动态范围且无需损失缩放。

摘要:

BF16因与FP32具有相同的动态范围且收敛特性与FP32训练相似,被广泛用于预训练大语言模型。但在具有可验证奖励的强化学习中,由于学习率通常较低,我们发现标准混合精度BF16训练在相同学习率下的收敛速度比FP16训练更慢。我们将该差距归因于权重停滞:当FP32影子权重使用就近舍入量化为BF16时,微小更新常使用于rollout生成和训练的BF16权重保持不变,因此需要多次优化器步骤才能让影子权重的更新反映到BF16权重中。提高BF16学习率可减少权重停滞并匹配FP16的收敛速度,但也会增加与参考模型的KL散度。我们转而在将FP32影子权重量化为BF16时应用随机舍入,该方法在不同模型和数据集上匹配FP16的收敛速度,同时降低了学习率增大的BF16训练的KL散度;与FP16不同,它保留了BF16更宽的动态范围且无需损失缩放。

英文摘要:

BF16 is widely used to pretrain large language models because it has the same dynamic range as FP32 and converges similarly to FP32 training. However, in reinforcement learning with verifiable rewards, where learning rates are typically low, we find that standard mixed-precision BF16 training converges more slowly than FP16 training at the same learning rate. We attribute this gap to weight sticking: when FP32 shadow weights are quantized to BF16 using round-to-nearest, small updates often leave the BF16 weights used for rollout generation and training unchanged. Consequently, several optimizer steps may be needed before updates to the shadow weights are reflected in the BF16 weights. Raising the BF16 learning rate reduces weight sticking and matches FP16's convergence speed, but it also increases the KL divergence from the reference model. We instead apply stochastic rounding when quantizing the FP32 shadow weights to BF16. This approach matches FP16's convergence speed across different models and datasets while reducing the KL divergence relative to BF16 training with a larger learning rate. Unlike FP16, it keeps BF16's wider dynamic range and needs no loss scaling.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑