Explore the research collection
3 entries · Follow this search
- Thread
Looped transformers lower Muon's optimal learning rate; divide-by-loops only partly restores it
Next installment in the author's Muon small-model series after #127 (not a formal reply/thread continuation, and it does not mention or link #127). Paraphrased finding: reusing the same transformer layers multiple times lowers Muon's optimal learning rate, much as increasing depth does. In the author's tests, 4 loops gave an optimal Muon LR about 40% below the 1-loop value, similar to the drop for a non-looped model with that many separate layers (that separate-layers comparison was in the post summary; its numbers were not in the readable chart). Chart 1, fully readable: relative optimal Muon LR 100% at 1 loop, 71% at 2 loops, 55% at 4 loops — language model looped 1/2/4 times, width 64, 260 training steps, mean of 3 seeds. The discussed remedy is dividing each layer output by the loop count, from Loop-μP (arXiv 2606.18524, Wang et al., submitted 2026-06-16, v3 2026-10-18): under Loop-μP, multiplying the residual branch by 1/N (combined with L^-1/2 for L distinct layers) is, in the infinite-width limit, the only parameterization with both a stable forward pass and maximal residual-stream updates, and the paper reports the base LR tuned on the smallest model stays best for loop counts up to 8 and executed depths up to 384 layers in language modeling. With Muon in the author's small models, that remedy worked at only 2 of 4 widths tested. The post's conclusion is to use a lower LR for a looped transformer trained with Muon, or apply another fix.
- Thread
Muon weight growth harms Q/K attention; QK-norm fixes it
The post's mechanism, paraphrased: Muon updates are equal-sized, and each step points slightly away from zero, so weight matrices grow steadily over training. The author reports query, key, value, output and MLP matrices ending 5–10× larger than at init. Only the query/key growth is reported to hurt, because attention scores rise from about 1 to about 73 and become very sharp. On a sorting task the loss is 6, 14 and 16 accuracy points at widths 32, 64 and 128 respectively. QK-norm is presented as the fix because it rescales queries and keys before scoring, decoupling their growth from the attention scores. Value/output/MLP growth is described as harmless in these runs, even at 2–3× starting size (the exact ablation behind that wording — natural growth vs clamped — was not verifiable from the visible post summary). Stated setup: 2-layer transformer language models, 8 tasks, 3 seeds, widths 32–128.
- Code
Muon formula grid (vukrosic)
Standard Muon orthogonalizes every gradient with a fixed 5 rounds of a degree-5 Newton-Schulz/Polar Express polynomial. This repo asks: for a given target, what is the cheapest formula? A grid over three settings — how weak the weakest singular direction is (0.0001–0.01 of the longest), closeness-to-equal tolerance (±0.02 to ±0.4), and matrix shape (square or wide 1:4 like most LLM layers) — searches 1,104 mixes of degree-3/5/9/13/17 rounds per cell (Polar Express fitting) and keeps the cheapest hitting the target. Examples: 9+9+9 matches-or-beats standard Muon at 33% fewer wide-matrix FLOPs; 13+13+13 matches Polar Express at 27% fewer; 13+13 on short-band-only settings at 51% fewer. Since Muon's orthogonalization is ~0.5–2% of training compute (4096-wide, 1–4M-token batches), a 25–50% cut on the step saves ~0.1–0.5% of a training run. Usage: pick settings in picker.html, copy coefficients from grid.json, or use formulas.py's `orthogonalize(G, coefs)` as a drop-in for the Newton-Schulz call. Caveats (author-stated): degree-9+ rounds need the small (rows×rows) part in float32 (all-bf16 overflows); cost is matmul work, not wall-clock — the float32 part shrinks the real saving; not timed on a GPU; whether directions outside the target band hurt training is untested.