利用历史生成结果的相似性,加速大模型强化学习训练。
History Rhymes: Accelerating LLM Reinforcement Learning with RhymeRL
- 基于历史生成序列相似性,推测下一轮输出以提速推理。
- 实测在数千张GPU上提升2.6倍性能,精度不降。
- 适合大规模强化学习训练场景,尤其重视效率的团队。
随着大语言模型(LLM)的快速发展,强化学习(RL)已成为提升其推理能力的关键方法。与传统预训练不同,RL包含推理、奖励和训练多阶段,需多种工作节点协同。但现有系统存在显著的GPU利用率低下问题,主要源于:(1) 推理阶段因测试时扩展而占据主导;(2) 同一批次内推理长度不均导致GPU空转。尽管异步执行和截断等方案部分缓解问题,常以牺牲精度为代价。我们观察到一个被忽视的现象:相邻训练轮次的推理输出具有高度相似性。基于此,提出RhymeRL系统,包含两项创新:首先,提出HistoSpec——一种基于历史生成序列相似性的推测解码引擎,可生成高精度草案;其次,设计HistoPipe——双层调度策略,利用历史输出分布的相似性均衡各推理工作负载。我们在真实生产环境中评估了该系统,实现从数十到数千张GPU的可扩展性。实验表明,相比现有方法,RhymeRL在不改变强化学习范式且保持精度的前提下,实现了2.6倍的性能提升。
原文摘要 · Abstract (English)
With the rapid advancement of large language models (LLMs), reinforcement learning (RL) has emerged as a pivotal methodology for enhancing the reasoning capabilities of LLMs. Unlike traditional pre-training approaches, RL encompasses multiple stages: rollout, reward, and training, which necessitates collaboration among various worker types. However, current RL systems continue to grapple with substantial GPU underutilization, due to two primary factors: (1) The rollout stage dominates the overall RL process due to test-time scaling; (2) Imbalances in rollout lengths (within the same batch) result in GPU bubbles. While prior solutions like asynchronous execution and truncation offer partial relief, they may compromise training accuracy for efficiency. Our key insight stems from a previously overlooked observation: rollout responses exhibit remarkable similarity across adjacent training epochs. Based on the insight, we introduce RhymeRL, an LLM RL system designed to accelerate RL training with two key innovations. First, to enhance rollout generation, we present HistoSpec, a speculative decoding inference engine that utilizes the similarity of historical rollout token sequences to obtain accurate drafts. Second, to tackle rollout bubbles, we introduce HistoPipe, a two-tier scheduling strategy that leverages the similarity of historical rollout distributions to balance workload among rollout workers. We have evaluated RhymeRL within a real production environment, demonstrating scalability from dozens to thousands of GPUs. Experimental results demonstrate that RhymeRL achieves a 2.6x performance improvement over existing methods, without compromising accuracy or modifying the RL paradigm.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。