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

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

1 Apr 2019ICLR 2020 1arXiv:1904.00962archive 2025-07-28

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

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 https://github.com/tensorflow/addons/blob/master/tensorflow_addons/optimizers/lamb.py

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1904.00962")

Code

Syntology Ran 6 of 11 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 6 ran with no contract checked.

By repository: community (archive-listed): 11 samples from 2 repositories, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

32 repositories listed; official and paper-mentioned ones first.

tensorflow/addons officialmentioned in papertfApache-2.0 report
Ankur3107/awesome-daily-blog mentioned on GitHubtf report
ShadenSmith/ghpages-test mentioned on GitHubpytorch report
Smerity/pytorch-lamb mentioned on GitHubpytorchMIT report
bojone/tiger mentioned on GitHubtfMIT report
btahir/tensorflow-LAMB mentioned on GitHubtf report
columbia-ai-robotics/semantic-abstraction mentioned on GitHubpytorchMIT report
cybertronai/pytorch-lamb mentioned on GitHubpytorchMIT report
dimakarp1996/LAMB-keras mentioned on GitHub report
fastalgo/imagenet_resnet50_lamb mentioned on GitHubtf report
frgfm/Holocron mentioned on GitHubpytorch report
hannibal046/pluglm mentioned on GitHubpytorch report
huchen365/ds mentioned on GitHubpytorch report
huggingface/pytorch-image-models mentioned on GitHubpytorchApache-2.0 report
jiaowoguanren0615/MambaVision mentioned on GitHubpytorch report
jxbz/fromage mentioned on GitHubpytorch report
kaushaltrivedi/fast-bert mentioned on GitHubpytorch report
liuqiangict/lamb_optimizer mentioned on GitHubtfApache-2.0 report
meltnur/speed mentioned on GitHubpytorchMIT report
skyday123/pytorch-lamb mentioned on GitHubpytorchMIT report
utterworks/fast-bert mentioned on GitHubpytorch report
ymcui/LAMB_Optimizer_TF mentioned on GitHubtfApache-2.0 report
zaradana/Fast_BERT mentioned on GitHubpytorch report
zhuchen03/maxva mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

11 samples harvested; 6 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

6ran
5unverified

Licence: 9 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_lr_from_config meltnur/speed/deepspeed/pt/deepspeed_lr_schedules.py community (archive-listed) ran MIT recorded; this copy not marked cleared · pointer only · 97777449b62c0a36 · report
get_scalar_param meltnur/speed/deepspeed/pt/deepspeed_config.py community (archive-listed) ran MIT recorded; this copy not marked cleared · pointer only · 8ecbd0d0bd8ec80f · report
parse_resource_filter meltnur/speed/deepspeed/pt/deepspeed_run.py community (archive-listed) ran MIT recorded; this copy not marked cleared · pointer only · 77529b2a36ec2e49 · report
piecewise_linear bojone/tiger/tiger.py community (archive-listed) ran MIT (permissive) · 6a8666be8c9e0af6 · report
root_mean_square bojone/tiger/tiger.py community (archive-listed) ran MIT (permissive) · 7ced0d41eac533bc · report
to_python_float meltnur/speed/deepspeed/pt/loss_scaler.py community (archive-listed) ran MIT recorded; this copy not marked cleared · pointer only · 6b5d363ab4dbf012 · report
add_tuning_arguments meltnur/speed/deepspeed/pt/deepspeed_lr_schedules.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · a9c0a909a533ca74 · report
fetch_hostfile meltnur/speed/deepspeed/pt/deepspeed_run.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 532b9a790bd9609b · report
get_config_from_args meltnur/speed/deepspeed/pt/deepspeed_lr_schedules.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 6e89a38d49e658cc · report
get_fp16_enabled meltnur/speed/deepspeed/pt/deepspeed_config.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 93f7995d74994b25 · report
get_loss_scale meltnur/speed/deepspeed/pt/deepspeed_config.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 3c0009bff557332d · report

Tasks

Question AnsweringStochastic Optimization

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Question Answering SQuAD1.1 dev BERT large (LAMB optimizer) F1 90.584 #53 of 55 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: LAMB

1x1 ConvolutionAdamAttentionAttention DropoutAverage PoolingBERTBatch NormalizationBottleneck Residual BlockConvolutionDense ConnectionsDropoutGlobal Average PoolingKaiming InitializationLAMBLARSLayer NormalizationLinear LayerLinear Warmup With Linear DecayMax PoolingMulti-Head AttentionReLUResidual BlockResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections