ZeRO++: Extremely Efficient Collective Communication for Giant Model Training

Guanhua Wang, Heyang Qin, Sam Ade Jacobs, Connor Holmes, Samyam Rajbhandari, Olatunji Ruwase, Feng Yan, Lei Yang, Yuxiong HearXiv 2023 · DOI

Abstract

Training giant models with hundreds of billions of parameters is often limited by communication overhead, especially in low-bandwidth cloud environments or at extreme scales. ZeRO++ introduces a suite of communication optimizations for the ZeRO-3 optimizer, reducing cross-node traffic by 4x. Through block-based quantization and hierarchical data partitioning, ZeRO++ enables up to 2.16x higher throughput, making massive-scale AI training efficient even on commodity hardware.

The Communication Bottleneck in Giant Model Training

The Zero Redundancy Optimizer (ZeRO) is a popular framework for distributing massive models across GPU clusters. However, ZeRO-3's design requires frequent "all-gather" and "reduce-scatter" operations to reconstruct weights and average gradients. This "chattiness" becomes a critical bottleneck in two primary scenarios:

  1. Low-Bandwidth Clusters: Many cloud environments have slower inter-node connections (e.g., <100Gbps) compared to specialized supercomputers, leading to significant GPU idle time.
  2. Extreme Scaling: As the number of GPUs increases, the local batch size per GPU typically decreases to maintain a stable global batch size. Smaller local batches result in a lower compute-to-communication ratio, further exacerbating the bottleneck.
Impact of communication bandwidth and batch size on training performance.

ZeRO++: Three Pillars of Optimization

ZeRO++ addresses these bottlenecks through three targeted techniques that optimize the primary communication events in a training iteration:

1. Quantized Weight Communication (qwZ)

During the forward pass, ZeRO++ reduces weight communication volume by 50% by switching from FP16 (2 bytes) to INT8 (1 byte) quantization. To maintain model accuracy, the system employs block-based quantization, where small sub-sections of a tensor are quantized independently. This localized approach significantly reduces quantization error compared to global quantization.

Comparison of baseline vs. blocked quantization and the resulting reduction in quantization error.

2. Hierarchical Weight Partitioning (hpZ)

For the backward pass, ZeRO++ introduces a hierarchical approach. Instead of a global all-gather across all nodes, it maintains a full copy of model weights within each physical node. This allows the system to leverage high-speed intra-node links (like NVLink) for weight reconstruction, bypassing the slower inter-node network.

3. Quantized Gradient Communication (qgZ)

Gradient averaging is optimized using INT4 quantization, reducing volume by 4x. ZeRO++ utilizes a novel "2-hop" hierarchical all-to-all communication pattern. This specific pattern is designed to prevent the error accumulation typically seen in standard ring-based reduce-scatter operations when using low-precision quantization.

Key Results and Performance

The researchers evaluated ZeRO++ on GPT-style models ranging from 18B to 138B parameters. Key findings include:

  • Volume Reduction: Total cross-node communication volume dropped from 3M to 0.75M (where M is model size).
  • Throughput Gains: ZeRO++ achieved up to 2.16x higher throughput compared to the standard ZeRO-3 baseline on a 384-GPU cluster.
  • Bandwidth Efficiency: Remarkably, ZeRO++ on a 200 Gbps cluster outperformed the standard ZeRO baseline on a much faster 800 Gbps cluster.
  • Training Stability: Convergence tests on a GPT-350M model trained on 30B tokens from The Pile dataset showed that the quantization techniques did not compromise accuracy, with validation loss remaining within 1% of the FP16 baseline.

Conclusion

ZeRO++ significantly lowers the barrier for training giant models by making communication-intensive tasks efficient on commodity cloud hardware. By intelligently combining quantization with hardware-aware data partitioning and optimized CUDA kernels, it paves the way for the next generation of trillion-parameter models.

Summary updated

BibTeX
@misc{wang2023zero,
  author = {Guanhua Wang and Heyang Qin and Sam Ade Jacobs and Connor Holmes and Samyam Rajbhandari and Olatunji Ruwase and Feng Yan and Lei Yang and Yuxiong He},
  title = {{ZeRO++: Extremely Efficient Collective Communication for Giant Model Training}},
  year = {2023},
  eprint = {2306.10209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.10209},
}
Figure