Highly Scalable Deep Learning Training System with Mixed-Precision: Training ImageNet in Four Minutes

Xianyan Jia, Shutao Song, Wei He, Yangzihao Wang, Haidong Rong, Feihu Zhou, Liqiang Xie, Zhenyu Guo, Yuanzhou Yang, Liwei Yu, Tiegang Chen, Guangxiao Hu, Shaohuai Shi, Xiaowen ChuarXiv 2018

Researchers from Tencent and Hong Kong Baptist University have introduced Jizhi, a highly scalable deep learning training system designed to push the boundaries of large-scale model training. Jizhi achieved remarkable results, training ResNet-50 on ImageNet in just 6.6 minutes and AlexNet in a record-breaking 4 minutes. By integrating mixed-precision training, a novel hybrid communication strategy, and large-batch optimization (LARS), the system demonstrates near-linear scaling across up to 2,048 GPUs without compromising model accuracy.

Addressing the Scaling Bottlenecks

As deep learning models and datasets continue to expand, training time has become a critical bottleneck. While distributing workloads across thousands of GPUs is a logical step, it introduces two primary challenges:

  1. The Generalization Gap: Utilizing the extremely large mini-batch sizes required to saturate thousands of GPUs often leads to a significant drop in test accuracy. For instance, prior attempts to scale ResNet-50 to a 64k batch size saw accuracy decline from approximately 75% to 73%.
  2. Communication Overheads: As the GPU count increases, the time required to synchronize gradients (the "all-reduce" step) can exceed the time spent on computation. Standard algorithms, such as NCCL’s ring-based all-reduce, often fail to utilize full network bandwidth when handling many small tensors or operating within massive clusters.

The Jizhi System Architecture

The Jizhi system employs a multi-layered optimization approach to overcome these hurdles.

Overview of the Jizhi training system architecture.

Mixed-Precision with LARS

To maximize single-GPU throughput, Jizhi utilizes half-precision (FP16) for forward and backward passes. However, to maintain numerical stability and prevent "gradient vanishing" during large-batch training, the system performs weight updates in single-precision (FP32) using the Layer-wise Adaptive Rate Scaling (LARS) algorithm. This hybrid approach ensures that local learning rates remain within a stable dynamic range.

Model Architecture Refinement

The researchers found that standard architectures required specific adjustments for extreme scaling. For AlexNet to converge at a 64k batch size, an additional Batch Normalization (BN) layer was inserted after the fifth pooling layer to stabilize feature map distributions. Furthermore, eliminating weight decay on bias and BN parameters proved essential for convergence.

Hybrid Communication Strategy

Communication efficiency is central to Jizhi's performance. The system implements several key techniques:

  • Tensor Fusion: Multiple small gradient tensors are packed into a single large buffer before transmission, significantly reducing network latency.
  • Hierarchical All-reduce: For latency-sensitive operations, Jizhi employs a three-phase algorithm: intra-node reduction, followed by inter-node ring all-reduce, and finally an intra-node broadcast.
  • Hybrid Switching: The system dynamically selects between traditional ring-based all-reduce and the hierarchical approach based on tensor size and cluster configuration.
The three-phase hierarchical all-reduce algorithm.

Key Results and Insights

Evaluated on the ImageNet (ILSVRC-2012) dataset, Jizhi demonstrated industry-leading performance:

  • ResNet-50: Achieved 75.8% top-1 accuracy in 6.6 minutes using 2,048 Tesla P40 GPUs. This significantly outperforms previous benchmarks, such as a 15-minute training time on 1,024 Tesla P100s.
  • AlexNet: Achieved 58.7% top-1 accuracy in 4 minutes using 1,024 Tesla P40 GPUs, shattering the previous record of 11 minutes.
  • Scaling Efficiency: The system reached a scaling efficiency of 99.2% on 1,024 GPUs with a batch size of 64 per GPU. Even with smaller batches (32 per GPU), it maintained 87.9% efficiency.
  • Communication Speedup: Optimized all-reduce algorithms provided up to a 3x speedup for AlexNet and an 11x speedup for ResNet-50 compared to standard NCCL-based training.

Conclusion and Future Directions

The Jizhi system proves that with careful coordination of precision, model architecture, and communication strategies, deep learning training can be scaled to thousands of GPUs with near-linear efficiency. While these results are currently tuned for specific cluster architectures (Tesla P40s with 100Gbit Ethernet), they provide a blueprint for future large-scale systems. Future work may involve extending these techniques to modern architectures like Transformers and automating the hyperparameter tuning required for large-batch convergence.

Summary updated

BibTeX
@misc{jia2018highly,
  author = {Xianyan Jia and Shutao Song and Wei He and Yangzihao Wang and Haidong Rong and Feihu Zhou and Liqiang Xie and Zhenyu Guo and Yuanzhou Yang and Liwei Yu and Tiegang Chen and Guangxiao Hu and Shaohuai Shi and Xiaowen Chu},
  title = {{Highly Scalable Deep Learning Training System with Mixed-Precision: Training ImageNet in Four Minutes}},
  year = {2018},
  eprint = {1807.11205},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.11205},
}
Figure