Abstract
The dominant paradigm for RLHF is online and on-policy RL: synchronously generating from the large language model (LLM) policy, labelling with a reward model, and learning using feedback on the LLM's own outputs. While performant, this paradigm is computationally inefficient. Inspired by classical deep RL literature, we propose separating generation and learning in RLHF. This enables asynchronous generation of new samples while simultaneously training on old samples, leading to faster training and more compute-optimal scaling. However, asynchronous training relies on an underexplored regime, online but off-policy RLHF: learning on samples from previous iterations of our model. To understand the challenges in this regime, we investigate a fundamental question: how much off-policyness can we tolerate for asynchronous training to speed up learning but maintain performance? Among several RLHF algorithms we tested, we find that online DPO is most robust to off-policy data, and robustness increases with the scale of the policy model. We study further compute optimizations for asynchronous RLHF but find that they come at a performance cost, giving rise to a trade-off. Finally, we verify the scalability of asynchronous RLHF by training LLaMA 3.1 8B on an instruction-following task 40% faster than a synchronous run while matching final performance.
Abstract (translated)
在RLHF(通过人类反馈进行强化学习)中,主导范式是在线且随策略的强化学习:同步地从大规模语言模型(LLM)生成策略,用奖励模型进行标注,并利用对LLM自身输出的反馈进行学习。尽管这种范式表现良好,但它计算效率低下。受经典深度RL文献启发,我们提出在RLHF中分离生成和学习过程。这使得可以在异步生成新样本的同时,同步训练旧样本,从而实现更快的训练和更高效的计算扩展。然而,异步训练依赖于一个较少被探索的领域,即在线但非随策略的RLHF:利用先前模型迭代产生的样本来进行学习。为了理解这一领域的挑战,我们探讨了一个基本问题:为加快学习并保持性能,我们可以容忍多少偏离策略的数据?在测试了几种RLHF算法后,我们发现,在线DPO(分布调整优化)对非随策略数据最具有鲁棒性,并且这种鲁棒性随着策略模型规模的增加而增强。我们进一步研究了异步RLHF的计算优化方法,但发现这些优化会带来性能上的代价,从而产生了一种权衡关系。最后,通过在一个指令遵循任务上用LLaMA 3.1 8B进行训练,并以比同步运行快40%的速度达到相同的最终性能,我们验证了异步RLHF的可扩展性。
URL
https://arxiv.org/abs/2410.18252