Skip to content
DAH

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
Why other work relies on it

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.

  1. 1Each step needs a direction and size
  2. 2Adam scales steps per number
  3. 3AdamW adds clean weight decay
  4. 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: w←w−η gw \leftarrow w - \eta\, g, where gg is the derivative (the gradient entry for that weight) and the learning rate η\eta sets the step size. The derivative is estimated from a small random batch of examples, so it is noisy.

What goes wrong. One η\eta 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 m←βm+(1−β)gm \leftarrow \beta m + (1-\beta) g with β\beta near 1, so recent values count most and old ones fade. Adam keeps mm, the average of the gradient (its direction, smoothed over steps), and vv, the average of the squared gradient (its typical size). The update is roughly

w←w−η mv+ϵ.w \leftarrow w - \eta\,\frac{m}{\sqrt{v} + \epsilon}.

Dividing by v\sqrt{v} 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 mm; ϵ\epsilon 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 v\sqrt{v}, which weakens it unevenly. AdamW applies the decay separately, w←w−ηλww \leftarrow w - \eta\lambda w, so the decay rate λ\lambda 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 (mm and vv) 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)
Words on this page
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)
New to this? Read first

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.

  1. Start with
  2. Step 2
  3. Then

Open problems & questions

Progress timeline

  1. Aug 30, 2026
    Record 92: about 40 seconds
    Related to: The NanoGPT speedrun in under 30 seconds on 8×H100

    The repository table lists record 92 at 0.665 minutes by @DevenPzak (pull request 360).

    source
  2. Sep 2, 2025
    Fair-tuning study (preprint)
    Related to: A 1.4x speedup over well-tuned AdamW at 1B+ parameters

    Wen et al. report speedups over tuned AdamW shrink to about 1.1x at 1.2B parameters.

    source
  3. Sep 2, 2025
    Optimizer speedups shrink with scale (preprint)

    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.

    source
  4. Feb 20, 2025
    AlgoPerf competition results

    Distributed Shampoo won the external-tuning ruleset and a Schedule-Free AdamW submission won the self-tuning ruleset among 18 submissions from 10 teams.

    source
  5. Feb 20, 2025
    First competition analysed
    Related to: A hyperparameter-free training algorithm that beats Schedule-Free AdamW on AlgoPerf

    Schedule-Free AdamW based submission won the self-tuning ruleset.

    source
  6. Jun 12, 2023
    AlgoPerf benchmark

    Dahl et al. propose a time-to-result benchmark for training algorithms with external-tuning and self-tuning rulesets.

    source
  7. Nov 14, 2017
    AdamW

    Loshchilov and Hutter decouple weight decay from the adaptive update.

    source
  8. Dec 22, 2014
    Adam

    Kingma and Ba introduce adaptive moment estimation.

    source