2024-10-27 · 进阶 · 自然语言处理 · 机器学习

Asynchronous RLHF: Faster and More Efficient Off-Policy RL for Language Models

该论文提出了异步RLHF方法,通过将生成和训练过程异步化,提高了语言模型RLHF的训练效率。

更新于 2024-11-09。作者:Michael Noukhovitch、Shengyi Huang、Sophie Xhonneux、Arian Hosseini、Rishabh Agarwal、Aaron Courville。

中文摘要

RLHF(基于人类反馈的强化学习)的占主导地位的模式是线上和按策略的RL:同步地从大型语言模型(LLM)中生成策略,使用奖励模型进行标记,并使用LLM自身输出的反馈进行学习。虽然这种方法表现良好,但计算效率不高。受到经典深度RL文献的启发,我们提出在RLHF中分离生成和学习。这使得可以在同时训练旧样本的同时异步生成新样本,从而实现更快的训练和更优的计算扩展。然而,异步训练依赖于一个未被充分探索的机制,即在线但离策略的RLHF:从我们模型的前几轮迭代中学习样本。为了理解这个机制中的挑战,我们调查了一个基本问题:为了加快学习速度但保持性能,我们能够容忍多少离策略性?在我们测试的几个RLHF算法中,我们发现在线DPO对离策略数据最为稳健,且稳健性随着策略模型规模的增加而提高。我们进一步研究了异步RLHF的计算优化,但发现它们以性能成本为代价,产生了权衡。最后,我们通过在遵循指令的任务上以比同步运行快40%的速度训练LLaMA 3.1 8B,验证了异步RLHF的可扩展性,同时保持了最终性能。

英文摘要

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.

解读

一句话总结

该论文提出了异步RLHF方法,通过将生成和训练过程异步化,提高了语言模型RLHF的训练效率。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:现有的RLHF方法主要采用在线和策略RL,这种方法在性能上虽然表现良好,但在计算效率上存在不足。 • 现有方案不足:同步生成和训练导致计算资源利用率低,且生成过程效率不高。 • 研究目标:提出异步RLHF方法,通过分离生成和训练过程,提高训练效率,并保持性能。

问题2:论文的核心创新点是什么?

• 技术创新:提出异步RLHF方法,通过异步生成和训练,提高计算效率。 • 方法改进:使用离策略RLHF,在先前迭代的模型样本上学习。 • 优势:与现有方法相比,异步RLHF在保持性能的同时,显著提高了训练速度和计算效率。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在TLDR摘要任务上进行了实验,比较了同步和异步RLHF的性能。 • 性能提升:异步RLHF在保持性能的同时,将2.8B Pythia模型的训练速度提高了25%。 • 对比结果:异步RLHF在TLDR任务上的性能与同步策略RLHF相当,但在训练速度上有了显著提升。

问题4:这个研究的实际应用价值是什么?

• 应用场景:该方法可以应用于需要RLHF的语言模型训练,如摘要、问答等。 • 实施建议:建议在实际应用中采用异步RLHF方法,以提高训练效率。 • 局限与展望:该方法在生成和训练速度不匹配的情况下可能存在性能损失,未来研究可以探索更有效的优化策略。

来源

机器可读索引:llms.txt