HybridFlow: A Flexible and Efficient RLHF Framework

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.

Adam: A Method forStochastic OptimizationAdam: A Method for Stochastic OptimizationTraining Verifiers toSolve Math Word ProblemsTraining Verifiers to Solve Math Word ProblemsWebGPT: Browser-assistedquestion-answering with…WebGPT: Browser-assisted question-answering with human feedbackTraining language modelsto follow instructions…Training language models to follow instructions with human feedbackLlama 2: Open Foundationand Fine-Tuned Chat…Llama 2: Open Foundation and Fine-Tuned Chat ModelsRRHF: Rank Responses toAlign Language Models…RRHF: Rank Responses to Align Language Models with Human Feedback without tearsDeepSpeed-Chat: Easy,Fast and Affordable RLH…DeepSpeed-Chat: Easy, Fast and Affordable RLHF Training of ChatGPT-like Models at All ScalesDeepSeekMath: Pushingthe Limits of…DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language ModelsReMax: A Simple,Effective, and Efficien…ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language ModelsIs DPO Superior to PPOfor LLM Alignment? A…Is DPO Superior to PPO for LLM Alignment? A Comprehensive StudyDiagnosingNon-Intermittent…Diagnosing Non-Intermittent Anomalies in Reinforcement Learning Policy Executions (Short Paper)RLAIF vs. RLHF: ScalingReinforcement Learning…RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI FeedbackDAPO: An Open-Source LLMReinforcement Learning…DAPO: An Open-Source LLM Reinforcement Learning System at ScaleSearch-R1: Training LLMsto Reason and Leverage…Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement LearningReaLHF: Optimized RLHFTraining for Large…ReaLHF: Optimized RLHF Training for Large Language Models through Parameter ReallocationThe SurprisingEffectiveness of…The Surprising Effectiveness of Negative Reinforcement in LLM ReasoningFirst Return,Entropy-Eliciting…First Return, Entropy-Eliciting ExploreSimpleVLA-RL: ScalingVLA Training via…SimpleVLA-RL: Scaling VLA Training via Reinforcement LearningReward Reasoning ModelReward Reasoning ModelCritique-GRPO: AdvancingLLM Reasoning with…Critique-GRPO: Advancing LLM Reasoning with Natural Language and Numerical FeedbackAgentGym-RL: TrainingLLM Agents for…AgentGym-RL: Training LLM Agents for Long-Horizon Decision Making through Multi-Turn Reinforcement LearningLearn the Ropes, ThenTrust the Wins…Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement LearningDCPO: Dynamic ClippingPolicy OptimizationDCPO: Dynamic Clipping Policy OptimizationAgentOCR: ReimaginingAgent History via…AgentOCR: Reimagining Agent History via Optical Self-CompressionHybridFlow: A Flexibleand Efficient RLHF…HybridFlow: A Flexible and Efficient RLHF FrameworkEarlier referencesFocus paperCiting papersOlderNewer

Click a node to pin it, click the empty canvas to go back to this paper, or hover to preview. Open a node’s page from its title.