Abstract
ChainerMN is an open-source communication library designed to bring high-performance distributed training to the Chainer deep learning framework. By leveraging synchronous data parallelism and optimized collective communication via the NVIDIA Collective Communications Library (NCCL), ChainerMN achieves over 90% parallel efficiency on 128 GPUs. This framework successfully bridges the gap between the flexibility of "Define-by-Run" dynamic neural networks and the necessity for massive scalability in modern deep learning workloads.
Introduction
The training of state-of-the-art deep learning models, such as ResNet-50 on the ImageNet dataset, typically requires significant computational time—often up to a week on a single high-end GPU. This "speed limit" hinders rapid iteration and limits the scale of datasets that researchers can effectively utilize. While distributed training across multiple GPUs and servers offers a solution, it often imposes a "flexibility tax." Many existing frameworks utilize static "Define-and-Run" computational graphs to simplify distribution, which can be restrictive for dynamic architectures like Recurrent Neural Networks (RNNs). ChainerMN was developed to provide massive scalability while preserving Chainer’s signature dynamic graph flexibility.
Methods
ChainerMN implements several key strategies to enable efficient distributed training:
- Synchronous Data Parallelism: Each GPU worker maintains a full replica of the model and processes a distinct minibatch. After calculating gradients locally, workers synchronize to ensure model consistency.
- Optimized Collective Communication: Rather than relying on a central parameter server, which often becomes a bottleneck, ChainerMN utilizes the
Allreduceoperation. This allows all workers to simultaneously share and average gradients. - High-Performance Integration: The library builds upon MPI (Message Passing Interface) and NVIDIA’s NCCL to achieve near-theoretical communication speeds across high-speed networks like InfiniBand.
- Dynamic Graph Support: By wrapping the optimizer rather than the model, ChainerMN allows the network structure to change on every iteration, maintaining the "Define-by-Run" paradigm.
Key Results
Empirical evaluations of ChainerMN demonstrate its capability as a high-performance distributed framework:
- Linear Scalability: On a cluster of 128 GPUs (32 nodes), ChainerMN achieved a 101.32x speedup compared to a single-GPU baseline.
- High Parallel Efficiency: The framework maintained 90% efficiency when scaling from 4 to 128 GPUs, matching the performance of industry-leading distributed training implementations.
- Large-Batch Stability: The system successfully trained models with total batch sizes as large as 4,096 without a loss in final model accuracy, a critical factor for practical large-scale deployment.
Conclusion and Future Work
ChainerMN demonstrates that high-performance scalability does not have to come at the cost of architectural flexibility. By combining synchronous data parallelism with optimized communication primitives, it provides a robust platform for large-scale deep learning. Future developments for the framework include the implementation of model parallelism for extra-large architectures, enhanced fault tolerance for massive clusters, and gradient compression techniques to support training over standard Ethernet networks.
Summary updated