Optimisers and learning-rate schedulers

How a gradient becomes a weight change (momentum, per-parameter scaling, preconditioning, orthogonalised and sign updates), how the batch size and the step size are set, and how the step size moves over a run (warmup, decay shapes, cooldowns, schedule-free training and checkpoint merging), with the evidence for each. Every optimiser here runs its exact published update rule, checked against PyTorch. A child of Topic: ml-fundamentals. Data as of October 2026. Reading: 34 min, plus 14 in closed details.

The idea in one screen

An optimiser turns each gradient into a step in two moves: it smooths the gradient over time (momentum) and it reshapes it (per coordinate in Adam, per matrix in Shampoo and Muon, to a sign in Lion); the schedule then multiplies the step by a base rate ηt that warms up, holds and decays. The two are always chosen as a pair, because adaptive methods only rescale relative to η.

You need: what one training step does with a gradient (the parent Topic: ml-fundamentals, Reading section 5) and why a badly conditioned valley is slow (the Hessian and the stable-rate bound 2/λmax are on Calculus and optimisation for ML: section 4 also derives momentum's rate, 0.519 per step on diag(1, 10); section 10 the minibatch noise floor; section 11 sharpness and the edge of stability). How the schedule's anneal phase is combined with a data switch in real pretraining runs is on Pretraining.

Momentum
a running sum or average of past gradients; steps along directions where gradients agree grow.
Preconditioner
whatever divides or transforms the gradient before the step: Adam's √v per coordinate, Shampoo's matrix roots.
Bias correction
Adam's division by 1 − βt, which undoes averages that started at zero.
Decoupled decay
AdamW's θ ← θ − ηλθ, applied outside the adaptive division.
Orthogonalise
replace a matrix by the nearest one whose singular values are all 1 (Muon, by Newton-Schulz iterations).
Warmup, cooldown
a ramp of η from near 0 at the start; a decay towards 0 at the end.
WSD
warmup, stable, decay: a constant rate with a short cooldown, so the run's length can be chosen late.
Critical batch
the batch size beyond which more examples per step stop saving steps (section 6).
The takeaway, as of October 2026
AdamW with warmup and a decaying schedule (cosine, or WSD when the run's length may change) is still the safe default. Muon on hidden matrices, with AdamW for everything else, is the challenger with frontier-scale evidence: it trained the 1T-parameter Kimi K2 and the GLM-4.5 family (section 4). But every independent re-tuning finds the challengers' speed-ups smaller than their papers report, and shrinking with model size: about 1.1× at 1.2B parameters against a well-tuned AdamW (Wen et al. 2025; section 5).
Every optimiser in one table (reference)
OptimiserUpdate, in one linestate per parameterWhat it fixedIts catch
SGD (mini-batch)θ ← θ − ηg0the baselineone step size for every direction
Momentum (heavy ball), Nesterovv ← βv + g; θ ← θ − ηv (Nesterov: gradient at the look-ahead)1zig-zag across ravines; speed along themstill one step size
AdaGraddivide by √(sum of all past g²)1per-parameter steps; sparse featuresthe sum only grows, so the rate dies
RMSPropdivide by √(decaying average of g²)1AdaGrad's dying rateno momentum, no bias correction
AdaDeltano global rate; step scaled by a running average of past updates2choosing ηrarely used now
Adammomentum m and RMSProp's v, both bias-corrected2a robust defaultL2 in the loss is rescaled per parameter
AdamWAdam plus decoupled decay θ ← θ − ηλθ2uniform weight decay; the LLM defaulttwo buffers of state
AdafactorAdam's v factored into row and column sumsabout 0optimiser memorya coarser second moment
Lionsign of an interpolated momentum1memory; found by program searchneeds a smaller rate and larger decay
Shampoo, SOAPprecondition rows and columns with L−1/4, R−1/4; SOAP runs Adam in their eigenbasis2 + factorsdirections that are not coordinatesmemory and matrix roots; one more knob
Muonorthogonalise the momentum of each hidden matrix (5 Newton-Schulz steps)1updates dominated by a few directionsmatrices only; the rest stays on AdamW
Schedule-freeconstant rate; gradient at an interpolation; iterates averaged1 or 2knowing the run's lengthevaluate at the average, not at the training point

On the parent page, not repeated here: its Training lab trains SGD, momentum, Adam, AdamW and Muon live on a small network with step, cosine or WSD schedules, and its Defaults across models tab lists the optimiser, betas, epsilon, rate, warmup, schedule, final rate, decay and clipping of 21 landmark models. This page owns the rules, the evidence and the schedule family.

Every optimiser on this page is one path through the same three boxes

Read left to right (top to bottom on a phone): the gradient gt is smoothed, reshaped, scaled by the schedule and applied with decoupled weight decay. The number under each box is the state it keeps per parameter, which is what an optimiser costs in memory (section 3). The schedule's shape is illustrative.

1 · Momentum: smooth the gradient over steps

The problem every method below answers is conditioning. When the loss curves 100 times more sharply across a valley than along it (condition number 100), the largest stable step for the steep direction is tiny for the shallow one, and gradient descent crawls along the floor while zig-zagging across it. Momentum adds up the gradients of successive steps: the components along the floor agree and grow, the ones across it flip sign and cancel.

Fig. 1, step by step

  1. A ravine 100 times steeper across than along. The race's axis-aligned surface, f = ((x − 1)² + 100(y − 0.6)²)/2, from the start at (−4, 1.2) to the minimum at (1, 0.6). Height is log10(1 + loss). The largest stable rate is set by the walls; the floor then gets a hundredth of the pull.
  2. Plain SGD: quick across, a crawl along. At its best constant rate (0.0178) the step across the walls shrinks within a few steps, but the step along the floor is that tiny rate times a tiny slope. After 150 steps the loss is still 0.057, short of 10−3.
  3. Momentum, close up: across cancels, along adds. Grey arrows are what each gradient alone would do at momentum's rate (0.01). Across the floor they point alternately up and down the walls and cancel in the sum; along it they all point the same way and accumulate. By step 12 the step along the floor is 27.7η against a gradient of 2.83: 9.8 times larger, approaching the 1/(1 − β) = 10 of a steady direction.
  4. Momentum over the run. The speed along the floor carries it to 10−3 at step 89; the swing across the walls dies out only slowly, because momentum also carries it (loss 2.3e-6 at step 150).
  5. Nesterov corrects before it steps. Taking the gradient at the look-ahead point damps the swing across the walls almost at once, so the whole step goes along the floor: 10−3 at step 24 (loss 4.5e-7 at step 150).

Each optimiser at its own best constant rate (a log grid, checks/tune.mjs), the exact torch.optim.SGD rule in float64 (checks/race_facts.json). All 13 rules on five surfaces are in the Optimiser race.

vt = β vt−1 + gt,   θt = θt−1 − η vt
gt
the gradient of the loss at θt−1 on the current mini-batch
vt
the velocity: past gradients, each older one weighted by a further factor β (usually 0.9)
η
the learning rate
  • Heavy ball (Polyak 1964). Along a consistent direction the step grows up to 1/(1 − β) = 10 times at β = 0.9. On a quadratic with condition number R, tuned momentum needs about √R times fewer iterations than steepest descent (Sutskever et al. 2013, section 2). Momentum 0.9 is not the optimum for this valley; the √R speed-up needs momentum tuned to the curvature, which nobody knows for a network, so 0.9 is the habit.
  • Nesterov (NAG) (Nesterov 1983, in Sutskever et al.'s form): take the gradient at the look-ahead point θ − ηβvt−1, where momentum is about to carry you, so the step is corrected before it is taken. PyTorch implements the equivalent rewrite θ ← θ − η(gt + βvt), which needs no second gradient evaluation.
  • Two conventions, one trap. The formula above is PyTorch's (torch.optim.SGD, dampening 0): a sum. Many papers write vt = βvt−1 + (1 − β)gt, an average; it traces the same path only with a learning rate 1/(1 − β) = 10 times larger, so a rate never transfers between the two without that factor.
The landscape vocabulary: optima, saddles, simultaneous updates, batch, stochastic and mini-batch (basics)
  • Local optimum: the gradient is zero and moving in any direction increases the loss.
  • Saddle point: the gradient is zero, but the loss decreases along some directions and increases along others (a horse saddle); the second derivative says it is neither a maximum nor a minimum. Saddles are frequent in high dimensions but are not a big problem in practice: the descending direction is there to be found, and momentum, mini-batch noise and even floating-point rounding push the optimiser off. In the race's Saddle, starting 0.001 off the ridge, plain SGD needs 15 steps to leave, while Adam, AdaGrad and RMSProp leave on the first step, because they divide the tiny gradient by its own size.
  • All parameters update simultaneously. J(θ0, θ1) is always evaluated at the previous parameters: compute every gradient first, then update every weight. Updating θ0 and then using the new θ0 to compute θ1's gradient is a different (coordinate-descent) algorithm.
VariantGradient computed onTrade-off
Batch gradient descentthe entire training setdeterministic descent to a (local) minimum, but slow and expensive per step
Stochastic gradient descent (SGD)one random examplecheap and fast, but noisy; may never settle at the minimum
Mini-batch gradient descenta small batchstandard in practice: efficient, less noisy than one example, hardware-friendly. "SGD" in code (torch.optim.SGD) almost always means this

The noise matters for the schedule: with a noisy gradient a constant rate cannot converge, only hover in a region whose size grows with the rate (section 7).

2 · Per-parameter steps: Adam and AdamW

Scale each parameter's step by its own gradient history: divide by the square root of an average of its squared gradients, coordinate by coordinate (a diagonal preconditioner). AdaGrad sums every past g², so its rate only falls; RMSProp replaces the sum with a decaying average; Adam adds momentum and a bias correction; AdamW moves weight decay out of the division.

mt = β1mt−1 + (1−β1)gt,   vt = β2vt−1 + (1−β2)gt²
m̂t = mt/(1−β1t),   v̂t = vt/(1−β2t),   θt = θt−1 − η m̂t/(√v̂t + ε)
m, v
running averages of the gradient and of its square, per parameter, both started at zero
β1, β2
their decay rates; the paper's defaults are 0.9 and 0.999, with η = 0.001 and ε = 10−8 (Kingma and Ba 2014, Algorithm 1)
1 − βt
the bias correction: the share of the average that is real data rather than the zero it started from

The step m̂/√v̂ is roughly the sign of the gradient, scaled by how consistent it has been: about 1 when every recent gradient agrees, smaller when they disagree. So Adam's step is bounded by about η per parameter, whatever the size of the gradient, which is why one learning rate works across very different layers.

The limit no diagonal method escapes

AdaGrad, RMSProp and Adam rescale each coordinate. That helps exactly when the directions of very different curvature are the coordinates. In a network, the weight-space directions of high curvature are rarely single weights.

Fig. 2, step by step

  1. One gradient, two very different coordinates. At the start of the race's axis-aligned ravine the gradient is (−5, 60): the columns on the right. Plain SGD steps along −g, almost entirely across the valley, and one rate has to serve both sizes.
  2. Adam divides each coordinate by its own size. On step 1, m̂ = g and √v̂ = |g|, so the step is g/|g| per coordinate: x and y both move by 1.00η and 1.00η. The step's size no longer depends on the gradient's.
  3. On this valley, that fixes the conditioning. The steep direction is the y coordinate, so a per-coordinate scale undoes the curvature directly: AdaGrad and RMSProp reach 10−3 at step 15 and 15, Adam at 46, Nesterov (faint) at 24.
  4. Turn the valley 45°. The same valley rotated about its minimum. Now the gradient's coordinates are alike (46 and 39 at the start), so dividing each by its own size cannot tell the steep direction from the shallow one: Adam's first step points straight across the valley.
  5. The per-coordinate methods lose their advantage. After 150 steps AdaGrad is at a loss of 0.27 and RMSProp at 0.042, neither near 10−3; Adam, helped by its momentum, needs 50 steps.
  6. A full-matrix preconditioner turns with the valley. Shampoo (here full-matrix AdaGrad, H−1/2) learns the valley's own axes: its accumulated preconditioner (the purple cross) steps 15 times further along the floor than across it. It lands in 24 steps on the rotated valley, as on the original (24); Nesterov is unchanged too (24), because its update is rotation-invariant.

Same valley, same start relative to the minimum, each optimiser at its best rate for each surface (checks/race_facts.json); Shampoo is the one rotation-invariant preconditioner here.

The lineage: AdaGrad, RMSProp, AdaDelta; β2 and ε in practice (depth)
OptimiserIdeaStrength and weakness
AdaGrad (Duchi, Hazan and Singer 2011)θ ← θ − η g / (√(Σ g²) + ε), the sum over every past stepGood for sparse features (a rarely seen feature keeps a large step). But the denominator only grows, so the rate decays towards nothing.
RMSProp (Hinton, lecture 6e, 2012)v ← ρv + (1 − ρ)g² (0.9 in the lecture, 0.99 in PyTorch)Fixes AdaGrad's dying rate; good for online and non-stationary problems. Never published as a paper: the citation is a slide.
AdaDelta (Zeiler 2012)no global learning rate at all: the step is scaled by a running average of past updates divided by one of past gradients, so its units match θ'sRemoves the choice of η; rarely used now.
  • β2: 0.999 is the paper's default for sparse and vision problems; 0.98 in the original Transformer (section 5.3); 0.95 in most LLM pretraining (GPT-3, Llama; DeepSeek-V3: β = (0.9, 0.95), weight decay 0.1, section 4.2; SmolLM3 the same, blog; others on the parent's Defaults across models tab). A shorter memory reacts faster when gradient statistics shift, at the price of a noisier v.
  • ε: 10−8 by default and 10−9 in the Transformer; it only matters where √v̂ is tiny, but there it caps the step, so a parameter with near-zero gradients moves at most η·m̂/ε.
  • Sparse gradients need a long memory in v (β2 near 1), which the Adam paper names as exactly the case where an uncorrected v starts far too small: in the bias-correction figure, the sparse parameter's corrected step on step 11 is 0.46η against 1η on step 1 (β2 = 0.999), because its m and v still remember the earlier spikes.

Bias correction. Both averages start at zero, so for the first steps they are too small; dividing by 1 − βt undoes that. Without it a steady gradient's step overshoots, by 6.57 times at step 12 with β2 = 0.999 (the figure, which opens on step 12; the dashed lines are the uncorrected run). The overshoot is the paper's own warning: "values β2 close to 1 indeed lead to instabilities in training when no bias correction term was present, especially at first few epochs" (Kingma and Ba, section 6.4). With β2 = 0.95, the value most LLM runs use, the uncorrected step is within 10% of correct from step 6 on (numbers below).

The uncorrected step in numbers (depth)

In numbers (recompute.py): without correction a steady gradient gives a step of (1 − 0.9t)/√(1 − β2t) times η. With β2 = 0.999 that is 3.16η on step 1, a peak of 6.57η at step 12, still 3.24η at step 100 and 1.26η at step 1,000. With β2 = 0.95 the uncorrected step starts too small (0.45η), peaks 10% too large around step 20 and stays within 10% of correct from step 6 on, one reason the correction matters less for LLM runs, which mostly use 0.95.

Why warmup

Bias correction removes the bias of v̂, not its noise. On step 1, m̂/√v̂ = g/|g|: every parameter moves by exactly η, whatever its gradient, and for the next few steps v̂ is an average of a handful of squares, so per-parameter steps are large and erratic. Liu et al. 2019 (RAdam) name this: the variance of the adaptive learning rate "is problematically large in the early stage", and warmup works as variance reduction. Warmup ramps η from near zero until the statistics can be trusted; RAdam instead switches the adaptive term on only once enough steps have accumulated. A post-norm transformer is especially sensitive (the original Transformer warmed up for 4,000 steps). Warmup length is optimiser-dependent and worth tuning rather than copying (Semenov et al. 2025, takeaway 5).

Without bias correction, a steady gradient's step overshoots 6.57 times at step 12

Try: three parameters receive three kinds of gradient: a steady tiny one, pure noise, and a sparse one that fires every tenth step. Scrub through Adam as published, then switch to uncorrected and scrub the same 40 steps again (dashed lines show the other mode). Then set β2 to 0.95, the value most LLM runs use.

Bars are to scale within each column across all 40 steps and both modes; the step column runs from −7 to 7 times the learning rate. Chart: |step| ÷ lr per parameter, solid for the mode shown, dashed for the other. β1 = 0.9, ε = 10−8; the gradient streams are illustrative (the noisy one is seeded). The corrected rule is torch.optim.Adam's.

AdamW: why weight decay must leave the division

Put L2 in the loss and its gradient λθ goes through Adam's division by √v̂ like everything else: a weight whose gradient is large and noisy is barely decayed, and a weight whose gradient is tiny is pulled towards zero at up to the full step η. AdamW applies θ ← θ − ηλθ outside the division, so every weight decays alike (Loshchilov and Hutter 2017).

For plain SGD the two are the same up to a rescaling of λ by the learning rate (Loshchilov and Hutter, abstract). Because AdamW's decay per step is ηλ, it shrinks with the schedule. In code, torch.optim.Adam(weight_decay=...) is the L2 version; AdamW is the decoupled one.

L2 inside Adam decays quiet weights 10 times too hard and noisy ones 10 times too little

derived: one weight θ = 1 with λ = 0.1 and η = 10−3, at steady state, its gradient noise of mean 0 and RMS σ. L2 in Adam: m̂ ≈ λθ and √v̂ ≈ √(σ² + λ²θ²), so the shrink per step is ηλθ/√(σ² + λ²θ²). AdamW: ηλθ = 10−4 for every weight. The ratio runs from 10 at σ = 0.001 to 0.1 at σ = 10 (ns_data.py). The step-by-step animation of both on the same noise, and the regularisation side, are on Regularisation, section 3.

3 · Beyond the diagonal: Shampoo, SOAP, Adafactor, and what the state costs

A weight is a matrix W (m × n), and its gradient's high-curvature directions mix rows and columns. Matrix-aware preconditioners act on both sides of it.

  • Shampoo (Gupta, Koren and Singer 2018) keeps one m × m factor for the rows and one n × n factor for the columns, L ← L + G G⊤ and R ← R + G⊤G, and steps W ← W − η L−1/4 G R−1/4: a Kronecker-factored approximation of full-matrix AdaGrad at m² + n² memory instead of (mn)². The matrix roots are expensive, so practical versions recompute them only every few steps.
  • SOAP (Vyas et al. 2024) starts from the observation that Shampoo (with the 1/2 power) is Adafactor run in the eigenbasis of Shampoo's preconditioner, and replaces Adafactor with Adam: rotate the gradient into the eigenbases of L and R, run Adam there, rotate back. Its one hyperparameter beyond Adam's is how often the eigenbasis is refreshed.
  • Adafactor (Shazeer and Stern 2018) goes the other way, towards less memory: it keeps only the row and column sums of each matrix's squared gradients and rebuilds a rank-1 estimate of v from them, "from O(nm) to O(n+m)". It was the optimiser of T5.

Fig. 3, step by step

  1. One real weight matrix. W is one of Kimi K2's 69,300 expert matrices, 7,168 × 2,048 (14.7M weights; shape from its config.json). Every step a gradient G of the same shape arrives. Every plate in the figure is drawn to the same scale, so a slab the size of W is one state value per weight.
  2. Adam and AdamW: two more slabs. m and v are the size of W: 2 values per weight, whatever the shape.
  3. Muon: one slab. Only the momentum: 1 value per weight on hidden matrices (embeddings, head and 1-D parameters stay on AdamW, section 4).
  4. Adafactor: a row and a column. v is rebuilt from one sum per row and one per column, 9,216 values for 14.7M weights: 0.0006 per weight, at the price of a rank-1 estimate of v.
  5. Shampoo: a factor per side. L accumulates GG⊤ and R accumulates G⊤G, each as large as its side squared; the step sends G through both, L−1/4GR−1/4. R alone is 3.5 times the size of W, because the matrix is long and thin: 3.79 values per weight, before any blocking.
  6. SOAP: the eigenbases too, and Adam inside them. Each factor's eigenbasis is another plate the same size, and Adam's m and v run in the rotated basis: 2 + 2 × 3.79 = 9.57 values per weight for this matrix, and 9.54 over the whole model (soap.py's defaults; the table below).
Newton, quasi-Newton, full-matrix AdaGrad and Shampoo's exponent; SOAP's reported gains (depth)
  • Newton's method uses the Hessian H, the matrix of second derivatives: θ ← θ − H−1∇J. It undoes the curvature in every direction at once and converges in far fewer steps, but H has n² entries (O(n²) memory) and inverting it costs O(n³): for a network with 109 weights, impossible. Quasi-Newton methods (L-BFGS) build a low-rank approximation from recent gradient differences and Hessian-free methods use Hessian-vector products; both work for small, full-batch problems and break down with mini-batch noise. The practical descendants are the structured preconditioners above.
  • Full-matrix AdaGrad (Duchi et al. 2011) divides by the square root of the whole matrix Σ g g⊤ instead of its diagonal: rotation-invariant, but n² again.
  • Shampoo's exponent: for a tensor of order k each factor gets −1/(2k); for a vector (k = 1) that is −1/2, which is full-matrix AdaGrad (derived from Gupta et al. 2018, section 4.2). That is what the race's 2-D Shampoo runs.
  • SOAP's reported gains: on 360M and 660M language models with 2M-token batches, at least 40% fewer iterations and at least 35% less wall-clock time than AdamW, and about 20% better than Shampoo on both (Vyas et al.).

What the optimiser state costs

In mixed precision with Adam, each parameter needs 2 bytes for the bf16 weight, 2 for its gradient, 4 for an fp32 master copy and 4 each for m and v: 16 bytes (ZeRO; 2 + 2 + 4 + 4 × 2 = 16, reproduced by construction). Optimiser states "use 33–75% of the total memory footprint during training" (Dettmers et al. 2021). Where that state lives across GPUs (ZeRO stages, FSDP) is on Distributed Training.

How the state is counted (provenance)

State values per parameter are counted per matrix: Adam 2mn, Muon mn on hidden matrices and 2mn on the embedding, output head and every 1-D parameter (norms, router biases), Adafactor m + n, SOAP 2mn plus, for each side d ≤ 10,000, a d × d factor and its d × d eigenbasis (max_precond_dim = 10000 and precondition_1d = False are soap.py's defaults; larger sides, such as a vocabulary, get no factor). Bytes: 4 per state value, 1 for 8-bit Adam. Training bytes per parameter = 2 (bf16 weight) + 2 (bf16 gradient) + 4 (fp32 master) + state bytes, before activations and before any ZeRO sharding. Parameter recounts: SmolLM3 3.08B, OLMo 2 7.30B, Llama 3.1 405.85B, Kimi K2 1,026.41B (within 3,416 parameters of Hugging Face's count; the K2 report's 1.04T is discussed on Moonshot AI: Kimi). Shampoo is not listed because its memory depends on the blocking an implementation chooses.

Muon keeps about half of AdamW's state; SOAP on Kimi K2 keeps about nine times the parameter count

Try: switch models. Muon's state is a little more than half on small models, whose embedding is a bigger share (89% of OLMo 2 7B sits in hidden matrices, 99.8% of Kimi K2). SOAP's state on Kimi K2: each of its 69,300 expert matrices (7,168 × 2,048) carries a 7,168 × 7,168 factor and a 2,048 × 2,048 one, each with its eigenbasis.

Counted per matrix from each model's config.json, 4 bytes per state value (1 for 8-bit Adam), before activations and ZeRO sharding; the counting rules are in the closed block below.

4 · Orthogonal and sign updates: Muon and Lion

Muon

A gradient matrix is usually dominated by a few singular directions, so an SGD or Adam step moves mostly along them. Muon (Keller Jordan, 2024; "MomentUm Orthogonalized by Newton-Schulz") replaces each hidden matrix's momentum by the nearest semi-orthogonal matrix, so every direction the gradient spans gets a comparable step and rare directions are not drowned out. Bernstein derives it as steepest descent under the spectral norm.

Fig. 4, step by step

  1. The gradient's 32 directions. The momentum of one real 64 × 176 hidden matrix (the parent page's toy, layer 8's first feed-forward matrix, batch 32; inputs/root_gradient_sv.json), normalised to Frobenius norm 1, has singular values from 0.04 to 0.32: the strongest direction is 7.3 times the weakest, so an SGD or Adam step moves mostly along the first few.
  2. Iteration 1. X ← aX + (bXX⊤ + c(XX⊤)²)X keeps the singular vectors and maps every value σ to aσ + bσ3 + cσ5 (the purple curve on the right; dashed: output = input). Small values are lifted fast, by up to a = 3.4445 times: the range is now 0.15 to 0.95.
  3. Iteration 2. Values above about 1 are pushed back down, values below lifted again: 0.50 to 1.20. The orange plane is the target, every value 1, which is the orthogonal matrix UV⊤.
  4. Iterations 3 to 5. The values oscillate inside a band around 1 and end between 0.68 and 1.13, a spread of 1.66 : 1, against 7.3 : 1 before (grey: the gradient's own values).
  5. Close to orthogonal, and fast. Not exactly 1: the coefficients trade precision for speed on the smallest values, which the authors found does not hurt. Every direction the gradient spans now gets a comparable step, and no singular value decomposition was ever computed.

Because each iteration keeps the singular vectors, the five scalar maps in Fig. 4 are exact (ns_data.py).

For one m × n hidden weight with gradient G (the defaults of the reference code and of torch.optim.Muon):

  1. Momentum B ← μB + (1 − μ)G with μ = 0.95, and the Nesterov-style update U = (1 − μ)G + μB.
  2. Normalise U to unit Frobenius norm, then five iterations with (a, b, c) = (3.4445, −4.7750, 2.0315): approximately UV⊤ from U's singular value decomposition, without computing one. The coefficients were tuned to lift small singular values as fast as possible, so the output's singular values land roughly between 0.5 and 1.5 rather than exactly at 1, which the authors found does not hurt (Fig. 4 ends at 0.68 to 1.13).
  3. Step W ← W − η·s·X, where s rescales for the matrix's shape: √max(1, m/n) in Jordan's version; Moonshot's 0.2·√max(m, n), which matches the update's size to AdamW's typical RMS of 0.2 to 0.4 so AdamW's learning rate and decay can be reused (Liu et al. 2025, section 2.2). PyTorch offers both as adjust_lr_fn options.
  • Which parameters: only 2-D hidden matrices; a 1-D parameter has nothing to orthogonalise. Embeddings, the output head, norms and biases stay on AdamW; Jordan found using AdamW for the embedding and head important even though they are 2-D. GLM-4.5 runs Muon on "all parameters except word embedding, bias, and weights for RMSNorm" with 5 Newton-Schulz steps, momentum 0.95 and update RMS 0.2 (GLM-4.5, section 2.4).
  • Cost: one state buffer instead of AdamW's two (Fig. 3 and the memory table, section 3), and a FLOP overhead of at most T·m/B for T iterations, model width m and batch B tokens: 5 × 768 / 524,288 = 0.7% for the speedrun and 5 × 16,384 / 16M = 0.5% for a Llama 405B-sized run (Jordan's arithmetic, reproduced). The real catch is that orthogonalisation needs the whole matrix while large runs shard it, which is why Moonshot published a distributed version built on ZeRO-1 (Liu et al. 2025).
  • Scale: Moonshot added weight decay and the shape scaling and reported "~2x computational efficiency compared to AdamW with compute optimal training" (52% of the FLOPs) with the 16B Moonlight model; MuonClip (Muon plus QK-Clip, which rescales a head's query and key projections whenever its largest attention logit exceeds τ = 100) then trained the 1T-parameter Kimi K2 on 15.5T tokens "with zero loss spike" (Kimi K2 report; mechanism on Moonshot AI: Kimi).
  • Per head: Kimi K3 trains with Per-Head Muon, which orthogonalises each attention head's block of the Q, K and V momentum separately, because on the full matrix heads with larger gradients dominate the shared direction and small-scale heads are under-normalised (Moonshot AI: Kimi).
Muon's records and where it is implemented (provenance)
  • It set a NanoGPT speedrun record on 15 October 2024 (training 35% faster) and the CIFAR-10 record (94% in 2.6 A100-seconds, from 3.3); the speedrun record by record is on Pretraining.
  • torch.optim.Muon (docs; first in the PyTorch 2.9 documentation, inferred from the versioned docs) and optax.contrib.muon in JAX (docs). PyTorch runs the Newton-Schulz iterations in bfloat16 and defaults to weight decay 0.1.

Lion

Lion ("EvoLved Sign Momentum", Chen et al. 2023) was found by a program search over update rules. Its step is the sign of an interpolation between the momentum and the current gradient, and the momentum is updated afterwards with a different rate:

θ ← θ − η·(sign(β1m + (1−β1)g) + λθ),   m ← β2m + (1−β2)g
β1, β2
0.9 and 0.99 by default
  • One buffer of state, and every parameter moves by exactly ±η per step, larger than Adam's typical step: the paper recommends a learning rate 3 to 10 times smaller than AdamW's and a weight decay λ 3 to 10 times larger, to keep ηλ similar.
  • In the race, Lion's fixed-size steps zig-zag across the ravine and stall at a distance set by η unless the schedule decays: a constant-step method needs its schedule more than Adam does.
Lion's reported gains and its own limitations (provenance)
  • Reported gains: up to 2% ImageNet accuracy for ViT, up to 5× less pretraining compute on JFT, 2.3× less for diffusion; "similar or better" than Adam on language modelling. Its own limitations section: similar to AdamW on the large-scale language model and on C4 masked language modelling, gains shrink with strong augmentation, and "likely" no better than AdamW below batch size 64.

5 · The evidence: what the challengers deliver when the baseline is tuned

A new optimiser's paper compares against a baseline its authors tuned. Independent benchmarks that tune every method the same way keep finding smaller gains. Speed-ups are "how many times fewer steps or FLOPs to reach the same loss".

OptimiserClaimed by its authorsclaim, as a speed-upIndependent evidence
Muon"~2x computational efficiency" vs AdamW, 52% of the FLOPs (Liu et al. 2025)
1.92×
About 1.3× at 0.1B parameters, about 1.1× at 1.2B (8× Chinchilla tokens), the best matrix method at 1 to 4× Chinchilla tokens, overtaken by SOAP and Kron beyond (Wen et al. 2025). Keeps its data efficiency at batch sizes far beyond AdamW's critical batch, up to 4B parameters and 16M-token batches (Essential AI 2025).
SOAPat least 40% fewer iterations than AdamW at 2M-token batches (Vyas et al. 2024)
≥1.67×
About 1.3× at 0.1B, about 1.1× at 1.2B; overtakes Muon at higher token-to-parameter ratios (Wen et al.). "Surprisingly consistent" across batch sizes (Semenov et al. 2025).
Shampoo (distributed)(benchmark entry)no separate claimWon the AlgoPerf 2024 external-tuning track: score 0.7784 against the NAdamW baseline's 0.5707, about 28% faster training averaged over eight workloads (Kasimbeg et al. 2025).
Schedule-free AdamWmatches or beats tuned schedules with no schedule (Defazio et al. 2024)no single numberWon the AlgoPerf 2024 self-tuning track, the only entry above the baseline (0.8542 against 0.8194, about 8% faster), and second in external tuning (0.7077) (Kasimbeg et al.). AlgoPerf scores are not comparable between the two tracks.
Sophia2× fewer steps than Adam at 125M to 1.5B (Liu et al. 2023)
2×
Gains "vanish" against a baseline with a fully decayed learning rate on BERT and T5 (Kaddour et al. 2023); diverges in small-batch runs beyond the Chinchilla horizon (Semenov et al.).
Lionsimilar or better than Adam on language modelling; large gains on vision (Chen et al.)no single number for LMsGains vanish against a fully decayed baseline (Kaddour et al.); benefits greatly from larger batches (Semenov et al.); scalar-based methods average under 1.2× once tuned (Wen et al.).

Bars: claimed speed-up on a scale from 0 to 3×, the thin line at 1× (AdamW). Derived: 1/0.52 = 1.92; 1/(1 − 0.40) = 1.67 (a lower bound, iterations only). Independent figures are quoted, not converted.

What to conclude
  • Most of a published speed-up can be the baseline. Wen et al. find that tuning a single hyperparameter (the learning rate) in the GPT-3 recipe gives up to 2× on a 100M model: the size of many published gains. Kaddour et al. find that a baseline whose learning rate is fully decayed erases the gains of Lion and Sophia. Compare against a tuned, fully decayed AdamW at the same batch size, at more than one scale. The pattern holds beyond optimisers: Q Labs' backprop-free Dust is within 0.05 of backprop when both use plain SGD at 10M tokens, and 0.40 behind once both use Adam, in the lab's own benchmark (validation loss, one run each; Dust).
  • Matrix-aware methods (Muon, SOAP, Shampoo) are the ones that survive tuning, at about 1.3× for small models and shrinking with scale in Wen et al.'s runs, and with a measured end-to-end win for Shampoo in AlgoPerf.
  • Muon's scale evidence is real but not controlled: Kimi K2 and GLM-4.5 trained with it, Moonlight's scaling study is Moonshot's own, and neither the K2 nor the GLM-4.5 report includes a matched AdamW run at full scale. The two independent studies disagree mainly on batch size: Semenov et al. tune most at 0.1M and 0.02M-token batches, Wen et al. at 0.4M or more (as Wen et al. note).

6 · Batch size and the learning rate

A larger batch averages more examples per gradient, so the gradient is less noisy and a larger step is safe. Up to a point that buys fewer steps for the same data; beyond it, extra examples per step are wasted. McCandlish et al. 2018 fit this trade-off with one relation, (S/Smin − 1)(E/Emin − 1) = 1 (their equation 2.11), where S and E are the steps and training examples needed to reach a given loss, and define the critical batch Bcrit = Emin/Smin (equation 2.12). Solving with E = BS gives S = Smin(1 + Bcrit/B) and E = Emin(1 + B/Bcrit).

  • SGD: the linear scaling rule. "When the minibatch size is multiplied by k, multiply the learning rate by k", all other hyperparameters unchanged, with a gradual warmup that reaches kη after 5 epochs: ResNet-50 at a batch of 8,192 on 256 GPUs in one hour, matching small-batch accuracy (Goyal et al. 2017, sections 2.1 and 2.2). The rule fails at the start of training (hence the warmup) and at very large batches.
  • Adam and RMSProp: the square-root rule. For batch κB use η√κ, β1′ = 1 − κ(1 − β1), β2′ = 1 − κ(1 − β2) and ε/√κ (Malladi et al. 2022, Definition 5.2), derived from an SDE approximation of Adam. The β rule is the part usually forgotten, and it runs out: with β2 = 0.95, κ(1 − β2) reaches 1 at κ = 20.
  • Past the critical batch no rule helps: steps barely fall. Muon is reported to keep its data efficiency at batch sizes far beyond AdamW's critical batch (Essential AI 2025, linked below), and for LLMs the peak rate is usually found by sweeps at small scale and transferred by fitted scaling rules or by parametrisations such as μP, designed to keep the optimum fixed as width grows; Essential AI report μP transfer with Muon up to 3.7B parameters (2025).

At the critical batch you pay twice the minimum steps and twice the minimum data

Predict what an 8 times larger batch than Bcrit saves in steps, then drag.

derived from McCandlish et al.'s equations 2.11 and 2.12; the default (B = Bcrit) lands on their statement that training then "takes twice as many passes through the training data as an optimally data-efficient (small-batch) run would take, and twice as many optimization steps as an optimally time-efficient (large-batch) run would take", by construction of the formula. At 8 Bcrit: 1.12 times the minimum steps for 9 times the minimum data. Their critical batch grows during a run ("the noise scale increases as the loss decreases") and is predicted, at the order-of-magnitude level, by the gradient noise scale. The rate rules below are relative to a batch you have tuned, scaled by κ.

7 · Schedules: how the base rate moves over the run

A high rate early travels quickly towards a basin; a low rate late settles at its bottom. With noisy gradients there is a second reason: at a constant rate the iterate never converges but hovers in a region whose size grows with η, so the final loss is set by how low the rate gets at the end.

Fig. 5, step by step

  1. Noise on every gradient, a constant rate. The race's noisy ravine: the axis-aligned valley with Gaussian noise of standard deviation 1.5 on every gradient component (seed 1). Adam (rate 0.1) and Nesterov (0.00562) at their tuned constant rates reach the floor of the valley quickly, then stop improving: after 300 steps their losses are 3.4e-2 and 3.5e-2.
  2. Close up: they hover. The dots are their last 60 positions. Each step adds fresh noise as fast as the pull of the valley removes it, so the iterate wanders in a cloud whose size is set by the rate. Over seeds 1 to 20, Adam's loss over its last 60 steps averages 0.031.
  3. Cosine: the same peak, decayed to zero. Early steps are as fast as before; late steps are small enough to average the noise out, so the cloud shrinks onto the minimum: Adam ends at 2.8e-4 and Nesterov at 1.1e-4, about a hundred times below the constant-rate floor (over 20 seeds, Adam's cosine run ends at 0.011 on average).
  4. WSD: hover, then cool down. Constant for the first 240 steps, then a 1−sqrt cooldown over the last 20%: the path hovers at the floor until the cooldown starts, then settles below it, ending at 9.6e-3 (Adam) and 1.0e-2 (Nesterov). Here that is above cosine, whose decay is longer.

300 steps, the same peak rate under each schedule. For plain SGD the 20-seed floor is 0.103 and cosine ends at 0.062 (checks/race_facts.mjs).

Two questions separate every schedule family: does it need the total number of steps T in advance, and what shape is the decay.

SchedulershapeRuleNeeds T?Where it lives
Warmup + cosinea linear ramp from about 0, then ηmin + (ηmax − ηmin)(1 + cos(πt/T))/2 (here to 10% of the peak)yesclassic LLM pretraining (Kaplan, Chinchilla, Llama); still the single most common recipe
WSD, trapezoid (MiniCPM)warmup, a long constant plateau, a short cooldown over the last 10 to 20%no: the decay start is chosen laterMiniCPM, DeepSeek-V3, Kimi K2, ERNIE 4.5, SmolLM3
Linear decay to zeroa straight line from the peak to 0yesthe fine-tuning default: the Hugging Face Trainer's lr_scheduler_type defaults to "linear", with 0 warmup steps unless set (docs)
Inverse square root (Noam)η ∝ 1/√t after a linear warmupnothe original Transformer: d−0.5·min(t−0.5, t·w−1.5) with w = 4,000 (Equation 3), a peak of 512−0.5·4,000−0.5 = 6.99 × 10−4 (derived); degrades gracefully if the run is extended
Constant (after warmup)flat at ηpeaknothe base case of every decay-free method (section 8); on its own it ends visibly above an annealed run

Sparklines: 100 steps, rate as a share of its own peak; equal to torch.optim.lr_scheduler to 10−15 where PyTorch has the shape (checks/sched_check.py); warmup lengths are illustrative. Eight more shapes (step, exponential, warm restarts, one-cycle, plateau, schedule-free, WSM) are in the closed reference table in Depth.

Cosine's cost is easiest to see when you want models at several lengths, say 250, 500 and 1,000 steps (to fit a scaling law, or because you do not yet know how long you can train). Fig. 6 runs plain SGD on the noisy quadratic model of Zhang et al. 2019 (illustrative toy, exact expected losses); each curtain is one run's rate as a share of its peak, and its length is what it costs.

Fig. 6, step by step

  1. Cosine must know its length. Each endpoint is a separate run from step 0, its rate tuned for that length (1.0, 0.56, 0.42). Three endpoints cost 250 + 500 + 1,000 = 1,750 steps.
  2. WSD branches cooldowns off one trunk. One constant-rate trunk (rate 0.18, tuned once for 1,000 steps) is shared; each length branches a 1−sqrt cooldown over its last 20% off it. Three endpoints cost 800 + 50 + 100 + 200 = 1,150 steps.
  3. Schedule-free reads all three off one run. Schedule-free SGD keeps a constant rate (0.32) and averages its iterates on the fly: one run of 1,000 steps, read at 250, 500 and 1,000 with no cooldown at all: 1,000 steps.
  4. What each endpoint reaches. Expected loss at each length. Re-tuned for each length, cosine is lowest everywhere (0.0014 at 1,000); schedule-free (0.0018) and WSD (0.0022), tuned once, come within 26% and 54% at 1,000 and are further behind at 250 (0.0050 against 0.0097 and 0.0108), where their single rate is too low. All three end far below the never-decayed rate (grey, 0.0063).
How the three-endpoints toy works, and what it does not show (depth)

The model: 10 coordinates with curvatures from 1 down to 0.01 (condition number 100), start at 1, gradient noise with covariance 0.09·H, plain SGD. The losses are exact expected values computed by recursion (no sampling); checks/nqm_check.py matches them with 4,000 seeded PyTorch runs (torch.optim.SGD and schedulefree.SGDScheduleFree), largest deviation 2.1 standard errors. Learning rates: the best of a log grid (10k/8), cosine re-tuned per length, the others tuned once for 1,000 steps. Grey line: the same SGD at its best constant rate, never decayed. Re-tuned for each length, cosine reaches the lowest loss at every endpoint here, by 1.3 to 2.2 times; schedule-free and WSD, tuned once, come within 26% and 54% at 1,000 steps and are further behind at 250, where their single rate is too low; all three end 2.9 to 4.4 times below the never-decayed rate. A quadratic favours schedules that decay throughout; in LLM pretraining tuned constant-plus-cooldown runs match cosine (below), and schedule-free gives "strong (but not optimal)" results there (Hägele et al., section 4.2). What the toy shows exactly is the cost structure.

How the schedules compare

  • At a fixed, known budget, final quality is a near-tie. "The constant learning rate with a short cooldown (< 20% of total training steps) can achieve the same final loss as cosine, and only outperforms for a longer fraction of cooldown steps", and it "scales predictably and reliably similar to cosine" (Hägele et al. 2024), which is why WSD spread so fast. Not everyone agrees: GLM-4.5 chose cosine because WSD runs "perform worse on general benchmarks (SimpleQA, MMLU)" (section 2.4).
  • Cosine's real cost is optionality, not loss. Every checkpoint before the end of a cosine run sits at a rate that is still high, so it is worse than a run planned to stop there: you cannot stop early, extend the run, or reuse it at another length. Kaplan et al.'s scaling laws read such intermediate checkpoints, and Chinchilla corrected it with one schedule per training length: "overestimating the number of training steps beyond 25% leads to clear drops in performance" (Chinchilla, Appendix B). WSD branches or a WSM merge give honest intermediate models.
  • Cooldown shape, length and end: roughly the last 10 to 20% of steps, to well below 10% of the peak (evidence below); and 1−sqrt "consistently performs better than linear decay" (Hägele et al., takeaway 2), and both beat convex shapes (exponential, EMA-like), which linger at a high rate and then collapse too fast.
  • The cooldown is also a data lever: labs up-weight curated mathematics, code and instruction-like data while the rate falls, so in practice the schedule and the data anneal are one decision; how that is done and how to separate the two effects is on Pretraining (what goes into the mixture: Data mixing).
Cooldown length, the final rate, and weight averaging: the evidence (depth)
  • A dissent on shape:: Semenov et al. find that for most optimisers "the cosine scheduler dominates".
  • Cooldown length: roughly 10 to 20% of the steps, with diminishing returns beyond. MiniCPM found "a decay of 10% of the total tokens is sufficient to achieve the best results, while a decay of 2.5% of total tokens falls short" (section 4.3); for long runs a shorter fraction can suffice if it is long enough in absolute steps (Hägele et al.).
  • The final rate matters, and 10% of the peak is a habit, not an optimum. Chinchilla decayed by 10× and found it "slightly more performant" than decaying to 0 (Appendix B); Llama 2 used 10%, Llama 3 405B 1%. Bergsma et al. 2025 find that linear decay to zero beats 10× decay at compute-optimal dataset sizes and beyond, and that the gap grows with tokens per parameter (a 610M model at 80 tokens per parameter with decay to zero beat the same model at 200 with 10× decay: about 60% less compute); Semenov et al. 2025 find decaying below 10% "significantly improves the results" but that the best final rate differs by schedule (in their runs a final rate of 1% of the peak beat decaying all the way to 0).
  • Weight averaging substitutes for part of the decay. Averaging along the trajectory (SWA, EMA) improves checkpoints at no training cost: "While it does not match the cooldown, it reduces the gap without the need for a separate decay phase" (Hägele et al., takeaway 5). WSM turns this into a full replacement (section 8).
Correction
The old version of this page said that decaying nearer to zero "improves loss but can hurt some downstream benchmarks". No source for the downstream part was found, and the evidence points the other way: Bergsma et al. report that trends in validation loss also hold for downstream evaluations. The nearest benchmark finding, GLM-4.5's, is about the schedule's shape (WSD against cosine), not the final rate.

Finding the peak, and choosing a schedule

The schedule's shape is less sensitive than its peak. The learning-rate range test (Smith 2015, section 3.3): train for a few epochs "while letting the learning rate increase linearly between low and high LR values", and read off where the loss starts to fall and where it turns noisy or rises: one run gives both a good rate and a good range, in Smith's words. For LLMs, sweeps at small scale and transfer (section 6).

  • LLM pretraining whose length may change or be extended: WSD, 1−sqrt cooldown over the last 10 to 20%.
  • LLM pretraining at a fixed, final budget: warmup then cosine, to well below 10% of the peak (or linear to zero, Bergsma et al.).
  • Supervised fine-tuning: linear or cosine to zero, 3 to 5% warmup (a convention; the Trainer's default warmup is 0).
  • A small supervised model with a cheap, steady validation metric: ReduceLROnPlateau or MultiStep.
  • No schedule at all: schedule-free, or WSM (next section).

8 · Decay-free: schedule-free optimisation and WSM

WSD removed the need to know T, but not the decay: you still choose when to start it, over how many tokens and with which curve, and extending training after the decay has begun means rolling back to the pre-decay checkpoint. Two methods remove the decay itself.

Schedule-free (Defazio et al. 2024)

yt = (1−β)zt + βxt,   zt+1 = zt − γ∇f(yt),   xt+1 = (1−ct+1)xt + ct+1zt+1
z
the plain SGD (or Adam) sequence, at a constant rate γ
x
a running average of z, with ct+1 = 1/(t+1) at a constant rate (weighted by γt² with warmup); this is the model you evaluate
y
the point where the gradient is taken, between the two; β ≈ 0.9 plays the role of momentum
  • Averaging iterates is old; the trick is taking the gradient at the interpolation y, which makes the average converge as fast as a well-tuned decay without knowing T (The Road Less Scheduled, section 2; NeurIPS 2024 oral). It won AlgoPerf's 2024 self-tuning track (section 5). In Fig. 6 it reads all three endpoints off one run.
  • In code, call optimizer.eval() before evaluating or saving: the weights held during training are y, not the average x (practice notes below).
  • Both variants are in the Optimiser race, checked against the schedulefree package; on the noisy ravine they go below the constant-rate floor with no schedule.
Schedule-free in practice (depth)
  • In practice (repository README): call optimizer.train() and optimizer.eval() wherever you call them on the model, and keep the optimiser in eval mode when saving checkpoints, because the weights held during training are y, not the average x you should evaluate; warmup is still recommended; β = 0.9 by default, and 0.95 or 0.98 may be needed for very long runs; rates 10 to 50 times larger than classical ones for SGD, 1 to 10 times for AdamW.

WSM: Warmup-Stable and Merge (Tian et al. 2025)

The rate warms up, then stays constant forever; checkpoints are saved periodically, and a weighted merge of the last n of them stands in for the annealed model. The link to decay is exact: merging checkpoints with weights cj is algebraically the same as applying per-step weights wi = Σj≥i cj to the updates after the base checkpoint, so any monotone decay curve can be inverted into merge weights (ck = wk, cj = wj − wj+1, c0 = 1 − w1). Mean averaging corresponds to linear decay, EMA to a convex decay, and cosine or 1−sqrt can be built directly. The framework is optimiser-agnostic and needs no change to the training loop. Details, a live toy and the equivalence test are on the WSM paper page.

WSM's results and practical read (depth)
  • Results (a 16.3B-parameter MoE with 1.4B active, 400B tokens branched off a 10.2T-token constant-rate checkpoint, with a switch to the high-quality annealing set): merge duration mattered far more than the checkpoint interval or the number of checkpoints merged, and EMA merging was the weakest, mirroring the convex-is-worse order above.
  • Practical read: the storage cost (one checkpoint per interval) is small next to a pretraining budget, and a merge is a cheap, repeatable proxy for "how good would this model be if I annealed now", with no throwaway decay runs to gauge progress.
Correction
The old page said WSM "beat a matched WSD decay by ~1.3 points on average". The paper's +1.28 points (62.67 to 63.95, average of 41 benchmarks) compares the best checkpoint of each run; when both stop at WSD's 400B tokens the gain is +1.18 (derived from Figure 3); each comparison is a single run, and the checkpoint was picked on the test benchmarks.

9 · Depth: reference tables, the annealing vocabulary, common mistakes

Eight more schedule shapes, with PyTorch's names (reference)
SchedulershapeRuleNeeds T?Where it lives
StepLR, MultiStepLRmultiply by γ (often 0.1) at fixed milestonesyes (milestones)the ResNet and ImageNet era; still fine for small supervised jobs
ExponentialLRηt = η0γtnoconvex and fiddly to tune; rarely competitive
CosineAnnealingLRηmin + (ηmax − ηmin)(1 + cos(πt/T))/2, no warmupyesthe PyTorch building block of warmup + cosine
CosineAnnealingWarmRestarts (SGDR)cosine cycles, each restarting at ηmaxper cycle onlysnapshot ensembles (Huang et al. 2017: one model saved at the end of each cycle) and vision; essentially absent from LLM pretraining
OneCycleLR (super-convergence)ramp to a peak well above the usual rate, then anneal far below the starting rateyesshort fine-tuning runs, the fastai lineage
ReduceLROnPlateaucut the rate by a factor when a monitored metric stops improving (sparkline illustrative)noreactive: good for small supervised runs; bad for LLM runs (feedback from noisy evaluations, and a schedule nobody can reproduce)
Schedule-free (Defazio et al.)constant rate plus principled iterate averaging instead of a decay curvenoopen-ended runs; NeurIPS 2024 oral (section 8)
WSM (Tian et al. 2025)constant rate forever; the decay is emulated afterwards by merging saved checkpointsno2025, Ant Group's Ling team (section 8)

PyTorch settings of the sparklines: MultiStepLR milestones 50 and 75; ExponentialLR γ = 0.97; SGDR T0 = 25; OneCycleLR defaults.

What real runs used: eight landmark schedules (reference)
RunOptimiserSchedulefinal rate / peak
Transformer (2017)Adam (0.9, 0.98), ε 10−94,000 warmup steps, then inverse square root (section 5.3)no end
Llama 2 (2023)AdamW2,000 warmup steps, cosine "down to 10% of the peak" (section 2.2)10%
Llama 3 405B (2024)AdamW, peak 8 × 10−58,000 warmup steps, cosine to 8 × 10−7 over 1.2M steps (section 3.4.1)1%
DeepSeek-V3 (2024)AdamW (0.9, 0.95), decay 0.12K warmup steps to 2.2 × 10−4, constant until 10T tokens, cosine to 2.2 × 10−5 over 4.3T, then 2.2 × 10−5 for 333B and 7.3 × 10−6 for the last 167B (section 4.2)3.3%
Kimi K2 (2025)MuonClipWSD: 500 warmup steps, 2 × 10−4 constant for 10T tokens, cosine to 2 × 10−5 over 5.5T, then an anneal to 7 × 10−6 over 400B + 60B (section 2.5)3.5%
SmolLM3 (2025)AdamW (0.9, 0.95), decay 0.1WSD: 2,000 warmup steps, linear decay to 0 over the final 10% (blog)0
GLM-4.5 (2025)Muon (+ AdamW for embeddings, biases, norms)warmup to 2.5 × 10−4, cosine to 2.5 × 10−5; chose cosine over WSD (section 2.4)10%
ERNIE 4.5 (2025)not stated here"All models use the Warmup-Stable-Decay learning rate schedule" (report, section 3.3)not stated

Final rate / peak derived from the quoted values. Every other landmark model's settings are on the parent page's Defaults across models tab.

"Annealing" and "learning-rate decay": three meanings (vocabulary)
SenseWhat it meansWhere you meet it
1. Classical, optimisationLowering the learning rate, full stop. Borrowed from simulated annealing, where a temperature is reduced so the search settles. Here annealing and decay are exact synonyms."cosine annealing", CosineAnnealingLR, eta_min; anything before 2023
2. Modern LLM pretrainingA training phase (the final 10 to 30% of tokens or so) defined by two simultaneous changes: the rate decays towards zero and the data mixture switches to curated high-quality tokens (mathematics, code, instruction-like, reasoning).Llama 3's annealing, OLMo 2's Dolmino mid-training mix, MiniCPM's WSD decay phase; "the annealed model"
3. Annealing as an experimentA cheap evaluation protocol: take a fixed mid-run checkpoint, anneal it on a candidate dataset, compare scores. Used to price a dataset, not to train a final model.Llama 3 and OLMo both evaluate candidate corpora this way
  • The two levers are separable, and papers usually pull both at once. WSD lets you decay the rate with no data change; you can also switch to a high-quality mixture while the rate stays flat (WSM switches the data at its Tswitch with the rate held constant). Any claim that "annealing gave +X" is a compound of two effects unless the ablation separated them; Pretraining separates them on OLMo 2's numbers and on a toy.
  • They work for different reasons that reinforce each other. A low rate means the model descends into a basin and stops moving much; low gradient noise near the end is also when scarce high-quality tokens stick best rather than being diluted across a 10T-token stream. That is why the data switch is scheduled to coincide with the decay, not because one requires the other.
  • Reading papers: "decay phase" or "cooldown" means the schedule alone; "anneal" or "annealed checkpoint" almost always implies the data switch too. WSM removes sense 1 entirely (constant rate forever) while keeping sense 2 (the curated-data switch), and recovers the decay's benefit by merging.
  • Unrelated homonyms: simulated annealing proper (a combinatorial optimisation algorithm) and sampling temperature at inference (Sampling and Decoding) share the metaphor and nothing else.
Common mistakes, in one list (each is taught above; here as a checklist)
  • Copying a learning rate between momentum conventions, or between optimisers. The averaged momentum form needs a rate 10 times larger at β = 0.9; Adam's step is about η per parameter whatever the gradient's size, SGD's is η times the gradient, so their rates are unrelated; Lion wants a rate 3 to 10 times smaller than AdamW's, schedule-free SGD 10 to 50 times larger than SGD's.
  • Using L2 regularisation with Adam and calling it weight decay (torch.optim.Adam(weight_decay=...)); they are the same only for plain SGD.
  • Removing warmup because Adam already corrects its bias: correction fixes the bias, not the variance.
  • Reading an intermediate cosine checkpoint as "the model at that size of run" (Kaplan's mistake, corrected by Chinchilla).
  • Evaluating a schedule-free model at the training weights y instead of the average x: call optimizer.eval() first.
  • Applying Muon to every parameter: embeddings, the output head, norms and biases go to AdamW.
  • Believing a new optimiser's speed-up before the baseline is tuned and fully decayed.
  • Crediting "annealing" for a gain that came from the data switch (or the reverse).
  • Assuming a diagonal adaptive method handles bad conditioning: the rotated ravine.
  • Scaling the batch without the rate and betas: linear for SGD, square root and β′ = 1 − κ(1 − β) for Adam.

Learning-rate failure modes in training curves (oscillation, NaN, plateaus, spikes) are diagnosed on the parent page's When training goes wrong tab.

Sources: linked inline; verbatim extracts in src/inputs/extracts.txt. Every optimiser rule is checked against PyTorch (src/checks/torch_ref.py), every schedule against torch.optim.lr_scheduler, every derived number in src/recompute.py and src/ns_data.py. Data as of October 2026.