Adam, AdamW and the optimizer zoo
Adam-style adaptive optimizers rescale each parameter's step by running gradient statistics and train nearly every large model; matrix-aware successors (Shampoo, Muon) and schedule-free variants are the contenders.
On this page15 sections
AdamW is the default optimizer for large language models, so its memory footprint (two extra states per parameter), tuning needs and stability determine the cost and recipe of almost every pre-training run.
The rule that decides how a model's numbers change after each mistake, and the contenders to replace the standard one.
- 1Each step needs a direction and size
- 2Adam scales steps per number
- 3AdamW adds clean weight decay
- 4New optimizers: gains shrink with scale
What an optimizer does. Training a neural network means finding weights that make a loss (an error score) small. Gradient descent does this by computing the derivative of the loss with respect to every weight and stepping each weight a little against it: , where is the derivative (the gradient entry for that weight) and the learning rate sets the step size. The derivative is estimated from a small random batch of examples, so it is noisy.
What goes wrong. One for billions of weights is a poor fit. Some weights get large, consistent gradients and need small steps; others get tiny or rare gradients and barely move. Think of rolling a ball down a long narrow valley: a step large enough to make progress along the gentle floor makes the ball bounce between the steep walls.
Adam. Adam keeps two running averages for every weight. An exponential moving average updates a running value as with near 1, so recent values count most and old ones fade. Adam keeps , the average of the gradient (its direction, smoothed over steps), and , the average of the squared gradient (its typical size). The update is roughly
Dividing by makes the step about the same size for every weight whatever the scale of its gradient, while noisy gradients that keep changing sign average out in ; is a tiny number that prevents division by zero. In the valley picture, the steep direction is damped and the gentle direction gets a full step.
AdamW. Weight decay shrinks every weight slightly each step to stop weights growing without need. In plain Adam, adding that shrinkage to the gradient means it also gets divided by , which weakens it unevenly. AdamW applies the decay separately, , so the decay rate means what it says. AdamW with a warm-up and a decaying learning rate is the default for language models; its cost is two extra numbers ( and ) stored per weight.
Successors. Shampoo and Muon treat each weight matrix as a matrix rather than a list of numbers; Muon makes the update's directions balanced (orthogonalized) using a few cheap matrix iterations. Lion keeps only the sign of a momentum term and one stored number per weight. Schedule-free methods remove the need to choose in advance when the learning rate decays.
Why the comparison is hard. New optimizers are often compared against a poorly tuned AdamW. Benchmarks such as AlgoPerf fix the tasks, hardware and tuning budget; in its first competition Distributed Shampoo won with tuning and Schedule-Free AdamW won without it. A large careful study reported that the speed-up of matrix-based optimizers over well-tuned AdamW shrinks from about 1.4 times at 0.1 billion parameters to about 1.1 times at 1.2 billion, so whether any optimizer clearly beats AdamW at large scale is open.
Go deeper
The full technical text.
Adam and AdamW
Stochastic gradient descent moves every parameter by the same learning rate times its gradient. Adam (Kingma and Ba, 2014) keeps exponential moving averages of the gradient (first moment) and of its square (second moment) and divides the first by the square root of the second, so each parameter gets its own effective step size. AdamW (Loshchilov and Hutter, 2017) decouples weight decay from the gradient-based update; with Adam's adaptive scaling, L2 regularization and weight decay are not equivalent, and decoupling them restored the intended behaviour and made the decay coefficient easier to tune. AdamW with a warm-up and a decaying schedule is the default recipe for transformer training. Its cost is two optimizer states per parameter, usually in float32.
What the successors change
- Preconditioned methods. Shampoo (Gupta, Koren and Singer, 2018) uses per-dimension matrix preconditioners for tensors, exploiting the matrix structure of weights; a distributed PyTorch implementation was published by Shi et al. (2023). Muon (Jordan et al., 2024) orthogonalizes the momentum update of each weight matrix with a few Newton-Schulz iterations and applies it to hidden 2-D weights only, leaving embeddings and norm gains to AdamW; Liu et al. (2025, preprint) report about 2x compute efficiency over AdamW in their scaling experiments.
- Sign and memory-light methods. Lion (Chen et al., 2023) was found by program search and uses only the sign of a momentum average, needing one state per parameter.
- Schedule-free training. Defazio et al. (2024) replace the learning-rate decay schedule with iterate averaging so that no stopping time must be fixed in advance.
How to compare them
Optimizer papers have a record of reporting gains against under-tuned baselines. AlgoPerf (Dahl et al., 2023) fixes workloads, hardware and a time-to-target metric and has two rulesets, external tuning (a stated hyperparameter search space) and self-tuning (no tuning allowed). In the first competition, a Distributed Shampoo submission won the external-tuning ruleset and a Schedule-Free AdamW submission won the self-tuning one (Kasimbeg et al., 2025). A large pre-training study (Wen et al., 2025, preprint) found that the speedup of matrix-based optimizers over a well-tuned AdamW shrinks from about 1.4x at 0.1B parameters to about 1.1x at 1.2B parameters.
Where it connects
The optimizer determines how learning rate should scale with width (see the μP entry) and interacts with normalization layers, because scale-invariant weights followed by a norm layer have an effective learning rate that depends on weight norm and weight decay.
Words on this page (11)
- optimizer
- The rule that turns gradients into actual changes of the model's numbers, such as Adam.
- AdamW
- The standard optimizer for large language models: it adapts each number's step size and applies weight decay separately.
- gradient
- A list saying, for each adjustable number, which way and how strongly to change it to reduce the error.
- learning rate
- The size of each nudge during training. Too big and training blows up; too small and it crawls.
- weight decay
- A gentle pull of every weight toward zero during training, to prevent overly large weights.
- Muon
- An optimizer that adjusts each weight matrix as a whole, instead of number by number.
- AlgoPerf
- A benchmark that scores training algorithms by how fast they reach target accuracy on fixed hardware.
- hyperparameter
- A setting chosen by people before training (for example the learning rate), not learned by the model.
- exponential moving average
- A running average where each update mixes in the new value with a small weight, so older values fade out geometrically.
- gradient descent
- Repeatedly stepping each weight against the derivative of the loss to make the loss smaller.
- orthogonalization
- Adjusting a matrix so its columns are perpendicular and equal in length, removing any dominant direction.
New to this? Read first (4)
- Sebastian Ruder: An overview of gradient descent optimization algorithmsClear tour of the optimizers that came before AdamW.
- Wikipedia: Stochastic gradient descentThe base method that Adam improves on.
- 3Blue1Brown: Gradient descent, how neural networks learnA visual explanation of the downhill-stepping idea every optimizer builds on.
- Keller Jordan: Muon, an optimizer for hidden layersThe original write-up of Muon, readable with linear algebra.
Understanding map
map of the whole wiki →What to read before Adam, AdamW and the optimizer zoo (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.
- Start with
- Step 2
- Adam, AdamW and the optimizer zooYou are here
- Then
- Neural scaling laws and compute-optimal trainingTheory
- Maximal update parametrization (μP) and hyperparameter transferTheory
- A 1.4x speedup over well-tuned AdamW at 1B+ parametersOpen problem · D50
- A hyperparameter-free training algorithm that beats Schedule-Free AdamW on AlgoPerfOpen problem · D42
- The NanoGPT speedrun in under 30 seconds on 8×H100Open problem · D23
Open problems & questions
Progress timeline
- Aug 30, 2026Record 92: about 40 secondsRelated to: The NanoGPT speedrun in under 30 seconds on 8×H100source
The repository table lists record 92 at 0.665 minutes by @DevenPzak (pull request 360).
- Sep 2, 2025Fair-tuning study (preprint)Related to: A 1.4x speedup over well-tuned AdamW at 1B+ parameterssource
Wen et al. report speedups over tuned AdamW shrink to about 1.1x at 1.2B parameters.
- Sep 2, 2025Optimizer speedups shrink with scale (preprint)source
Wen et al. report matrix-based optimizers' advantage over tuned AdamW falls from about 1.4x at 0.1B to about 1.1x at 1.2B parameters.
- Feb 20, 2025AlgoPerf competition resultssource
Distributed Shampoo won the external-tuning ruleset and a Schedule-Free AdamW submission won the self-tuning ruleset among 18 submissions from 10 teams.
- Feb 20, 2025First competition analysedRelated to: A hyperparameter-free training algorithm that beats Schedule-Free AdamW on AlgoPerfsource
Schedule-Free AdamW based submission won the self-tuning ruleset.
- Jun 12, 2023AlgoPerf benchmarksource
Dahl et al. propose a time-to-result benchmark for training algorithms with external-tuning and self-tuning rulesets.
- Nov 14, 2017AdamWsource
Loshchilov and Hutter decouple weight decay from the adaptive update.
- Dec 22, 2014Adamsource
Kingma and Ba introduce adaptive moment estimation.