Saved in:
Bibliographic Details
Main Authors: Sheng, Guangming, Zhang, Chi, Ye, Zilingfeng, Wu, Xibin, Zhang, Wang, Zhang, Ru, Peng, Yanghua, Lin, Haibin, Wu, Chuan
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.19256
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912054964649984
author Sheng, Guangming
Zhang, Chi
Ye, Zilingfeng
Wu, Xibin
Zhang, Wang
Zhang, Ru
Peng, Yanghua
Lin, Haibin
Wu, Chuan
author_facet Sheng, Guangming
Zhang, Chi
Ye, Zilingfeng
Wu, Xibin
Zhang, Wang
Zhang, Ru
Peng, Yanghua
Lin, Haibin
Wu, Chuan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2409_19256
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle HybridFlow: A Flexible and Efficient RLHF Framework
Sheng, Guangming
Zhang, Chi
Ye, Zilingfeng
Wu, Xibin
Zhang, Wang
Zhang, Ru
Peng, Yanghua
Lin, Haibin
Wu, Chuan
Machine Learning
Distributed, Parallel, and Cluster Computing
I.2
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.
title HybridFlow: A Flexible and Efficient RLHF Framework
topic Machine Learning
Distributed, Parallel, and Cluster Computing
I.2
url https://arxiv.org/abs/2409.19256