Lune

ICML2025Top-tier venue

How to set AdamW's weight decay as you scale model and dataset size

Xi Wang, Laurence Aitchison

Abstract

The scaling of the optimal AdamW weight decay hyperparameter with model and dataset size is critical as we seek to build larger models, but is poorly understood. We show that weights learned by AdamW can be understood as an exponential moving average (EMA) of recent updates. This gives critical insights for how to set the weight decay in AdamW, and how the weight decay should scale with model and dataset size. In particular, the key hyperparameter for an exponential moving average is the EMA timescale. Intuitively, the EMA timescale can be understood as the number of recent iterations the EMA averages over. We find that the optimal timescale, measured in epochs, is roughly constant as we change model and dataset size. Moreover, given a learning rate, there is a one-to-one mapping from the EMA timescale to the weight decay hyperparameter. Thus, if the optimal EMA timescale is constant, that implies that as the dataset size increases, the optimal weight decay should fall and as the model size increases, the optimal weight decay should increase (if we follow the muP recommendation for scaling the learning rate). We validate these scaling rules on ResNet-18 and Vision Transformers trained on CIFAR-10 and ImageNet, and on NanoGPT pre-training on OpenWebText. Finally, we found that as training progresses, muP's learning rate scaling breaks down for AdamW unless weight decay is scaled appropriately.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

18 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Don't be lazy: CompleteP enables compute-efficient deep transformers cites Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Duration
  • Don't be lazy: CompleteP enables compute-efficient deep transformers cites Small-scale proxies for large-scale Transformer training instabilities
  • Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Duration cites Power Lines: Scaling laws for weight decay and batch size in LLM pre-training
  • Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Duration cites Scaling Vision Transformers to 22 Billion Parameters
  • Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Duration cites On the SDEs and Scaling Rules for Adaptive Gradient Algorithms
  • Power Lines: Scaling laws for weight decay and batch size in LLM pre-training cites Don't be lazy: CompleteP enables compute-efficient deep transformers
  • Power Lines: Scaling laws for weight decay and batch size in LLM pre-training cites An Exponential Learning Rate Schedule for Deep Learning
  • Power Lines: Scaling laws for weight decay and batch size in LLM pre-training cites On the SDEs and Scaling Rules for Adaptive Gradient Algorithms
  • Power Lines: Scaling laws for weight decay and batch size in LLM pre-training cites Small-scale proxies for large-scale Transformer training instabilities
  • Hyperparameter Transfer Enables Consistent Gains of Matrix-Preconditioned Optimizers Across Scales cites Don't be lazy: CompleteP enables compute-efficient deep transformers
  • Hyperparameter Transfer Enables Consistent Gains of Matrix-Preconditioned Optimizers Across Scales cites Power Lines: Scaling laws for weight decay and batch size in LLM pre-training
  • Communication-Efficient Language Model Training Scales Reliably and Robustly: Scaling Laws for DiLoCo cites Small-scale proxies for large-scale Transformer training instabilities
  • On the SDEs and Scaling Rules for Adaptive Gradient Algorithms cites An Exponential Learning Rate Schedule for Deep Learning
  • Small-scale proxies for large-scale Transformer training instabilities cites Scaling Vision Transformers to 22 Billion Parameters
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers18

  1. Don't be lazy: CompleteP enables compute-efficient deep transformersNolan Dey, Bin Claire Zhang, Lorenzo Noci, Mufan Bill Li et al.NeurIPS 2025 · 77 citations
  2. Power Lines: Scaling laws for weight decay and batch size in LLM pre-trainingShane Bergsma, Nolan Dey, Gurpreet Gosal, Gavia Gray et al.NeurIPS 2025 · 44 citations
  3. Communication-Efficient Language Model Training Scales Reliably and Robustly: Scaling Laws for DiLoCoZachary Charles, Gabriel Teston, Lucio M. Dery, John Keith Rush et al.NeurIPS 2025 · 29 citations
  4. Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and DurationBruno Mlodozeniec, Pierre Ablin, Louis Béthune, Dan Busbridge et al.ICLR 2026 · 24 citations
  5. Hyperparameter Transfer Enables Consistent Gains of Matrix-Preconditioned Optimizers Across ScalesShikai Qiu, Charlie Chen, Hoang Phan, Qi Lei et al.NeurIPS 2025 · 17 citations

Builds on21

  1. S4L: Self-Supervised Semi-Supervised LearningLucas Beyer, Xiaohua Zhai, Avital Oliver, Alexander KolesnikovICCV 2019 · 854 citations
  2. Scaling Vision Transformers to 22 Billion ParametersMostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski et al.ICML 2023 · 848 citations
  3. An Exponential Learning Rate Schedule for Deep LearningZhiyuan Li, Sanjeev AroraICLR 2020 · 267 citations
  4. Small-scale proxies for large-scale Transformer training instabilitiesMitchell Wortsman, Peter J. Liu, Lechao Xiao, Katie E. Everett et al.ICLR 2024 · 162 citations
  5. On the SDEs and Scaling Rules for Adaptive Gradient AlgorithmsSadhika Malladi, Kaifeng Lyu, Abhishek Panigrahi, Sanjeev AroraNeurIPS 2022 · 125 citations

Related papers

  1. Weight Decay may matter more than µP for Learning Rate Transfer in PracticeAtli Kosson, Jeremy Welborn, Yang Liu, Martin Jaggi et al.ICLR 2026 · 11 citations
  2. How to Scale Your EMADan Busbridge, Jason Ramapuram, Pierre Ablin, Tatiana Likhomanenko et al.NeurIPS 2023 · 33 citations
  3. Adam with model exponential moving average is effective for nonconvex optimizationKwangjun Ahn, Ashok CutkoskyNeurIPS 2024 · 36 citations
  4. The AdEMAMix Optimizer: Better, Faster, OlderMatteo Pagliardini, Pierre Ablin, David GrangierICLR 2025
  5. Scaling Exponents Across Parameterizations and OptimizersKatie E. Everett, Lechao Xiao, Mitchell Wortsman, Alexander A. Alemi et al.ICML 2024 · 59 citations
Dusk over the sea between two cliffs drawn in fine vertical lines