Efficient large-scale language model training on GPU clusters using megatron-LM
Deepak Narayanan, Mohammad Shoeybi, Jared Casper, Patrick LeGresley, Mostofa Patwary, Vijay Korthikanti, Dmitri Vainbrand, Prethvi Kashinkunti, Julie Bernauer, Bryan Catanzaro, Amar Phanishayee, Matei Zaharia
摘要
Large language models have led to state-of-the-art accuracies across several tasks. However, training these models efficiently is challenging because: a) GPU memory capacity is limited, making it impossible to fit large models on even a multi-GPU server, and b) the number of compute operations required can result in unrealistically long training times. Consequently, new methods of model parallelism such as tensor and pipeline parallelism have been proposed. Unfortunately, naive usage of these methods leads to scaling issues at thousands of GPUs. In this paper, we show how tensor, pipeline, and data parallelism can be composed to scale to thousands of GPUs. We propose a novel interleaved pipelining schedule that can improve throughput by 10+% with memory footprint comparable to existing approaches. Our approach allows us to perform training iterations on a model with 1 trillion parameters at 502 petaFLOP/s on 3072 GPUs (per-GPU throughput of 52% of theoretical peak).
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 291 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Memory-Efficient Pipeline-Parallel DNN Training 引用了 Language Models are Few-Shot Learners
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model 引用了 Language Models are Few-Shot Learners
- DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale 引用了 ZeRO: memory optimizations toward training trillion parameter models
- DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale 引用了 ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning
- DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale 引用了 Language Models are Few-Shot Learners
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU 引用了 DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU 引用了 ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU 引用了 Language Models are Few-Shot Learners
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU 引用了 ZeRO-Offload: Democratizing Billion-Scale Model Training
- Scaling Data-Constrained Language Models 引用了 Language Models are Few-Shot Learners
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning 引用了 ZeRO: memory optimizations toward training trillion parameter models
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning 引用了 Memory-Efficient Pipeline-Parallel DNN Training
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learning 引用了 Language Models are Few-Shot Learners
- ZeRO-Offload: Democratizing Billion-Scale Model Training 引用了 ZeRO: memory optimizations toward training trillion parameter models
- MegaScale: Scaling Large Language Model Training to More Than 10, 000 GPUs 引用了 ZeRO: memory optimizations toward training trillion parameter models
- MegaScale: Scaling Large Language Model Training to More Than 10, 000 GPUs 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper291
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning 等NeurIPS 2023 · 10,924 次引用
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUYing Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li 等ICML 2023 · 683 次引用
- Scaling Data-Constrained Language ModelsNiklas Muennighoff, Alexander M. Rush, Boaz Barak, Teven Le Scao 等NeurIPS 2023 · 475 次引用
- MegaScale: Scaling Large Language Model Training to More Than 10, 000 GPUsZiheng Jiang, Haibin Lin, Yinmin Zhong, Qi Huang 等NSDI 2024 · 415 次引用
- DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented ScaleReza Yazdani Aminabadi, Samyam Rajbhandari, Ammar Ahmad Awan, Cheng Li 等SC 2022 · 276 次引用
它引用的 Paper8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用
- ZeRO-Offload: Democratizing Billion-Scale Model TrainingJie Ren, Samyam Rajbhandari, Reza Yazdani Aminabadi, Olatunji Ruwase 等USENIX ATC 2021 · 657 次引用
- Memory-Efficient Pipeline-Parallel DNN TrainingDeepak Narayanan, Amar Phanishayee, Kaiyu Shi, Xie Chen 等ICML 2021 · 283 次引用
- ZeRO-infinity: breaking the GPU memory wall for extreme scale deep learningSamyam Rajbhandari, Olatunji Ruwase, Jeff Rasley, Shaden Smith 等SC 2021 · 254 次引用
相关 Paper
- BPipe: Memory-Balanced Pipeline Parallelism for Training Large Language ModelsTaebum Kim, Hyoungjoo Kim, Gyeong-In Yu, Byung-Gon ChunICML 2023 · 34 次引用
- Synergistic Tensor and Pipeline ParallelismMengshi Qi, Jiaxuan Peng, Jie M. Zhang, Juan Zhu 等NeurIPS 2025 · 2 次引用
- TeraPipe: Token-Level Pipeline Parallelism for Training Large-Scale Language ModelsZhuohan Li, Siyuan Zhuang, Shiyuan Guo, Danyang Zhuo 等ICML 2021 · 160 次引用
- MixPipe: Efficient Bidirectional Pipeline Parallelism for Training Large-Scale ModelsWeigang Zhang, Biyu Zhou, Xuehai Tang, Zhaoxing Wang 等DAC 2023 · 9 次引用
- Chimera: efficiently training large-scale neural networks with bidirectional pipelinesShigang Li, Torsten HoeflerSC 2021 · 124 次引用
