[Paper Review] Whale: Efficient Giant Model Training over Heterogeneous GPUs
Whale is a high-level deep learning framework that enables efficient, scalable training of trillion-parameter models across heterogeneous GPUs by introducing two model annotation primitives for unified expression of mixed parallel strategies. It automates distributed graph optimization and hardware-aware load balancing, achieving 10 trillion parameter training on 512 V100 GPUs with minimal code changes and high efficiency.
The scaling up of deep neural networks has been demonstrated to be effective in improving model quality, but also encompasses several training challenges in terms of training efficiency, programmability, and resource adaptability. We present Whale, a general and efficient distributed training framework for giant models. To support various parallel strategies and their hybrids, Whale generalizes the programming interface by defining two new primitives in the form of model annotations, allowing for incorporating user hints. The Whale runtime utilizes those annotations and performs graph optimizations to transform a local deep learning DAG graph for distributed multi-GPU execution. Whale further introduces a novel hardware-aware parallel strategy, which improves the performance of model training on heterogeneous GPUs in a balanced manner. Deployed in a production cluster with 512 GPUs, Whale successfully trains an industry-scale multimodal model with over ten trillion model parameters, named M6, demonstrating great scalability and efficiency.
Motivation & Objective
- To address the challenges of training giant deep learning models with trillions of parameters across heterogeneous GPU clusters.
- To reduce user effort in manually managing complex parallelism strategies like data, model, and pipeline parallelism.
- To bridge the gap between model development and heterogeneous hardware environments through runtime-aware optimization.
- To enable seamless scaling from 100B to 10T parameters without code changes.
- To support hybrid parallelism strategies with minimal performance overhead through automated graph rewriting.
Proposed method
- Introduces two high-level primitives via model annotations to express all parallel strategies and their hybrids, decoupling programming from low-level distribution logic.
- Uses these annotations to guide automated graph optimization, transforming local computation graphs into efficient distributed execution plans.
- Employs a hardware-aware load balancing algorithm that maps model partitions to GPUs based on compute and memory capacity, improving resource utilization.
- Applies graph substitution and pattern matching to rewrite computation graphs for efficient execution across multiple GPUs with mixed capabilities.
- Integrates with TensorFlow and supports automatic distribution of model components, including tensor and pipeline parallelism, without manual device placement.
- Leverages tensor offloading and memory optimization techniques to scale beyond GPU memory limits, enabling 10 trillion parameter training.
Experimental results
Research questions
- RQ1How can a deep learning framework efficiently support mixed parallelism strategies (e.g., data, model, pipeline) with minimal user effort?
- RQ2Can high-level annotations and automated graph optimization enable efficient training of trillion-parameter models on heterogeneous GPU clusters?
- RQ3How can hardware heterogeneity be effectively managed to balance workloads and avoid bottlenecks in giant model training?
- RQ4What is the performance and scalability of a unified framework across model sizes from 100B to 10T parameters?
- RQ5Can graph optimization techniques be effectively applied to distributed training at scale, especially with complex hybrid parallelism?
Key findings
- Whale successfully trained a 10 trillion parameter multimodal model (M6) on a 512-GPU cluster using heterogeneous V100 GPUs, demonstrating strong scalability.
- The framework achieved 89.7% reduction in gradient synchronization overhead by combining data and model parallelism on different model components.
- Training scaled from 100 billion to 10 trillion parameters without code changes, highlighting its flexibility and usability.
- The hardware-aware load balancing algorithm improved performance on heterogeneous GPUs by balancing computation and memory workloads effectively.
- Whale outperformed existing frameworks by reducing user effort through high-level abstractions while maintaining high efficiency and scalability.
- The framework achieved efficient training of a 1 trillion parameter model on 480 V100 GPUs, comparable to state-of-the-art on 2048 TPU cores.
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.