Memory-Efficient Pipeline-Parallel DNN Training
Deepak Narayanan, Amar Phanishayee, Kaiyu Shi, Xie Chen, Matei Zaharia
Abstract
Many state-of-the-art results in domains such as NLP and computer vision have been obtained by scaling up the number of parameters in existing models. However, the weight parameters and intermediate outputs of these large models often do not fit in the main memory of a single accelerator device; this means that it is necessary to use multiple accelerators to train large models, which is challenging to do in a time-efficient way. In this work, we propose PipeDream-2BW, a system that performs memory-efficient pipeline parallelism, a hybrid form of parallelism that combines data and model parallelism with input pipelining. Our system uses a novel pipelining and weight gradient coalescing strategy, combined with the double buffering of weights, to ensure high throughput, low memory footprint, and weight update semantics similar to data parallelism. In addition, PipeDream-2BW automatically partitions the model over the available hardware resources, while being cognizant of constraints such as compute capabilities, memory capacities, and interconnect topologies, and determines when to employ existing memory-savings techniques, such as activation recomputation, that trade off extra computation for lower memory footprint. PipeDream-2BW is able to accelerate the training of large language models with up to 2.5 billion parameters by up to 6.9x compared to optimized baselines.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
80 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic Parallelism cites Efficient large-scale language model training on GPU clusters using megatron-LM
- Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic Parallelism cites DAPPLE: a pipelined data parallel approach for training large models
- Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic Parallelism cites Language Models are Few-Shot Learners
- Efficient large-scale language model training on GPU clusters using megatron-LM cites DAPPLE: a pipelined data parallel approach for training large models
- Efficient large-scale language model training on GPU clusters using megatron-LM cites ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning
- Efficient large-scale language model training on GPU clusters using megatron-LM cites Language Models are Few-Shot Learners
- Decentralized Training of Foundation Models in Heterogeneous Environments cites DAPPLE: a pipelined data parallel approach for training large models
- Decentralized Training of Foundation Models in Heterogeneous Environments cites Language Models are Few-Shot Learners
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning cites Language Models are Few-Shot Learners
- Chimera: efficiently training large-scale neural networks with bidirectional pipelines cites DAPPLE: a pipelined data parallel approach for training large models
- Chimera: efficiently training large-scale neural networks with bidirectional pipelines cites Language Models are Few-Shot Learners
Cited by top-tier papers80
- Efficient large-scale language model training on GPU clusters using megatron-LMDeepak Narayanan, Mohammad Shoeybi, Jared Casper, Patrick LeGresley et al.SC 2021 · 576 citations
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learningSamyam Rajbhandari, Olatunji Ruwase, Jeff Rasley, Shaden Smith et al.SC 2021 · 254 citations
- Decentralized Training of Foundation Models in Heterogeneous EnvironmentsBinhang Yuan, Yongjun He, Jared Davis, Tianyi Zhang et al.NeurIPS 2022 · 157 citations
- Chimera: efficiently training large-scale neural networks with bidirectional pipelinesShigang Li, Torsten HoeflerSC 2021 · 124 citations
- Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic ParallelismXupeng Miao, Yujie Wang, Youhe Jiang, Chunan Shi et al.VLDB 2023 · 113 citations
Builds on2
Related papers
- Group-based Interleaved Pipeline Parallelism for Large-scale DNN TrainingPengcheng Yang, Xiaoming Zhang, Wenpeng Zhang, Ming Yang et al.ICLR 2022 · 13 citations
- Mario: Near Zero-cost Activation Checkpointing in Pipeline ParallelismWeijian Liu, Mingzhen Li, Guangming Tan, Weile JiaPPoPP 2025 · 4 citations
- WeiPipe: Weight Pipeline Parallelism for Communication-Effective Long-Context Large Model TrainingJunfeng Lin, Ziming Liu, Yang You, Jun Wang et al.PPoPP 2025 · 5 citations
- BPipe: Memory-Balanced Pipeline Parallelism for Training Large Language ModelsTaebum Kim, Hyoungjoo Kim, Gyeong-In Yu, Byung-Gon ChunICML 2023 · 34 citations
- PipeOffload: Improving Scalability of Pipeline Parallelism with Memory OptimizationXinyi Wan, Penghui Qi, Guangxing Huang, Min Lin et al.ICML 2025
