arXiv:2504.15930cs.LGcs.DC2025-04被引 58

StreamRL通过解耦生成与训练,实现大模型强化学习的高效弹性部署。

StreamRL: Scalable, Heterogeneous, and Elastic RL for LLMs with Disaggregated Stream Generation

  • 采用流式生成打破阶段依赖,实现异步流水线全重叠。
  • 引入输出长度排序模型,减少长尾样本延迟,提升吞吐2.66倍。
  • 支持跨数据中心异构资源部署,成本效率提升1.33倍,适合大规模训练场景。

强化学习(RL)已成为大语言模型(LLM)后训练的核心技术。LLM的RL包含生成与训练两阶段:模型在线生成样本,再据此计算奖励进行训练。传统观点认为,资源共置架构(时间复用)优于解耦架构,但实际部署中,共置架构存在资源耦合问题,限制了可扩展性与成本效率。相比之下,解耦架构支持灵活资源分配、异构训练配置,并便于跨数据中心部署。StreamRL从设计之初即基于解耦思想,针对现有解耦框架的两大性能瓶颈——由阶段依赖导致的流水线空洞,以及由长尾输出长度分布引发的偏差空洞——提出解决方案。为缓解流水线空洞,StreamRL通过流式生成打破同步算法的传统阶段边界,实现异步流水线全重叠;为应对偏差空洞,引入输出长度排序模型,识别长尾样本,并通过感知偏度的调度策略降低生成耗时。实验表明,StreamRL相比现有最先进系统,吞吐提升最高达2.66倍,在异构跨数据中心环境下成本效率提升最高达1.33倍。

原文摘要 · Abstract (English)

Reinforcement learning (RL) has become the core post-training technique for large language models (LLMs). RL for LLMs involves two stages: generation and training. The LLM first generates samples online, which are then used to derive rewards for training. The conventional view holds that the colocated architecture, where the two stages share resources via temporal multiplexing, outperforms the disaggregated architecture, in which dedicated resources are assigned to each stage. However, in real-world deployments, we observe that the colocated architecture suffers from resource coupling, where the two stages are constrained to use the same resources. This coupling compromises the scalability and cost-efficiency of colocated RL in large-scale training. In contrast, the disaggregated architecture allows for flexible resource allocation, supports heterogeneous training setups, and facilitates cross-datacenter deployment. StreamRL is designed with disaggregation from first principles and fully unlocks its potential by addressing two types of performance bottlenecks in existing disaggregated RL frameworks: pipeline bubbles, caused by stage dependencies, and skewness bubbles, resulting from long-tail output length distributions. To address pipeline bubbles, StreamRL breaks the traditional stage boundary in synchronous RL algorithms through stream generation and achieves full overlapping in asynchronous RL. To address skewness bubbles, StreamRL employs an output-length ranker model to identify long-tail samples and reduces generation time via skewness-aware dispatching and scheduling. Experiments show that StreamRL improves throughput by up to 2.66x compared to existing state-of-the-art systems, and improves cost-effectiveness by up to 1.33x in a heterogeneous, cross-datacenter setting.

强化学习大模型训练分布式系统流式生成

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