Large Batch Optimization for Deep Learning: Training BERT in 76 minutes

By Yang You, Jing Li, Sashank J. Reddi, Jonathan Hseu, Sanjiv Kumar, Srinadh Bhojanapalli, Xiaodan Song, J. Demmel, Kurt Keutzer, Cho-Jui Hsieh. 2019

1,222 citations recorded by the source corpus.

Training large deep neural networks on massive datasets is computationally very challenging. There has been recent surge in interest in using large batch stochastic optimization methods to tackle this issue. The most prominent algorithm in this line of research is LARS, which by employing layerwise adaptive learning rates trains ResNet on ImageNet in a few minutes. However, LARS performs poorly for attention models like BERT, indicating that its performance gains are not consistent across tasks. In this paper, we first study a principled layerwise adaptation strategy to accelerate training of deep neural networks using large mini-batches. Using this strategy, we develop a new layerwise adaptive large batch optimization technique called LAMB; we then provide convergence analysis of LAMB as well as LARS, showing convergence to a stationary point in general nonconvex settings. Our empirical results demonstrate the superior performance of LAMB across various tasks such as BERT and ResNet-50 training with very little hyperparameter tuning. In particular, for BERT training, our optimizer enables use of very large batch sizes of 32868 without any degradation of performance. By increasing the batch size to the memory limit of a TPUv3 Pod, BERT training time can be reduced from 3 days to just 76 minutes (Table 1). The LAMB implementation is available at this https URL

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Large Language Models, Optimization & Training

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Jianfeng Gao
  2. Mohit Bansal
  3. Quoc V. Le
  4. Luke S. Zettlemoyer
  5. Percy Liang
  6. Graham Neubig
  7. Yoshua Bengio
  8. Caiming Xiong

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Trevor Darrell
  4. Xiaogang Wang
  5. Ming-Hsuan Yang
  6. Jitendra Malik
  7. Andrew Zisserman
  8. Cordelia Schmid

In Large Language Models

  1. Jianfeng Gao
  2. Zhiyuan Liu
  3. Jie Tang
  4. Furu Wei
  5. Minlie Huang
  6. Weizhu Chen
  7. Maosong Sun
  8. Zhe Gan

In Optimization & Training

  1. Martin Jaggi
  2. Sebastian U. Stich
  3. Soham De
  4. Peter Richtárik
  5. Samuel L. Smith
  6. Quoc V. Le
  7. Sai Praneeth Karimireddy
  8. Andrew Brock

Citations in the corpus