nnScaler: Constraint-Guided Parallelization Plan Generation for Deep Learning Training
Zhiqi Lin, Youshan Miao, Quanlu Zhang, Fan Yang, Yi Zhu, Cheng Li, Saeed Maleki, Xu Cao, Ning Shang, Yilei Yang, Weijiang Xu, Mao Yang
摘要
With the growing model size of deep neural networks (DNN), deep learning training is increasingly relying on handcrafted search spaces to find efficient parallelization execution plans. However, our study shows that existing search spaces exclude plans that significantly impact the training performance of well-known DNN models (e.g., AlphaFold2) under important settings, such as when handling large embedding tables in large language models.
To address this problem, we propose nnScaler, a framework that generates efficient parallelization plans for deep learning training. Instead of relying on the existing search space, nnScaler advocates a more general approach that empowers domain experts to construct their own search space through three primitives, op-trans, op-assign, and op-order, which capture model transformation and the temporal-spatial scheduling of the transformed model of any parallelization plans. To avoid space explosion, nnScaler allows the application of constraints to those primitives during space construction. With the proposed primitives and constraints, nnScaler can compose existing search spaces as well as new ones. Experiments show that nnScaler can find new parallelization plans in new search spaces that achieve up to 3.5× speedup compared to solutions such as DeepSpeed, Megatron-LM, and Alpa for popular DNN models like Swin-Transformer and AlphaFold2.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- It Takes Two to Entangle 引用了 ZeRO: memory optimizations toward training trillion parameter models
- It Takes Two to Entangle 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 ZeRO: memory optimizations toward training trillion parameter models
- LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 Language Models are Few-Shot Learners
- LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization 引用了 ZeRO: memory optimizations toward training trillion parameter models
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-Optimization 引用了 Language Models are Few-Shot Learners
- Swin Transformer V2: Scaling Up Capacity and Resolution 引用了 ZeRO: memory optimizations toward training trillion parameter models
- Swin Transformer V2: Scaling Up Capacity and Resolution 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Swin Transformer V2: Scaling Up Capacity and Resolution 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper8
- Mist: Efficient Distributed Training of Large Language Models via Memory-Parallelism Co-OptimizationZhanda Zhu, Christina Giannoula, Muralidhar Andoorveedu, Qidong Su 等EuroSys 2025 · 8 次引用
- LoRAFusion: Efficient LoRA Fine-Tuning for LLMsZhanda Zhu, Qidong Su, Yaoyao Ding, Kevin Song 等EuroSys 2026 · 2 次引用
- Sailor: Automating Distributed Training over Dynamic, Heterogeneous, and Geo-distributed ClustersFoteini Strati, Zhendong Zhang, George Manos, Ixeia Sánchez Périz 等SOSP 2025 · 2 次引用
- DIP: Efficient Large Multimodal Model Training with Dynamic Interleaved PipelineZhenliang Xue, Hanpeng Hu, Xing Chen, Yimin Jiang 等ASPLOS 2026 · 1 次引用
- It Takes Two to EntangleZhanghan Wang, Ding Ding, Hang Zhu, Haibin Lin 等ASPLOS 2026
它引用的 Paper23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Swin Transformer V2: Scaling Up Capacity and ResolutionZe Liu, Han Hu, Yutong Lin, Zhuliang Yao 等CVPR 2022 · 2,138 次引用
- ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用
相关 Paper
- Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep LearningLianmin Zheng, Zhuohan Li, Hao Zhang, Yonghao Zhuang 等OSDI 2022 · 75 次引用
- AMP: Automatically Finding Model Parallel Strategies with Heterogeneity AwarenessDacheng Li, Hongyi Wang, Eric P. Xing, Hao ZhangNeurIPS 2022 · 57 次引用
- Aceso: Efficient Parallel DNN Training through Iterative Bottleneck AlleviationGuodong Liu, Youshan Miao, Zhiqi Lin, Xiaoxiang Shi 等EuroSys 2024 · 16 次引用
- Hypertron: Efficiently Scaling Large Models by Exploring High-Dimensional Parallelization SpaceShigang Li, Jingkun Dong, Jihao Chen, Zhi Ma 等SC 2025 · 2 次引用
- H3T: Efficient Integration of Memory Optimization and Parallelism for Large-scale Transformer TrainingYuzhong Wang, Xu Han, Weilin Zhao, Guoyang Zeng 等NeurIPS 2023 · 2 次引用
