Abstract
As machine learning models scale toward trillion-parameter architectures, the efficiency of distributed training and inference becomes a critical bottleneck. Traditional "one-size-fits-all" parallelization strategies often fail to account for the complex interplay between model architecture and hardware interconnects, leading to significant "exposed communication" overhead. This paper introduces MAD-Max, an agile performance modeling framework that predicts distributed ML behavior with high accuracy. By simulating a vast design space of parallelization mappings and hardware-software co-design opportunities, MAD-Max enables throughput gains of up to 2.24× for pre-training and 5.27× for inference compared to industry-standard baselines like FSDP.
Introduction
Training and deploying large-scale models is no longer just a computational challenge; it is a massive logistics problem. When models are split across hundreds or thousands of GPUs, the time spent on inter-device communication can account for 14–32% of total execution time. This "exposed communication"—where GPUs wait for data transfers rather than performing math—drastically reduces system efficiency. Current industry practices rely on trial-and-error to find optimal parallelization strategies, a process that is both slow and prohibitively expensive. MAD-Max addresses this by providing a fast, accurate simulation framework to replace manual guesswork.
Methodology: The MAD-Max Framework
MAD-Max operates by generating per-device execution traces through a five-stage modeling process. It treats model components, such as MLP compute blocks or embedding bags, as discrete units with specific hardware requirements (FLOPs vs. memory bandwidth). Users provide configurations detailing model architecture, hardware specifications (e.g., H100 peak bandwidth), and parallelization strategies.
The framework simulates various strategies, including Fully Sharded Data Parallel (FSDP), Tensor Parallel (TP), and Distributed Data Parallel (DDP), as shown in Figure 6. It then stitches individual layer traces into a unified timeline, estimates communication collective times (e.g., AllReduce, All2All) based on the specific interconnect fabric (NVLink, RoCE, or InfiniBand), and performs an overlap analysis to determine how much communication can be hidden behind computation.
Experimental Setup
The authors validated MAD-Max using a diverse suite of production-scale models and traces:
- Recommendation Models: DLRM variants (A, B, and C), including Transformer and Mixture-of-Experts (MoE) versions.
- Large Language Models (LLMs): GPT-3 (175B), LLaMA (65B), and LLaMA 2 (70B).
- Computer Vision: Vision Transformer (ViT) models ranging from 300M to 120B parameters.
- Hardware Platforms: Validation was conducted on NVIDIA A100 clusters (ZionEX) and AWS
p4d.24xlargeinstances.
Key Results and Performance Gains
MAD-Max demonstrates high reliability, achieving 97% accuracy in predicting serialized execution time and 91% accuracy for overlapped execution. By identifying superior parallelization mappings, the framework unlocked significant speedups. For specific DLRM workloads, MAD-Max identified configurations that reduced operational energy consumption and compute resource requirements by up to 21%.
As illustrated in Figure 1, MAD-Max enables the discovery of a new resource-performance Pareto front. While standard FSDP provides a baseline, MAD-Max identifies mappings that significantly reduce the aggregate GPU-hours required per 1B samples while simultaneously reducing elapsed time. This shift represents a major leap in distributed system efficiency.
Discussion and Insights
The study revealed several critical insights for distributed ML:
- The DLRM vs. LLM Divide: Recommendation models are primarily bottlenecked by memory capacity and bandwidth, whereas LLMs are compute-bound. Strategies must be tailored accordingly.
- Hierarchical Parallelization: The sequence of sharding versus replication in multi-node clusters is critical; incorrect ordering leads to Out-of-Memory (OOM) errors or severe performance degradation.
- Hardware-Software Co-design: Upgrading individual components like GPU speed yields sub-linear gains. True performance "unlocks" require joint optimization of compute, memory, and interconnect bandwidth.
Conclusion and Future Work
MAD-Max provides a powerful tool for navigating the complexities of distributed ML. While currently focused on macro-level scheduling and static execution, future iterations may explore dynamic scheduling and micro-level kernel optimizations. By open-sourcing MAD-Max, the researchers aim to allow the community to explore the massive design space of distributed ML without the need for exhaustive, high-cost GPU experimentation.
Summary updated