arXiv:2509.21009cs.DCcs.LG2025-09被引 35

通过分批处理长尾响应,让强化学习训练更快更高效。

RollPacker: Mitigating Long-Tail Rollouts for Fast, Synchronous RL Post-Training

  • 将长响应集中到少数批次中,减少其他批次的计算空闲时间。
  • 在128张H800 GPU上,训练速度提升2.03至2.56倍。
  • 适合需要快速优化大模型推理能力的研究者与工程师。

强化学习(RL)是提升大语言模型(LLMs)推理能力的关键后训练技术。然而,同步RL训练常因单步生成长度不均导致显著的GPU闲置(称为气泡)。现有系统通过放松同步来缓解,但可能影响训练精度。本文提出尾部批处理(tail batching),一种新的同步RL调度策略:将产生长尾响应的提示集中到少数几轮(长轮次)中,其余多数轮次仅处理短而均衡的响应。通过将长响应从短轮次中移除并重新安排至特定长轮次,该方法有效减少推理阶段的GPU空闲时间,大幅加速训练且不牺牲精度。我们构建了RollPacker系统,通过三阶段协同优化——滚动阶段弹性并行适配、奖励阶段动态资源分配与调度、训练阶段流式处理——全面释放尾部批处理优势。实验表明,相较于veRL,RollPacker在Qwen2.5系列模型上实现2.03x–2.56x的端到端训练时间降低;相比RLHFuse,最高提速达2.24x,部署规模达128张H800 GPU。

原文摘要 · Abstract (English)

Reinforcement Learning (RL) is a pivotal post-training technique for enhancing the reasoning capabilities of Large Language Models (LLMs). However, synchronous RL post-training often suffers from significant GPU underutilization, referred to as bubbles, caused by imbalanced response lengths within rollout steps. Many RL systems attempt to alleviate this problem by relaxing synchronization, but this can compromise training accuracy. In this paper, we introduce tail batching, a novel rollout scheduling strategy for synchronous RL that systematically consolidates prompts leading to long-tail responses into a small subset of rollout steps (long rounds), while ensuring that the majority of steps (short rounds) involve only balanced, short rollouts. By excluding long responses from short rounds and rescheduling them into a few designated long rounds, tail batching effectively reduces GPU idle time during rollouts and significantly accelerates RL training without sacrificing accuracy. We present RollPacker, a system that fully harnesses the benefits of tail batching through holistic optimizations across all three RL stages: elastic parallelism adaptation for rollout, dynamic resource allocation and scheduling for reward, and stream-based training. Empirical results show that RollPacker achieves a 2.03x-2.56x end-to-end training time reduction compared to veRL and up to 2.24x speedup compared to RLHFuse for the Qwen2.5 family of LLMs on up to 128 H800 GPUs.

强化学习大模型训练性能优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。