TL;DR
Training massive deep learning models on diverse GPU hardware is a major challenge. Metis introduces an automated system that intelligently finds optimal ways to distribute training across these heterogeneous GPUs, achieving significant speedups and reducing the complexity of manual configuration.
What Problem Does This Paper Address?
The ever-increasing size of deep learning models and the rapid evolution of GPU hardware create a significant challenge for distributed training. Modern computing clusters often feature a mix of different GPU types (e.g., older and newer generations) with varying compute power and memory capacities. Manually configuring how to distribute a model and its training data across such a heterogeneous environment is incredibly complex and time-consuming. Existing automated systems often struggle with this heterogeneity, assuming more uniform hardware, which leads to suboptimal performance, inefficient resource utilization, and can even result in training failures due to memory constraints. This paper tackles the problem of automatically finding efficient parallelism strategies for deep learning models trained on these diverse GPU setups.
Methods
Metis addresses this challenge by developing a holistic system that optimizes several key components:
- Hetero-Aware Search Space: Instead of treating all GPUs as equal, Metis explicitly considers their differences. It expands the search for device groups (combinations of GPUs that work together) and load balancing strategies to account for heterogeneity.
- Efficient Search Algorithm: To navigate the vastly expanded search space, Metis employs a "DP-First DFS" (Depth-First Search) algorithm. This strategy prioritizes data parallelism (DP) as it generally offers better trade-offs than tensor parallelism (TP) for reducing execution time. It also incorporates Out-of-Memory (OOM) detection and adjustment, allowing it to gracefully handle memory constraints by exploring alternative parallelism configurations.
- Cost Model and Profiling: Metis uses a cost model to estimate the execution time and memory usage of different parallelism plans. To reduce the overhead of profiling, it employs smart heuristics:
- For execution time, it profiles individual layers and reuses these metrics for repetitive layers.
- For memory usage, it profiles compositions of layers and leverages insights from homogeneous GPU profiling.
- It also accounts for network bandwidth heterogeneity in its cost estimations.
Datasets
The paper does not explicitly mention specific datasets used for training. However, it evaluates Metis on three large-scale deep learning models:
- GPT-3: A large language model.
- MoE (Mixture-of-Experts): A model architecture that uses conditional computation.
- Wide-ResNet: A deep convolutional neural network.
These models represent diverse architectures and are commonly used benchmarks in the field.
Key Insights and Ideas
- Heterogeneity is Key: The core insight is that simply averaging GPU capabilities or assuming homogeneity leads to suboptimal plans. Explicitly modeling and leveraging the differences between GPUs is crucial for efficient distributed training.
- DP-First is a Smart Heuristic: Prioritizing data parallelism in the search strategy, while still accounting for memory limitations, provides a good balance between exploration efficiency and finding effective plans.
- Smart Profiling Reduces Overhead: The paper demonstrates that it's possible to achieve good accuracy in cost estimation without exhaustive profiling, significantly reducing the time and resources needed.
- Pipeline Parallelism Still Matters: Even for models that fit on a single GPU, Metis shows that leveraging pipeline parallelism with proper load balancing across heterogeneous GPUs can yield significant speedups.
Key Results
- Significant Speedups: Metis achieves training speedups of 1.05x to 8.43x compared to state-of-the-art systems like AMP and Alpa on various heterogeneous GPU configurations and models.
- Reduced Overhead: Metis drastically reduces profiling and searching overheads, by orders of magnitude compared to an "oracle" approach (which exhaustively searches all possibilities). For example, on 64 GPUs, Metis's search time is significantly lower than Alpa's.
- Near-Optimal Plans: Despite the reduced search time, Metis consistently finds near-optimal parallelism plans, often matching or closely approximating the performance of exhaustive search.
- Effective Load Balancing: Metis's hetero-aware load balancing for both data and layers shows a 19% and 22% performance gain over existing approaches in microbenchmarks.
Limitations and Future Work
- Oracle vs. Near-Optimal: While Metis finds near-optimal plans quickly, there's a theoretical possibility of missing the absolute best plan compared to an exhaustive search. The authors suggest dynamic plan adaptation as a future direction, where Metis could find a near-optimal plan quickly and then continue searching for the absolute best plan during training.
- Single Vendor Focus: The current evaluation is primarily on NVIDIA GPUs. The authors believe Metis's principles are generally applicable to multi-vendor GPU environments, but compatibility between different vendor GPUs is an interesting area for future research.
Summary updated