提出混合架构提升大模型对齐训练效率,兼顾灵活与高性能。
HybridFlow: A Flexible and Efficient RLHF Framework

- 融合单控制器与多控制器优势,解耦计算与通信调度
- 实现1.53至20.57倍的训练吞吐提升,零内存冗余
- 适合需要高效执行RLHF算法的研发团队使用
强化学习从人类反馈(RLHF)广泛应用于大语言模型对齐。传统强化学习可建模为数据流,每个节点代表神经网络计算,每条边表示神经网络间的数据依赖。RLHF通过将每个节点扩展为分布式大模型训练或生成程序,将每条边变为多对多广播,使数据流复杂化。传统框架采用单一控制器调度节点内计算与节点间通信,因分布式节点内调度开销大而效率低下。现有系统采用多控制器范式,但因嵌套分布式计算与通信而缺乏灵活性。本文提出 HybridFlow,以混合方式结合单控制器与多控制器范式,实现对复杂RLHF数据流的灵活表达与高效执行。设计分层API,解耦并封装计算与数据依赖,支持高效算法编排与跨设备灵活映射。进一步设计3D-HybridEngine,实现训练与生成阶段演员模型的高效重切分,无内存冗余且通信开销显著降低。实验表明,相比最先进基线,HybridFlow在运行多种RLHF算法时,吞吐提升达1.53×至20.57×。源码将发布于https://github.com/volcengine/verl。
原文摘要 · Abstract (English)
Reinforcement Learning from Human Feedback (RLHF) is widely used in Large Language Model (LLM) alignment. Traditional RL can be modeled as a dataflow, where each node represents computation of a neural network (NN) and each edge denotes data dependencies between the NNs. RLHF complicates the dataflow by expanding each node into a distributed LLM training or generation program, and each edge into a many-to-many multicast. Traditional RL frameworks execute the dataflow using a single controller to instruct both intra-node computation and inter-node communication, which can be inefficient in RLHF due to large control dispatch overhead for distributed intra-node computation. Existing RLHF systems adopt a multi-controller paradigm, which can be inflexible due to nesting distributed computation and data communication. We propose HybridFlow, which combines single-controller and multi-controller paradigms in a hybrid manner to enable flexible representation and efficient execution of the RLHF dataflow. We carefully design a set of hierarchical APIs that decouple and encapsulate computation and data dependencies in the complex RLHF dataflow, allowing efficient operation orchestration to implement RLHF algorithms and flexible mapping of the computation onto various devices. We further design a 3D-HybridEngine for efficient actor model resharding between training and generation phases, with zero memory redundancy and significantly reduced communication overhead. Our experimental results demonstrate 1.53$\times$~20.57$\times$ throughput improvement when running various RLHF algorithms using HybridFlow, as compared with state-of-the-art baselines. HybridFlow source code will be available at https://github.com/volcengine/verl.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。