Saved in:
Bibliographic Details
Main Authors: Li, Zhouyang, Liu, Yuliang, Zhang, Wei, Yuan, Tailing, Chen, Bin, Song, Chengru, Zhang, Di
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.14519
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912337705828352
author Li, Zhouyang
Liu, Yuliang
Zhang, Wei
Yuan, Tailing
Chen, Bin
Song, Chengru
Zhang, Di
author_facet Li, Zhouyang
Liu, Yuliang
Zhang, Wei
Yuan, Tailing
Chen, Bin
Song, Chengru
Zhang, Di
contents Pipeline Parallelism (PP) serves as a crucial technique for training Large Language Models (LLMs), owing to its capability to alleviate memory pressure from model states with relatively low communication overhead. However, in long-context scenarios, existing pipeline parallelism methods fail to address the substantial activation memory pressure, primarily due to the peak memory consumption resulting from the accumulation of activations across multiple microbatches. Moreover, these approaches inevitably introduce considerable pipeline bubbles, further hindering efficiency. To tackle these challenges, we propose SlimPipe, a novel approach to fine-grained pipeline parallelism that employs uniform sequence slicing coupled with one-forward-one-backward (1F1B) schedule. It reduces the accumulated activations from several microbatches to just one, which is split into several slices. Although the slices are evenly partitioned, the computation cost is not equal across slices due to causal attention. We develop a sophisticated workload redistribution technique to address this load imbalance. SlimPipe achieves (1) near-zero memory overhead and (2) minimal pipeline bubbles simultaneously. The effectiveness of SlimPipe has been proven by thorough testing with diverse model architectures, context window sizes, and SlimPipe-specific configurations. For example, on the Llama 70B model, compared to state-of-the-art methods, SlimPipe significantly boosts the Model FLOPs Utilization (MFU) to up to $1.57\times$ for a context length of 512K. More notably, for a context length of 2048K, it maintains over 45% utilization on 256 NVIDIA Hopper 80GB GPUs, while other approaches either suffer significant performance drops or fail entirely due to memory constraints.
format Preprint
id arxiv_https___arxiv_org_abs_2504_14519
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SlimPipe: Memory-Thrifty and Efficient Pipeline Parallelism for Long-Context LLM Training
Li, Zhouyang
Liu, Yuliang
Zhang, Wei
Yuan, Tailing
Chen, Bin
Song, Chengru
Zhang, Di
Machine Learning
Artificial Intelligence
Pipeline Parallelism (PP) serves as a crucial technique for training Large Language Models (LLMs), owing to its capability to alleviate memory pressure from model states with relatively low communication overhead. However, in long-context scenarios, existing pipeline parallelism methods fail to address the substantial activation memory pressure, primarily due to the peak memory consumption resulting from the accumulation of activations across multiple microbatches. Moreover, these approaches inevitably introduce considerable pipeline bubbles, further hindering efficiency. To tackle these challenges, we propose SlimPipe, a novel approach to fine-grained pipeline parallelism that employs uniform sequence slicing coupled with one-forward-one-backward (1F1B) schedule. It reduces the accumulated activations from several microbatches to just one, which is split into several slices. Although the slices are evenly partitioned, the computation cost is not equal across slices due to causal attention. We develop a sophisticated workload redistribution technique to address this load imbalance. SlimPipe achieves (1) near-zero memory overhead and (2) minimal pipeline bubbles simultaneously. The effectiveness of SlimPipe has been proven by thorough testing with diverse model architectures, context window sizes, and SlimPipe-specific configurations. For example, on the Llama 70B model, compared to state-of-the-art methods, SlimPipe significantly boosts the Model FLOPs Utilization (MFU) to up to $1.57\times$ for a context length of 512K. More notably, for a context length of 2048K, it maintains over 45% utilization on 256 NVIDIA Hopper 80GB GPUs, while other approaches either suffer significant performance drops or fail entirely due to memory constraints.
title SlimPipe: Memory-Thrifty and Efficient Pipeline Parallelism for Long-Context LLM Training
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2504.14519