[Paper Review] Maximizing Parallelism in Distributed Training for Huge Neural Networks
This paper proposes a novel 3-dimensional model parallelism technique for training huge neural networks, particularly Transformer language models, by distributing linear layer computations across three dimensions (tensor, sequence, and head) to achieve perfect load balancing. It reduces memory and communication costs, demonstrating 2.32× and 1.57× speedup over 1-D and 2-D parallelism on 64 V100 GPUs, respectively.
The recent Natural Language Processing techniques have been refreshing the state-of-the-art performance at an incredible speed. Training huge language models is therefore an imperative demand in both industry and academy. However, huge language models impose challenges to both hardware and software. Graphical processing units (GPUs) are iterated frequently to meet the exploding demand, and a variety of ASICs like TPUs are spawned. However, there is still a tension between the fast growth of the extremely huge models and the fact that Moore's law is approaching the end. To this end, many model parallelism techniques are proposed to distribute the model parameters to multiple devices, so as to alleviate the tension on both memory and computation. Our work is the first to introduce a 3-dimensional model parallelism for expediting huge language models. By reaching a perfect load balance, our approach presents smaller memory and communication cost than existing state-of-the-art 1-D and 2-D model parallelism. Our experiments on 64 TACC's V100 GPUs show that our 3-D parallelism outperforms the 1-D and 2-D parallelism with 2.32x and 1.57x speedup, respectively.
Motivation & Objective
- To address the growing challenge of training extremely large language models that exceed the memory and compute capacity of single devices.
- To reduce communication and memory overhead in distributed model parallelism by introducing a 3-D decomposition of linear layers.
- To achieve perfect load balancing across GPUs in distributed training of huge Transformers.
- To outperform existing 1-D and 2-D model parallelism techniques in both weak and strong scaling scenarios.
Proposed method
- Proposes a 3-D model parallelism algorithm that decomposes linear layers along tensor, sequence, and head dimensions to balance computation and communication.
- Uses a load-balanced data layout to minimize idle time and maximize GPU utilization across all devices.
- Applies a 3D tiling strategy to partition weight matrices and activations across 3D GPU grids, reducing communication volume.
- Integrates with PyTorch’s distributed communication backend and supports mixed-precision training to reduce memory footprint.
- Employs a custom communication schedule that overlaps computation and communication to hide latency.
- Implements a 3D parallel Transformer by extending existing PyTorch implementations with 3D tensor parallelism.
Experimental results
Research questions
- RQ1Can a 3-dimensional model parallelism design achieve better load balancing than 1-D or 2-D approaches in distributed training of large Transformers?
- RQ2Does 3-D parallelism reduce communication and memory costs compared to existing 2-D and 1-D methods?
- RQ3How does the 3-D approach scale in weak and strong scaling scenarios on large GPU clusters?
- RQ4Can the 3-D parallelism achieve higher training throughput while maintaining model accuracy?
Key findings
- On 64 V100 GPUs, the 3-D parallelism achieves a 2.32× speedup over 1-D model parallelism in strong scaling.
- The 3-D approach achieves a 1.57× speedup over 2-D model parallelism on the same hardware setup.
- In weak scaling, the 3-D method shows the slowest increase in average step time, indicating superior scalability and lower communication overhead.
- The 3-D parallelism maintains the smallest average step time across all GPU counts, demonstrating optimal load balancing.
- The approach reduces memory and communication costs by achieving a more balanced distribution of computation and data across GPUs.
- The 3-D method outperforms 1-D and 2-D approaches in both forward and backward pass times, especially at scale.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.