[Paper Review] Image Classification at Supercomputer Scale
The paper presents systems optimizations to train ResNet-50 on ImageNet at scale, achieving 76.3% accuracy in 2.2 minutes on a 1024-chip TPU v3 Pod with over 1.05 million images/second throughput.
Deep learning is extremely computationally intensive, and hardware vendors have responded by building faster accelerators in large clusters. Training deep learning models at petaFLOPS scale requires overcoming both algorithmic and systems software challenges. In this paper, we discuss three systems-related optimizations: (1) distributed batch normalization to control per-replica batch sizes, (2) input pipeline optimizations to sustain model throughput, and (3) 2-D torus all-reduce to speed up gradient summation. We combine these optimizations to train ResNet-50 on ImageNet to 76.3% accuracy in 2.2 minutes on a 1024-chip TPU v3 Pod with a training throughput of over 1.05 million images/second and no accuracy drop.
Motivation & Objective
- Motivate training deep networks at petascale and reduce wall-clock time while preserving accuracy.
- Identify system bottlenecks that hinder large-batch synchronous SGD on accelerators.
- Develop and validate techniques to balance global and per-replica batch sizes without sacrificing model quality.
- Showcase combined optimizations that yield state-of-the-art throughput and maintain accuracy.
Proposed method
- Use mixed-precision training with bfloat16 for convolutions and 32-bit for non-convolution operations.
- Apply linear learning rate scaling with warmup and decay; utilize LARS to scale batch sizes up to 32768.
- Introduce distributed batch normalization to control BN statistics independently of global batch size.
- Optimize input data pipeline with dataset sharding, caching, prefetching, fused JPEG decode and crop, and parallel parsing.
- Adopt a 2-D torus all-reduce algorithm for gradient summation to reduce communication latency.
- Demonstrate performance with a 1024-chip TPU v3 Pod and compare against prior results.
Experimental results
Research questions
- RQ1How can distributed batch normalization, input pipeline optimization, and 2-D all-reduce be combined to enable synchronous SGD at massive scale?
- RQ2What are the trade-offs between per-replica batch size, global batch size, and model accuracy in large-batch training?
- RQ3Can mixed-precision and scaling strategies maintain ResNet-50 accuracy on ImageNet when training with very large batches?
- RQ4What end-to-end throughput and wall-clock time can be achieved on large TPU pods without loss in accuracy?
Key findings
- Training ResNet-50 on ImageNet to 76.3% accuracy with no accuracy drop at scale.
- Achieved 2.2 minutes training time and over 1.05 million images/second throughput on a 1024-chip TPU v3 Pod.
- 2-D gradient summation with torus links outperforms 1-D ring all-reduce in latency and throughput, enabling scalable synchronization.
- Distributed BN allows control of BN effective batch size independent of the global batch size, aiding accuracy at large scales.
- Input pipeline optimizations (caching, prefetching, fused JPEG decode/cropping, parallel parsing) significantly boost throughput, especially when data is sharded across workers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.