Muon: give every direction of a matrix the same step
Muon replaces the momentum of each weight matrix with its nearest orthogonal matrix: the steepest step under the spectral norm. Five cheap polynomial steps stand in for an SVD.
Every optimiser is steepest descent under some norm
Adam treats a weight matrix as a bag of independent numbers. Muon (“MomentUm Orthogonalized by Newton–Schulz”, Keller Jordan et al., December 2024) treats it as a matrix. For one hidden weight matrix , the whole optimiser is six lines:
To see why the update is , start with the question that every optimiser answers. Near the current weights the loss is about linear: , with . A linear function has no minimum, so you must limit the size of the step with a norm and a radius :
The gradient alone does not fix the step. The norm (the “ruler”) does. Bernstein and Newhouse showed that Adam, Shampoo and Prodigy, with their moving averages switched off, are exactly this rule with different norms:
- Frobenius norm (the matrix as one long vector): the best step is , normalised gradient descent.
- Max-entry norm (no single weight moves more than ): the best step is . Adam with is , so Adam is a smoothed sign descent.
- Spectral norm , the largest stretch of the matrix: the best step is . That is Muon.
The Frobenius, spectral and nuclear norms depend only on the singular values: they are the , and norms of . So gradient descent against Muon is against steepest descent, applied to the singular values instead of the entries. This is why is also written , the matrix sign.
playground
Three rulers, three steepest steps
Drag the gradient tip anywhere on the plot. Switch the axes from singular directions to entries.
The spectral norm is the right ruler for a linear layer
Every matrix turns, stretches, and turns again: , and . Orthogonalisation keeps both turns and replaces every nonzero stretch by 1. Take . It has singular values and , and , a pure rotation by . The same matrix has two other names. It is the nearest semi-orthogonal matrix to in Frobenius norm. It is also Shampoo with its memory switched off: .
Bernstein’s argument for this ruler is about the layer’s output. After a step, changes by , and with equality for the top singular vector. Activations have entries of size about 1, so measure vectors by their RMS. The worst-case output change per unit input is then , the RMS→RMS norm. If no input may see its output change by more than in RMS, the steepest step is
Now has a meaning that does not depend on width: it is the largest RMS change of the layer’s output. This is why Muon’s learning rate transfers across model widths more easily than SGD’s.
The argument needs a matrix that multiplies dense activation vectors. An embedding table has one-hot inputs, so a different norm applies. Biases and norm gains are vectors, and for a vector Muon is only . For the output head, AdamW works better, and Keller Jordan says that this choice is “driven by empirics”. So Muon trains the hidden matrices only, and AdamW trains the rest. Convolution filters are first reshaped to matrices.
Equal steps for loud and quiet directions
For one token, the gradient of a linear layer is an outer product . A batch gives a sum of such products. Many tokens have similar inputs and errors, so a few directions get most of the weight. Keller Jordan: the updates of SGD-momentum and Adam for transformer matrices “typically have very high condition number. That is, they are almost low-rank matrices.” Write a step as . Gradient descent has . Muon has for every . For singular values , the relative steps are for SGD and for Muon.
The walkthrough builds a clean case where equal steps are exactly right. A matrix must store three key→value facts, seen with frequencies 90%, 9% and 1%. With strengths , the gradient is already an SVD, with singular values . The condition number of 90 comes only from the frequencies. Frequency says nothing about how important a fact is.
animation
Three facts, seen 90%, 9% and 1% of the time
Press Play. Then set the Muon rate to 0.30, or push the GD rate above 2.
So Muon removes how strongly the batch pushes each direction and keeps which direction. In this toy problem that is exactly the right thing to remove. For real networks it is a hypothesis: Keller Jordan writes “We speculate that” orthogonalisation increases the scale of “rare directions” that are small in the update but important for learning. The price is visible in the race. The step size no longer shrinks when the gradient shrinks, so Muon needs a decaying learning rate.
Three more properties explain details of the algorithm:
- Scale invariance. for . A momentum sum and a momentum average give the same update, and the size of the gradient never enters the step.
- Rotation equivariance. Rotate the inputs or outputs of the layer and Muon’s update rotates with them. Sign descent and Adam act entry by entry, so they depend on the coordinate system.
- Momentum first. An earlier method, Orthogonal-SGDM, orthogonalised each gradient and then applied momentum. Keller Jordan reports that Muon’s order “performs better empirically”. Momentum first averages out the batch noise, so only the consistent directions get full-size steps.
Newton–Schulz: an SVD made of matrix products
An SVD of a large matrix is a sequential algorithm that GPUs run slowly. The coupled Newton iterations in Shampoo implementations need float32. Matrix products are the one operation that GPUs do at full speed in bf16. The key fact is that an odd matrix polynomial acts on each singular value separately and never touches the singular vectors:
Apply it times and each goes through the scalar map . If for every in range, the result is about . First divide by the Frobenius norm. Since , every singular value is then in .
The classic cubic has and , so near 1 the error squares at every step. Near 0 its slope is only 1.5. A value of 0.01 needs 13 steps to pass 0.9. Jordan gave up exactness to buy a steep start. His rule was to maximise the slope at 0, subject to the values ending in about . An “ad-hoc gradient based” search gave
So 1 is not even a fixed point. The map has a trapping band . Once a singular value enters it, the value stays there and zig-zags between about 0.7 and 1.1 forever.
playground
Where each singular value goes
Drag the orange start point along the left plot. Compare Cubic, Jordan and Polar Express, and change N.
Below about , even the quintic cannot lift a value. That is acceptable: bf16 has a relative precision of about , so such directions are close to round-off noise.
The same iteration on a whole matrix shows what “keep the turn, drop the stretch” looks like.
animation
Rounding the ellipse
Press Play. Then drag the two column tips of G close together (a nearly singular G) and play again.
The inexact output is good enough. The NS output is 15–30% away from in Frobenius norm, and bf16 adds almost nothing on top of that. Training does not care much. Moonlight reports that 10 steps give a more accurate result than 5 “but it won’t lead to better performances”. The Polar Express authors found that even the exact SVD “does not improve the optimization quality”. A better 5-step polynomial helps a little, though. Polar Express (Amsel et al., ICLR 2026) uses a different odd quintic at each step and chooses them greedily, which they prove optimal. The first step has a slope of about 8.2, and later steps flatten towards a convergent quintic. On GPT-2-Large with 1B FineWeb tokens, the best validation loss was 3.340 against 3.398 with Jordan’s coefficients. The NanoGPT speedrun adopted it at record #38. DeepSeek-V4 uses another fix: 8 of Jordan’s steps, then 2 steps of , which land every input in in .
One full Muon step, and what it costs
The released code (muon.py) adds three details to the six lines. It writes momentum as an average, which makes equivalent. It transposes tall matrices so that is the small Gram matrix. It scales the result by . The defaults are learning rate 0.02 (“in units of spectral norm per update”), momentum 0.95, Nesterov on, and 5 NS steps. The README says: “Only the learning rate and weight decay must be tuned.” The animation below runs the walkthrough’s hand example. A layer starts at with two tokens, so the gradient has rank 2.
animation
One Muon step, stage by stage
Press Play, or Step through the stages. Watch the two singular values: they grow, are normalised, then zig-zag towards 1.
Cost. For an matrix with , one quintic step is three products: for , for , and for . The forward and backward pass through the same matrix cost FLOPs for a batch of tokens. So the overhead of steps is
calculator
Newton–Schulz overhead calculator
Pick a preset, or type a shape. Lower the batch to see when the overhead stops being small.
Moonlight: weight decay and one update size for every shape
Moonshot AI (“Muon is Scalable”, February 2025) found two problems when it trained large LLMs with Muon.
The weights grow. Without weight decay, “both the weight and the layer output’s RMS keep growing to a large scale, exceeding the high-precision range of bf16”. The fix is AdamW-style decoupled decay, . With Muon it has a clean meaning. Each update has spectral norm about , so stays below a ceiling of about . Chen, Li and Liu prove that Muon with decoupled weight decay implicitly solves subject to . On an 800M model trained for 100B tokens, vanilla Muon led early, but Muon with weight decay led at the end.
The update size depends on the shape. has singular values equal to 1, so its RMS over all entries is . That is too small for a big MLP matrix and too large when each KV head is a separate parameter. Moonlight scales the update by , which gives every matrix an update RMS of 0.2, close to AdamW’s. Then “Muon can directly reuse the learning rate and weight decay tuned for AdamW.” In their sweep, RMS 0.2 and 0.4 were the best (validation loss 3.325 and 3.314, against 3.679 for AdamW), and they chose 0.2.
The conventions disagree only in step size per matrix, not in direction. For an MLP with and , the RMS→RMS norm of the update before is:
| convention | factor | up, 4096×1024 | down, 1024×4096 |
|---|---|---|---|
| none, | 1 | 0.5 | 2 |
| Jordan’s code | 1 | 2 | |
| Bernstein | 1 | 1 | |
| Moonlight | 6.4 | 25.6 |
Only Bernstein’s factor gives every layer the same output change. Moonlight instead equalises the per-entry size, which lets you reuse AdamW settings. PyTorch’s torch.optim.Muon (since 2.9) offers both rules.
Distributed Muon. AdamW is element-wise, so with ZeRO-1 each rank updates its own slice. needs the whole matrix, so Moonlight gathers the momentum slices, runs NS on the full matrix, and keeps the local slice. The communication is between 1 and 1.25 times AdamW’s, and the optimiser latency is “usually 1% to 3%” of the forward–backward time.
Results. In scaling-law runs from 399M to 1.5B parameters, with AdamW hyperparameters reused, Muon reached AdamW’s loss with 0.519× the FLOPs. Moonlight itself is a 16B-total / 3B-active MoE trained on 5.7T tokens. Against its AdamW twin after about 1.2T tokens, it was better on 6 of 7 benchmarks, most clearly on code and math, and worse on BBH. Fine-tuning shows an “optimizer mismatch”: Muon pre-training plus Muon SFT was best, and Muon SFT on an AdamW-pretrained model was equal or worse.
MuonClip: a per-head thermostat for attention logits
When Kimi scaled Muon towards a trillion parameters, the largest query–key logits in a few heads grew past 1000 in a 9B-active / 53B-total test model. The K2 report says this happens “more frequently with Muon but less with AdamW”. The usual fix, QK-Norm, does not apply to Multi-head Latent Attention (MLA), because the keys “are not fully materialized during inference”. Logit soft-capping limits the logits, but the dot products can still grow below the cap.
The report’s explanation is labelled a hypothesis. The logit is bounded by . A Muon update adds the same amount along every singular direction, so it is more likely to line up with an existing large direction of , and the spectral norms can grow. The product then grows with the square.
QK-Clip. The logit is bilinear in and . After each optimiser step, read each head’s largest logit , which the forward pass already computed. If it is above , set and scale and by each. That head’s largest logit becomes exactly , and no other head changes. In MLA, the rotary key is shared by all heads, so it must stay fixed. The head’s rotary query takes the full factor instead.
playground
QK-Clip on eight heads
Drag the top of any dashed bar to change that head's largest logit. Move τ. Switch to the global rule.
In the K2 run (), the max logit rose fast to the cap and decayed to a stable range after about 30% of training. In the first 70,000 steps, 12.7% of heads triggered QK-Clip at least once. After that, all heads stayed below 100 and the clip switched itself off. K2 is a 1T-total / 32B-active MoE trained on 15.5T tokens “with zero loss spike”. A small model with a low showed “no statistically significant degradation”. Other large Muon users control logits differently: QK-Norm (GLM-4.5, Arcee Trinity), per-head orthogonalisation of MLA (“Muon Split”, GLM-5), or RMSNorm on queries and KV entries (DeepSeek-V4). The walkthrough’s own reading: QK-Clip is not specific to Muon. It is a weight-space limit on one quantity, and it would work with any optimiser.
How large is the gain
Four studies give four different numbers, and the baseline explains most of the spread.
| study | setup | finding |
|---|---|---|
| Moonlight | 399M–1.5B, AdamW settings reused | about 52% of AdamW’s FLOPs for the same loss |
| Essential AI | 100M–4B | 10–15% fewer tokens; the advantage stays or grows with batch size |
| Wen et al. | 10 optimisers, 0.1B–1.2B, each tuned separately | speedup over AdamW falls from 1.4× at 0.1B to 1.1× at 1.2B |
| NVIDIA (2026) | multi-billion, batches up to 100M tokens | SOAP and Muon beat AdamW; AdamW “fails to scale” with batch size |
Theory now explains precisely what Muon does: it is the steepest-descent (or trust-region) step in the spectral norm, and with weight decay it solves a constrained problem. Why it helps on real networks is still open. Equal steps for rare directions, the right norm for linear layers, low-rank curvature and the implicit constraint are all candidate explanations. They are compatible, but none is proven to be the main cause in large models. Other questions are also open: which matrices to orthogonalise together (Q, K and V separately, per head, or pairs of heads), and how to pay for the full-matrix step in distributed training.