Adaptive Batch Size Schedules for Distributed Training of Language Models with Data and Model Parallelism
Not on the map. Why?
Abstract (arXiv)
An appropriate choice of batch sizes in large-scale model training is crucial, yet it involves an intrinsic yet inevitable dilemma: large-batch training improves training efficiency in terms of memory utilization, while generalization performance often deteriorates due to small amounts of gradient noise. Despite this dilemma, the common practice of choosing batch sizes in language model training often prioritizes training efficiency -- employing either constant large sizes with data parallelism or implementing batch size warmup schedules. However, such batch size schedule designs remain heuristic and often fail to adapt to training dynamics, presenting the challenge of designing adaptive batch size schedules. Given the abundance of available datasets and the data-hungry nature of language models, data parallelism has become an indispensable distributed training paradigm, enabling the use of larger batch sizes for gradient computation. However, vanilla data parallelism requires replicas of model parameters, gradients, and optimizer states at each worker, which prohibits training larger models with billions of parameters. To optimize memory usage, more advanced parallelism strategies must be employed. In this work, we propose general-purpose and theoretically principled adaptive batch size schedules compatible with data parallelism and model parallelism. We develop a practical implementation with PyTorch Fully Sharded Data Parallel, facilitating the pretraining of language models of different sizes. We empirically demonstrate that our proposed approaches outperform constant batch sizes and heuristic batch size warmup schedules in the pretraining of models in the Llama 2 family, with particular focus on smaller models with up to 3 billion parameters. We also establish theoretical convergence guarantees for such adaptive batch size schedules with Adam for general smooth nonconvex objectives.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 62 of its 81 references that are in the map. First posted on arXiv 30 Dec 2024.
Builds on
62 of 81 references.
References · 62
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2023Qwen Technical Reportcited by 3,344
- 2024Qwen2 Technical Reportcited by 2,120
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
38 more
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
- 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,492
- 2016On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minimacited by 1,352
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
- 2016Optimization Methods for Large-Scale Machine Learningcited by 1,150
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
- 2019Large Batch Optimization for Deep Learning: Training BERT in 76 minutescited by 674
- 2023Baichuan 2: Open Large-scale Language Modelscited by 670
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 660
- 2021Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LMcited by 632
- 2024TinyLlama: An Open-Source Small Language Modelcited by 618
- 2024OLMo: Accelerating the Science of Language Modelscited by 613
- 2022Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Modelcited by 559
- 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 341
- 2017Don't Decay the Learning Rate, Increase the Batch Sizecited by 320
- 2022Reducing Activation Recomputation in Large Transformer Modelscited by 302
- 2018An Empirical Model of Large-Batch Trainingcited by 281
- 2017Train longer, generalize better: closing the generalization gap in large batch training of neural networkscited by 279
- 2018Measuring the Effects of Data Parallelism on Neural Network Trainingcited by 193
- 2023Small-scale proxies for large-scale Transformer training instabilitiescited by 183
- 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 161
- 2020Better Theory for SGD in the Nonconvex Worldcited by 158
- 2017A Bayesian Perspective on Generalization and Stochastic Gradient Descentcited by 135
- 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
- 2024Scalable Pre-training of Large Autoregressive Image Modelscited by 115
- 2023Noise Is Not the Main Factor Behind the Gap Between SGD and Adam on Transformers, but Sign Descent Might Becited by 114
- 2024Stable LM 2 1.6B Technical Reportcited by 90
- 2024TorchTitan: One-stop PyTorch native solution for production ready LLM pre-trainingcited by 85
- 2024Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Modelscited by 80
- 2024How Does Critical Batch Size Scale in Pre-training?cited by 73
- 2023Toward Understanding Why Adam Converges Faster Than SGD for Transformerscited by 53
- 2023Scaling laws for single-agent reinforcement learningcited by 41
- 2023Closing the Gap Between the Upper Bound and the Lower Bound of Adam's Iteration Complexitycited by 38
- 2021The Stability-Efficiency Dilemma: Investigating Sequence Length Warmup for Training GPT Modelscited by 36
- 2024Nemotron-4 15B Technical Reportcited by 36
- 2016Coupling Adaptive Batch Sizes with Learning Ratescited by 30
- 2017Adaptive Sampling Strategies for Stochastic Optimizationcited by 30
50 most cited of 62 All 62 (JSON)
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Lawscited by 6
- 2026Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descentcited by 2
- 2026CogGuard: Cognitive and Operational Profiling for Proactive Warning in Edge Intelligent Servicescited by 0
- 2026How Does Local Landscape Geometry Evolve in Language Model Pre-Training?cited by 0
- 2026How Does Local Landscape Geometry Evolve in Language Model Pre-Training?30 Sep 2026
- 2026CogGuard: Cognitive and Operational Profiling for Proactive Warning in Edge Intelligent Services13 Jun 2026
- 2026Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Laws15 Feb 2026
- 2026Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descent3 Feb 2026