Optimizing RLHF Training for Large Language Models with Stage Fusion

Yinmin Zhong, Zili Zhang, Bingyang Wu, Shengyu Liu, Yukun Chen +6 more
9/20/2024
cs.LGcs.CLcs.DC

No official code found. Best implementation: FlexFusion/FlexFusion (31 stars, Apache-2.0, last commit 2025-04-22). 1 more below.

Abstract

We present RLHFuse, an efficient training system with stage fusion for Reinforcement Learning from Human Feedback (RLHF). Due to the intrinsic nature of RLHF training, i.e., the data skewness in the generation stage and the pipeline bubbles in the training stage, existing RLHF systems suffer from low GPU utilization. RLHFuse breaks the traditional view of RLHF workflow as a composition of individual tasks, splitting each task into finer-grained subtasks, and performing stage fusion to improve GPU utilization. RLHFuse contains two key ideas. First, for generation and inference tasks, RLHFuse splits them into sample-level subtasks, enabling efficient inter-stage fusion to overlap the execution of generation and inference stages, thus mitigating the original generation bottleneck dominated by long-tailed samples. Second, for training tasks, RLHFuse breaks them into subtasks of micro-batches and performs intra-stage fusion to concurrently execute these subtasks in the training stage with a fused pipeline schedule, effectively mitigating the pipeline bubbles. The experiments show that RLHFuse increases the training throughput by up to $3.7\times$, compared to existing systems.

View on arXivView PDF

Code Implementations(2)

Optimized GPU memory utilization while performing RLHF using inter-stage and intra-stage fusion, based on the paper "Optimizing RLHF Training for Large Language Models with Stage Fusion"

00PythonNov 24, 202510 months ago
Apache-2.0

The official implementation for the intra-stage fusion technique introduced in https://arxiv.org/abs/2409.13221

312C++, PythonJan 20, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{zhong2024optimizing,
  title  = {Optimizing RLHF Training for Large Language Models with Stage Fusion},
  author = {Yinmin Zhong and Zili Zhang and Bingyang Wu and Shengyu Liu and Yukun Chen and Changyi Wan and Hanpeng Hu and Lei Xia and Ranchen Ming and Yibo Zhu and Xin Jin},
  year   = {2024},
  eprint = {2409.13221},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.13221v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.13221.svg)](https://codeofpaper.com/paper/2409.13221)

Discussion