Skip to main content
QUICK REVIEW

[Paper Review] Exploring the limits of Concurrency in ML Training on Google TPUs

Sameer Kumar, James Bradbury|arXiv (Cornell University)|Nov 7, 2020
Topic ModelingComputer Science24 references10 citations
TL;DR

This paper presents techniques to scale deep learning training to 4,096 TPU-v3 chips using model parallelism, communication optimizations, and distributed evaluation, achieving record-breaking training times of 16–28 seconds across four MLPerf models. The approach enables near-perfect scaling on the Google TPU Multipod by addressing bottlenecks in communication, data pipeline, and optimizer sharding.

ABSTRACT

Recent results in language understanding using neural networks have required training hardware of unprecedentedscale, with thousands of chips cooperating on a single training run. This paper presents techniques to scaleML models on the Google TPU Multipod, a mesh with 4096 TPU-v3 chips. We discuss model parallelism toovercome scaling limitations from the fixed batch size in data parallelism, communication/collective optimizations,distributed evaluation of training metrics, and host input processing scaling optimizations. These techniques aredemonstrated in both the TensorFlow and JAX programming frameworks. We also present performance resultsfrom the recent Google submission to the MLPerf-v0.7 benchmark contest, achieving record training times from16 to 28 seconds in four MLPerf models on the Google TPU-v3 Multipod machine.

Motivation & Objective

  • To scale deep learning models to the full 4,096-chip Google TPU-v3 Multipod for maximum training throughput.
  • To overcome limitations of data parallelism, such as fixed batch size, by employing model parallelism in large models like BERT, SSD, and Transformers.
  • To optimize communication, system-level coordination, and input pipeline performance at scale to minimize latency and maximize hardware utilization.
  • To demonstrate high-performance training in both TensorFlow and JAX frameworks, with a focus on cross-stack system and compiler optimizations.
  • To establish best practices for large-scale ML training by analyzing scalability bottlenecks and evaluating framework-specific advantages.

Proposed method

  • Employed model parallelism to distribute large layers across multiple TPU chips, especially for models like BERT and Transformers where data parallelism is constrained by batch size.
  • Implemented optimized all-reduce communication primitives across the 4096-chip TPU mesh to reduce communication overhead, which accounted for 27.3% of total device time in BERT at scale.
  • Used SPMD partitioning with weight update sharding and mixed-precision training to improve efficiency in model-parallel training.
  • Optimized the host input pipeline and distributed evaluation of training metrics to reduce host-side bottlenecks and improve end-to-end throughput.
  • Leveraged JAX’s multi-client execution model to reduce compilation and startup overheads, especially beneficial for small-batch or frequent-update scenarios.
  • Applied model-specific optimizations such as replacing gather/scatter operations with einsum and tuning hyperparameters to improve convergence time and scalability.

Experimental results

Research questions

  • RQ1How can model parallelism be effectively scaled to 4,096 TPU-v3 chips to overcome data parallelism’s batch size limitations?
  • RQ2What communication and system-level optimizations are required to maintain high scaling efficiency at 4,096-node scale?
  • RQ3How do different deep learning frameworks (TensorFlow vs. JAX) perform under large-scale training workloads, and what are their respective strengths?
  • RQ4What are the dominant performance bottlenecks in large-scale model training, and how can they be mitigated?
  • RQ5To what extent can end-to-end training time be reduced through coordinated system, compiler, and framework-level optimizations?

Key findings

  • The TPU-v3 Multipod with 4,096 chips achieved record-breaking training times of 16 to 28 seconds across four MLPerf models, setting new benchmarks in the MLPerf-v0.7 competition.
  • BERT demonstrated high scalability across 16 to 4,096 chips, with communication overhead (all-reduce) accounting for 27.3% of total device step time at scale.
  • Model parallelism enabled significant speedups in SSD, MaskRCNN, and Transformer models, with a 2.3× speedup observed on four TPU-v3 cores for the Transformer model.
  • The combination of aggressive compiler optimizations, efficient gradient summation, and distributed evaluation reduced system-level bottlenecks and improved overall throughput.
  • JAX outperformed TensorFlow in two MLPerf-v0.7 benchmarks due to lower startup and compilation overheads in the multi-client execution model.
  • The study confirmed that communication overhead and inefficient partitioning (e.g., small spatial dimensions after partitioning) are major scalability bottlenecks in model-parallel training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.