Abstract
As Large Language Models (LLMs) scale to hundreds of billions of parameters, distributed training becomes essential. However, standard Tensor Parallelism (TP) introduces significant communication overhead that often resides on the critical path of execution. This paper presents Domino, a novel system from Microsoft DeepSpeed that eliminates these bottlenecks through generic tensor slicing and fine-grained overlapping. By partitioning tensors along the independent batch dimension and pipelining micro-pieces, Domino achieves up to a 1.3x speedup over state-of-the-art frameworks like Megatron-LM, effectively hiding nearly 100% of communication latency in various configurations.
Introduction: The Communication Bottleneck in Tensor Parallelism
Training modern LLMs requires distributing workloads across thousands of GPUs. Tensor Parallelism (TP) is a cornerstone of this distribution, splitting individual model layers across multiple devices. While effective for scaling model size, TP has a significant drawback: it requires frequent synchronization, specifically "AllReduce" operations, at every layer.
As shown in Figure 2, communication can account for a substantial portion of total training time—up to 45% in some configurations. As hardware accelerators like NVIDIA’s H100 continue to increase computational throughput, the relative cost of communication grows, leaving GPUs idle while waiting for data transfers across the network. This "communication wall" limits the overall efficiency of large-scale training clusters.
Methodology: Generic Tensor Slicing and Overlapping
Domino addresses this bottleneck by breaking the rigid data dependencies of standard TP. The system introduces two primary innovations: Generic Tensor Slicing and Fine-Grained Overlapping.
Generic Tensor Slicing
Unlike previous methods that are limited to specific mathematical operations, Domino leverages the inherent independence of the batch dimension in transformer layers. By performing a row-wise split on input data (the batch dimension) and a column-wise split on weights, Domino creates smaller, independent units of work. This approach is generic, allowing the system to hide communication behind a wide range of operations, including LayerNorm, Dropout, and activation functions.
Intra-layer and Inter-layer Overlap
By breaking a single training iteration into these smaller "micro-pieces," Domino can pipeline execution. While the GPU computes the second piece of a batch, it simultaneously communicates the results of the first piece in the background.
As illustrated in Figure 5, Domino enables both intra-layer overlap (overlapping communication of a sub-batch with the computation of the next sub-batch within the same layer) and inter-layer overlap (overlapping the final communication of the current layer with the initial computation of the subsequent layer). This dual-layer pipelining effectively smooths the execution timeline and maximizes GPU utilization.
System-Level Optimizations
To mitigate the overhead of managing many small kernels, Domino employs several system-level optimizations:
- CUDA MultiStream: Enables true parallel execution of compute and communication kernels.
- CudaGraph and torch.compile: Minimizes the latency between kernel launches, ensuring that the benefits of overlapping are not lost to CPU-side management overhead.
- Pre-allocated Buffers: Reduces memory fragmentation and management costs associated with slicing tensors into numerous pieces.
Evaluation and Key Results
The authors evaluated Domino using GPT-3 and Llama-2 architectures on NVIDIA DGX-H100 nodes. The results demonstrate significant improvements over the baseline Megatron-LM:
- Throughput Speedup: Domino achieved up to a 1.3x speedup in training throughput.
- Communication Hiding: In many tested configurations, Domino successfully hid ~100% of communication behind computation.
- Scaling Efficiency: On multi-node setups (up to 4 nodes/32 GPUs), Domino maintained high efficiency, outperforming the baseline by 15-20% on average. Remarkably, Domino reached over 90% of the theoretical "Optimal" throughput (where communication is assumed to take zero time).
Conclusion and Future Work
Domino represents a significant step forward in optimizing distributed LLM training by making communication overhead virtually transparent. While the current implementation shows impressive gains, future work will focus on optimizing complex dependencies like Rotary Positional Embeddings (RoPE) and exploring performance at the scale of thousands of GPUs where network congestion becomes a primary factor. By leveraging the independence of the batch dimension, Domino provides a generic and powerful framework for the next generation of large-scale AI training.
Summary updated