Stanford CS336: Language Modeling from Scratch Lecture 11 — Scaling in Practice:
Case Studies, Optimizers & $\mu$P

From Chinchilla sweeps to late-2026 frontier pretraining
Autumn 2026

Why Scaling in Practice Is Hard

Fitting a theoretical power law is easy. Choosing a schedule, batch size, learning rate, optimizer, and parametrization that survive a $100\times$–$1000\times$ extrapolation is not.
1. Scaling Recipes WSD, MiniCPM, DeepSeek, Llama 3, MoE & arch laws 2. Hyperparam Laws 7 competing LR/batch laws, Step Law & blow-ups 3. Optimizers & Muon Scale confounders, stability, QK-Clip & distributed Muon 4. μP Theory & 2026 Spectral derivation, failure modes, Muon & MoE μP

From Chinchilla (2022) to Late-2026 Scaling Practice

2020–2022 (Baseline) Kaplan (2020) Chinchilla (2022) Dense, cosine, AdamW 2024 (Historical Recipes) MiniCPM (WSD + μP) DeepSeek LLM (LR/B laws) Llama 3 (July), Hunyuan-Large Qwen 2.5 hyper fits 2025 (MoE & Muon) MiniMax-01 (arch scaling) Qwen 3 (May, 36T tokens) Kimi K2 (July: sparsity + QK-Clip) Late 2026 (Current Frontier) DeepSeek-V4 (Muon + mHC) Kimi K3 (July: Per-Head Muon) Qwen3.8-Next (Aug: stability) HyperP, Muon + MoE μP

Problem: Cosine Schedules Make Scaling Sweeps $O(n^2)$

Cosine LR depends on target horizon T LR / max 1.0× steps 2.0× steps 5.0× steps Evaluate at horizon T₁ Loss at T₁: unfinished cosine is suboptimal Val Loss Training tokens worse if early-stopped best only when cycle ends at T₁
  • Chinchilla (2022) showed that cosine cycle length must match the target token count $T$
  • You cannot take intermediate checkpoints from one long cosine run as optimal data points
    • A $2\times$ or $5\times$ longer cycle keeps LR too high at $T_1$, leaving loss systematically worse
  • Retraining from scratch for each horizon $D_1, \dots, D_k$ turns sweep cost along the data axis from $O(n)$ to $O(n^2)$

How do modern scaling recipes break this horizon coupling?

Solution: Warmup–Stable–Decay (WSD) Schedules

Learning Rate Training Tokens / Steps Cosine(40N) Shared Stable Phase (reused for all horizons) WSD(40N, 4N) 60N WSD(80N, 8N) Warmup Decay (~10%)
  • MiniCPM WSD (2024): split training into Warmup, constant Stable, and short Decay (~10% of tokens)
    • Branch off decay runs from stable checkpoints ($10N \to 60N$)
    • Measures the entire data axis in linear cost $O(mC)$ instead of $O(n^2)$
  • DeepSeek LLM multi-step (2024):
    • 2,000 warmup steps, then hold constant
    • Drop to 31.6% of max LR at 80% of tokens, and to 10% at 90% (grad clip 1.0)

Bonus: WSD also lets production teams keep pretraining past an initial token budget without restarting.

WSD Loss Dynamics: Slow Plateau, Rapid Decay

Validation Loss Tokens Processed Cosine(80N) WSD Stable (higher loss) ~10% decay matches Cosine! 40N 60N 80N
  • During the stable phase, WSD stays noticeably above the Cosine loss curve
  • During the ~10% decay phase, loss plummets and matches (or slightly beats) Cosine at $40N$, $60N$, and $80N$
    • MiniCPM tested $2N$ vs. $4N/6N/8N$ decay lengths: ~10% decay is needed to close the gap
  • DeepSeek LLM confirmed multi-step schedules (80/10/10, 70/15/15, 60/20/20) all match cosine final loss

Takeaway: never judge a WSD run mid-plateau—evaluate only after annealing.

Case Study 1: MiniCPM (2024) — Setup & Sweep

Historical dense-model case study (1.2B & 2.4B) combining $\mu$P + WSD + Chinchilla fits.

Name$N$ (B)$d_m$$d_{ff}$$d_h$$n_h$$L$
9M0.0093208006458
30M0.036512128064812
70M0.0666401600641014
0.1B0.1097681920641216
0.17B0.1668962240641418
0.2B0.24110242560641620
0.5B0.49913443360642124
  • Fix aspect ratio and head dimension ($d_h = 64$), scale $d_m$ and $L$ together
  • Gap from largest sweep model (0.5B) to target model (2.4B) is only ~5$\times$
  • Stabilize LR transfer via $\mu$P, then fit optimal batch size and token-to-parameter ratio empirically

MiniCPM was not SOTA even in 2024, but it published one of the cleanest end-to-end scaling recipes.

MiniCPM: $\mu$P Operations & Stable Optimal LR

Hyperparameters held across widths: scale_emb = 12, scale_depth = 1.4, init_std = 0.1, lr = 0.01

OperationExact Rule in MiniCPM
Embedding Output ScalingMultiply embedding output by $\text{scale\_emb}$
Residual ScalingScale each layer's residual increment by $\text{scale\_depth} / \sqrt{L}$
Tensor InitializationSet 2D tensor init std to $\text{init\_std} / \sqrt{d_m / d_{\text{base}}}$; other parameters to $0.1$
LR Scaling of TensorsScale 2D tensor LR by $1 / (d_m / d_{\text{base}})$ relative to base LR
LM Head ScalingScale output logits by $1 / (d_m / d_{\text{base}})$

MiniCPM: Optimal Batch Size & High Data-to-Model Ratio

  • Optimal batch size:
    • Swept $(B, D)$ across 9M, 30M, 170M; traced minimum-loss ridge at each token budget
    • Fit Kaplan-style law vs. loss $L$:
$$\log(\text{BS}) = -6.24\log(L) + 20.91 \iff \text{BS} \approx \frac{1.21 \times 10^9}{L^{6.24}}$$
  • Batch size grows polynomially as loss falls
  • Chinchilla Methods 1 & 3 (byte-normalized loss across Code, English, Chinese, Ultratext):
    • Fit $L(N, D) = C_N N^{-\alpha} + C_D D^{-\beta} + L_0$ with $C = 6ND$
    • $\dfrac{N_{\text{opt}}}{D_{\text{opt}}} = K^2 \left(\dfrac{C}{6}\right)^\eta$
  • Ultratext joint fit gives:
    • $L = 0.0754\,N^{-0.30} + 0.292\,D^{-0.30} + 0.25$
    • $K^2 = 0.01,\; \eta \approx 0 \implies \mathbf{D_{\text{opt}}/N_{\text{opt}}|_{C=10^{21}} = 95.6}$

Both lower-envelope (Method 1) and joint fit (Method 3) show much higher data-to-parameter ratios than Chinchilla's ~20:1.

Case Study 2: DeepSeek LLM (2024) — Direct LR & Batch Fits

Dense 7B (MHA) and 67B (GQA) on 2T tokens: no $\mu$P; instead directly fit $\eta_{\text{opt}}(C)$ and $B_{\text{opt}}(C)$.

  • Grid search $(B, \eta)$ at small compute ($10^{17}$ FLOPs / 177M FLOPs/tok and $10^{20}$ FLOPs / 2.94B FLOPs/tok)
  • Key observation: generalization error stays flat over a wide basin (models within 0.25% of minimum loss)
  • Fit power laws to all near-optimal points:
$$\eta_{\text{opt}} = 0.3118 \cdot C^{-0.1250}, \qquad B_{\text{opt}} = 0.2920 \cdot C^{0.3271}$$
Target ModelPredicted $\eta$Predicted $B$
7B MHA (2T tok)$4.2\times 10^{-4}$9.2M tok
67B GQA (2T tok)$3.2\times 10^{-4}$19.7M tok
  • Batch-size power law is clean across 8 orders of magnitude in FLOPs
  • Caveat: the LR fit has wide vertical scatter on the small runs—extrapolation relies heavily on the wide flat basin

DeepSeek LLM: IsoFLOPs & Final Loss Extrapolation

(a) IsoFLOP Curves (10¹⁷–3×10²⁰) Val Bits-per-Byte FLOPs/token M (log) (b) Loss Extrapolation Training FLOPs C = MD (log) 7B 67B small runs fit power law →
  • Used Chinchilla Method 2 (IsoFLOPs) across $10^{17}$ to $3\times 10^{20}$ FLOPs
  • Measured model scale via non-embedding FLOPs/token $M$ ($C = MD$) and loss in bits-per-byte (tokenizer-independent)
  • Extrapolating to $C = 4.5\times 10^{23}$ FLOPs predicts:
    • $M = 4.3\times 10^{11}$ FLOPs/token, $D = 1.04\times 10^{12}$ tokens (67B)
  • Final validation losses for both 7B and 67B landed right on the power-law curve fit from $\le 3\times 10^{20}$ FLOPs

Llama 3 (July 2024): Compute-to-Downstream Scaling

Historical dense baseline (405B on 15T tokens): bridging pretraining loss to downstream benchmark accuracy.

1. IsoFLOPs (6×10¹⁸–10²²) Optimal ratio ≈ 39 : 1 (D : N) 2. Compute → Task NLL Linear fit on log C → NLL/char 3. NLL → Accuracy Sigmoid predicts Llama 3 405B

Scaling Sparse MoE: Hunyuan-Large & Kimi K2

Hunyuan-Large (2024) — MoE IsoFLOPs
  • Ran IsoFLOPs ($5\times 10^{18}$ to $9.5\times 10^{19}$ FLOPs) over activated parameters
  • Optimal ratio: 96:1 (tokens to active parameters)
    • Extrapolated optimal active size: 58.1B (trained with 52B activated params)

Because MoE has more total capacity per active FLOP, compute-optimal token-to-active-parameter ratios are far higher than dense 20:1.

Kimi K2 (July 2025) — Sparsity Scaling Law
  • Define $\text{sparsity} = \dfrac{\text{total experts}}{\text{active experts}}$ (fixed 8 active + 1 shared)
  • At constant FLOPs, higher sparsity consistently lowers validation loss
  • To reach validation loss 1.5, sparsity 48 cuts FLOPs by:
    • 1.69$\times$ vs. sparsity 8, 1.39$\times$ vs. 16, 1.15$\times$ vs. 32
  • Chose sparsity 48 (8 of 384 experts) to trade off loss vs. serving/training overhead; doubling attention heads cut loss 0.5%–1.2%

Hyperparameter & Architecture Scaling: Qwen & MiniMax-01

Qwen 2.5 (2024) & Qwen 3 (May 2025)
  • Direct empirical scaling laws for $\eta_{\text{opt}}$ and $B_{\text{opt}}$ as functions of $N$, $D$, architecture, and pretraining stage
  • Qwen 2.5 swept dense (44M–14B) and MoE (44M–1B active) across 0.8B–600B tokens
    • Used scaling laws to match MoE configs to dense parity (e.g. 14B & 72B dense)
  • Qwen 3 extended the same hyper-scaling framework across three pretraining stages (36T tokens)
MiniMax-01 (2025) — Architecture Scaling
  • Used Chinchilla Method 1 (lower envelope) across 70M to 7B models to compare architectures before scaling up:
    • Softmax Attention
    • Lightning Attention
    • Hybrid-Lightning Attention
  • Derives optimal model size and token count per architecture as a function of compute budget
  • Shows scaling laws are now standard for architecture selection, not just $(N, D)$ sizing

Current late-2026 frontier models (e.g., MiniMax-M3, Qwen3.8-Flash-Next, DeepSeek-V4) all pair sparse/hybrid attention with sparse MoE chosen via such sweeps.

Two Dominant Scaling Recipes in Practice

AxisDirect Empirical Fitting
(DeepSeek LLM, Qwen 2.5/3, Llama 3, Hunyuan)
Parametrization-Invariant ($\mu$P)
(MiniCPM, Cerebras-GPT, 2026 MoE $\mu$P)
Arch hypersAssume most Transformer hypers are scale-invariantRescale init, LR & multipliers by width so dynamics stay invariant
LR & BatchGrid search at small scale; fit power laws $\eta_{\text{opt}}, B_{\text{opt}}$Tune base LR once on tiny proxy; still fit batch size vs. $L$ or $D$
$(N, D)$ sizingIsoFLOPs (Method 2) on dense or active MoE paramsJoint fit (Method 3) or lower envelope (Method 1)
ScheduleMulti-step / WSD to reuse stable trunkWSD (~10% decay) for linear-cost data sweeps
Extra axesMoE sparsity laws (Kimi K2, July 2025); attention architecture sweeps (MiniMax-01, 2025)

Next: zoom in on LR & batch scaling laws—what is the right functional form, and when do fits fail?

Part 2: Competing LR & Batch-Size Scaling Laws

What are the right predictors—model size $N$, tokens $D$, compute $C$, or loss $L$?

LawData RecipeSparsityLearning Rate ($\eta_{\text{opt}}$)Batch Size ($B_{\text{opt}}$)Rel. Err.
Kaplan / OpenAI (2020)✗✗$3.239\times 10^{-3} - 1.395\times 10^{-4}\log N$$2\times 10^8\, L^{-4.76}$9.51‰
Microsoft Law✗✗$1.3192\times 10^{-5}\, N^{-0.23} D^{-0.32}$—9.25‰
DeepSeek LLM (2024)✗✗$0.3118\, C^{-0.1250}$$0.2920\, C^{0.3271}$9.26‰
Porian Law✗✗$3.7\, N^{-0.36}$$0.7576\, N^{0.703}$3.71‰
MiniCPM (2024)✗✗— (fixed via $\mu$P)$1.21\times 10^9 / L^{6.24}$—
MeiTuan Law✗✓$\lambda L^{-\alpha}$$\lambda_B L^{-\alpha_B^{-1}}$—
Step Law (StepFun)✓✓$\mathbf{1.79\, N^{-0.713} D^{0.307}}$$\mathbf{0.58\, D^{0.571}}$0.94‰

Coefficients are taken from the primary papers (Kaplan et al. 2020, DeepSeek LLM 2024, MiniCPM 2024), correcting transcription typos in the Step Law comparison table.

Step Law: Convex Loss Basin & Scaling Trends

Pretraining Loss over (log η, log B) Batch Size (log) Learning Rate (log) +1.0% +0.25% ✕ ★ ✕ Global min ★ Step Law ▲ DeepSeek ■ Porian
  • Observation 1 — Convexity: pretraining loss slices in $\log \eta$ and $\log B$ are smooth and convex → global optima are cleanly identifiable
  • Observation 2 — Batch depends on $D$: across $N \in [59\text{M}, 1\text{B}]$, optimal batch collapses onto one line in $D$: $B_{\text{opt}} = 0.58\, D^{0.571}$
  • Observation 3 — LR vs. $D$ caveat: Step Law finds higher $\eta_{\text{opt}}$ with larger $D$ ($D^{0.307}$) under cosine decay
    • Fragile under WSD: InternLM scaling study (Zhou et al., 2026) shows the $D$-exponent shifts when swapping cosine for WSD

Step Law: Generalization to MoEs & Data Mixtures

Transfer Across MoE Sparsity
  • Evaluated on ~2.1B MoE models ($D = 8.0\text{B}$) across active-parameter ratios $N_a / N$:
    • 0.27 (low sparsity, $N_a \approx 592\text{M}$)
    • 0.58 (medium sparsity, $N_a \approx 1.24\text{B}$)
    • 0.09 (high sparsity, $N_a \approx 188\text{M}$)
  • Step Law lands inside the flat near-optimal basin across all three sparsity regimes
Transfer Across Data Recipes
  • Tested without re-fitting on three distinct training corpora:
    • Bilingual corpus
    • Code integration
    • Code-dominant corpus
  • Consistently tracks the global optimum much closer than single-variable compute or $N$-only laws

Even with a 0.94‰ relative loss error on dense sweeps, remember: empirical curves predict loss, not stability.

When Clean Scaling Laws Blow Up

Delphi Study: Fit (≤ 3×10²⁰) vs. Extrapolation (10²¹–10²³) Paloma Macro Loss Compute (FLOPs, log) ← fit (3×10¹⁸–3×10²⁰) extrapolation → 10²¹: 0.8% worse 10²²: 2.5% worse ✕ 10²³: Run Diverged! 10¹⁹ 10²⁰ 10²¹ 10²² 10²³
  • Delphi scaling study (Held): textbook IsoFLOP parabolas from $3\times 10^{18}$ to $3\times 10^{20}$ FLOPs
  • Extrapolating under Cautious AdamC + $\sqrt{B}$ LR scaling silently drifted, then collapsed:
    • 0.8% worse at $10^{21}$ FLOPs
    • 2.5% worse at $10^{22}$ FLOPs
    • Diverged at $10^{23}$ FLOPs
  • Fix required tighter parametrization, LR scaling, and optimizer changes

Lesson: clean small-scale parabolas never guarantee large-scale stability.

Part 3: Optimizer Scaling — Pitfall 1 (Untuned Baselines)

Wen et al. (Fantastic Pretraining Optimizers and Where to Find Them): apparent optimizer gains often vanish once baselines are properly tuned.

Learning Rate Confounder (130M, C4/EN)
  • Default AdamW at $\eta = 6\times 10^{-4}$ takes ~10,000 steps to reach loss ~3.59
  • Raising AdamW LR to $\eta = 8\times 10^{-3}$ gives a 2$\times$ speedup (~5,000 steps)
    • Eliminates the claimed gap of Mars and Nesterov AdamW at the same budget
Weight Decay Confounder (Lion vs. AdamW)
  • Optimal weight decay differs sharply by optimizer:
    • AdamW: optimal $\text{wd} \approx 0.1$
    • Lion: optimal $\text{wd} \approx 0.6$
  • Comparing optimizers at shared hyperparameters unfairly penalizes one or the other

Rule of thumb: different optimizers need independent hyperparameter sweeps—and likely follow different scaling laws.

Optimizer Scaling — Pitfall 2 (Scale Dependence)

Token Speedup vs. AdamW (8× Chinchilla, Wen et al.) Speedup w.r.t. AdamW Model Size 1.0× 1.1× 1.2× 1.3× 1.4× 130M 300M 520M 1.2B Muon SOAP NAdamW AdamW
  • Matrix-based optimizers (Muon, SOAP, Kron) consistently beat scalar optimizers (AdamW, Mars, NAdamW) across $1\times$–$8\times$ Chinchilla ratios
  • But token speedup shrinks with model size:
    • Muon & SOAP drop from ~1.4$\times$ at 130M to ~1.1$\times$ at 1.2B (at 8$\times$ Chinchilla)
  • Always test new optimizers across both model scale and token-to-parameter ratio

So why did Muon still take over frontier pretraining in 2025–2026?

Muon: Orthogonalized Momentum for Matrix Parameters

Algorithm: Muon (2D matrix weights)
Require: learning rate η, momentum μ
  B_0 ← 0
  for t = 1, 2, ... do
    G_t ← ∇_θ L_t(θ_{t-1})
    B_t ← μ B_{t-1} + G_t
    O_t ← NewtonSchulz5(B_t)
    θ_t ← θ_{t-1} - η O_t
  end for
Core idea: if $B_t = U S V^\top$, then $$\mathrm{NewtonSchulz5}(B_t) \approx U V^\top$$ Equalizes all nonzero singular values of the update.
  • Applies to 2D hidden weight matrices (embeddings, LM head, and 1D params still use AdamW)
  • 5 matrix-multiply iterations approximate polar orthogonalization without computing an SVD
  • Low per-step overhead (NanoGPT speedrun comparison):
    • Adam: 139 ms/step
    • Muon: 142 ms/step (fastest wall-clock convergence)
    • DistributedShampoo: 154–179 ms/step
    • SOAP: 301 ms/step

Why Muon Won Frontier Pretraining: Stability

Qwen3.8-Next Stability Study (Aug 2026) Loss spikes per 10k steps at elevated LR 183 AdamW (4× opt LR) 0 Muon + gated res. (4×) 32.0 Baseline (3× opt LR) 3.2 GatedNorm (3× opt LR)
  • Kimi K2 (July 2025) discovered exploding attention logits when scaling Muon
    • Introduced QK-Clip (MuonClip) to bound max attention logits
    • Pretrained 1T parameters on 15.5T tokens with zero loss spikes
  • Qwen3.8-Next stability study (Aug 2026):
    • At 4$\times$ optimal LR: AdamW spiked 183 times / 10k steps; Muon + gated residual had 0
    • GatedNorm cut spikes 10$\times$ (32.0 $\to$ 3.2 / 10k at 3$\times$ LR)

At trillion-parameter scale, avoiding loss spikes matters as much as raw token efficiency.

Muon & Stability in Late-2026 Frontier Models

Model (Released)Scale & MoE StructureOptimizer & Stability Choices
DeepSeek-V4
(2026)
Hybrid CSA + HCA sparse attentionUses Muon (explicitly credited with training stability) paired with mHC residual connections
Kimi K3 / K3.1
(July 2026)
2.8T total / 104B active; 896 routed experts (16 active, 2 shared), Stable LatentMoEPer-Head Muon + Attention Residuals; 3 Kimi Delta Attention : 1 gated MLA
Qwen3.8-Flash-Next
(Aug 2026)
125B total / 6B active; 512 experts (10 active + 1 shared)3:1 Gated DeltaNet + QSA; backed by Qwen3.8-Next's Muon + gated residual / GatedNorm stability study

Distributed Muon in Practice

Owner-Rank Assignment for Whole-Matrix Newton–Schulz Rank 0shards W₁,W₂ Rank 1shards W₁,W₂ Rank 2shards W₁,W₂ Rank 3shards W₁,W₂ gather full 2D matrices to owner ranks Owner Rank for W₁ Full Newton–Schulz(B₁) Owner Rank for W₂ Full Newton–Schulz(B₂) Scatter / broadcast orthogonalized updates O₁, O₂ back to shards
  • The challenge: AdamW is elementwise (trivially sharded), whereas Newton–Schulz needs whole 2D matrices
  • Standard solution: assign each parameter matrix to an owner rank that runs Newton–Schulz in parallel across different matrices
  • Throughput: NVIDIA reports distributed Muon within a few percent of AdamW throughput on GB300 (vendor-reported)
  • Compressed variants: Dion2/Dion3 and MuonBP orthogonalize only part of each matrix or synchronize less frequently

Part 4: Maximal Update Parametrization ($\mu$P)

Standard Parametrization (SP) log₂(Learning Rate) Loss ← optimum shifts left w=128 w=8192 μP (Width-Invariant) log₂(Learning Rate) optimum stable

Scaling width by factor $r$ ($M \to M'$):

Hyperparameter$M$$M' \sim r$
AdamW LR (matrix-like)$l$$l / r$
AdamW LR (others)$l$$l$
Init variance (matrix-like)$\sigma$$\sigma / r$
Init variance (others)$\sigma$$\sigma$
Multiplier (output / LM head)$\tau$$\tau / r$
Multiplier (others)$\tau$$\tau$

"Matrix-like" = 2D tensors whose both dimensions grow with width (embeddings count as "others").

Empirical Motivation: Cerebras-GPT with $\mu$P

% Loss Deviation from Scaling Law vs. FLOPs % vs. Baseline Law Training FLOPs (10¹⁸ → 10²²) 0% +1% -1% SP 6.7B (+1%) 13B μP (40M → 2.7B): smooth
  • Cerebras-GPT trained 0.1B–13B dense models with the Chinchilla recipe
  • Under standard parametrization, loss oscillated by roughly $\pm 1\%$ around the fitted power law across scales
  • Tuning a 40M $\mu$P proxy and transferring to 2.7B produced a markedly smoother, more predictable trajectory

Next: derive why $\mu$P works from two simple spectral conditions.

What Is $\mu$P? A Spectral Condition for Feature Learning

Yang, Simon & Bernstein: parameterize a width-$n_l$ network so features and feature updates stay $\Theta(1)$ per coordinate.

A1 (Initialization): Each coordinate of $h_l$ is $\Theta(1) \iff \|h_l\|_2 = \Theta(\sqrt{n_l})$.
A2 (One gradient step): Each coordinate of $\Delta h_l$ is $\Theta(1) \iff \|\Delta h_l\|_2 = \Theta(\sqrt{n_l})$.
Layer l − 1 ‖h_{l−1}‖₂ = Θ(√n_{l−1}) ‖Δh_{l−1}‖₂ = Θ(√n_{l−1}) W_l + ΔW_l spectral norm Θ(√(n_l / n_{l−1})) Layer l ‖h_l‖₂ = Θ(√n_l) ‖Δh_l‖₂ = Θ(√n_l) What if A1 or A2 fails? • Too small → lazy / kernel regime (features barely move as n_l → ∞) • Too large → activations / logits blow up

Deriving $\mu$P: Condition A1 (Initialization)

$$\sigma = \frac{\sqrt{n_l}}{\sqrt{n_{l-1}}\left(\sqrt{n_l} + \sqrt{n_{l-1}}\right)} = \Theta\!\left(\frac{1}{\sqrt{n_{l-1}}}\,\min\!\left(1,\, \sqrt{\frac{n_l}{n_{l-1}}}\right)\right)$$

Note: this is a worst-case (upper-bound) spectral derivation; $\sigma$ shrinks below $1/\sqrt{n_{l-1}}$ whenever fan-out $n_l <$ fan-in $n_{l-1}$.

Deriving $\mu$P: Condition A2, Part 1 (Weight Update Norm)

Spectral update condition: $\quad \|\Delta W_l\|_* = \Theta\!\left(\sqrt{\dfrac{n_l}{n_{l-1}}}\right)$

Deriving $\mu$P: Condition A2, Part 2 (Learning Rate)

SGD: $\;\eta_l = \Theta\!\left(\dfrac{n_l}{n_{l-1}}\right)$ $\qquad\qquad$ Adam: $\;\eta_l = \Theta\!\left(\dfrac{1}{n_{l-1}}\right)$

With Adam, entries of $\Delta W_l$ are $\Theta(\eta_l)$, so $\|\Delta W_l\|_* = \Theta(\eta_l\sqrt{n_l n_{l-1}})$; matching $\Theta(\sqrt{n_l/n_{l-1}})$ forces $\eta_l = \Theta(1/n_{l-1})$.

$\mu$P vs. Standard Parametrization — Summary

RuleStandard Parametrization (SP)$\mu$P
Init stdev $\sigma_l$$\Theta\!\left(\dfrac{1}{\sqrt{n_{l-1}}}\right)$$\Theta\!\left(\dfrac{1}{\sqrt{n_{l-1}}}\min\!\left(1, \sqrt{\dfrac{n_l}{n_{l-1}}}\right)\right)$
SGD LR $\eta_l$$\Theta(1)$$\Theta\!\left(\dfrac{n_l}{n_{l-1}}\right)$
Adam LR $\eta_l$$\Theta(1)$$\Theta\!\left(\dfrac{1}{n_{l-1}}\right)$

$\mu$P Scaling Rules for Transformers

Lingle (A Large-Scale Exploration of $\mu$-Transfer): width $M$, base width $P$, MLP width $F$, $H$ heads of dim $D$, base LR $\alpha$.

ParameterRoleInit Var ($\Theta$)Adam LR ($\Theta$)Init Var (Exact)Adam LR (Exact)
$W^E$Embedding$1$$1$$1$$\alpha$
$W^{AQ}, W^{AK}, W^{AV}$Attention QKV$1/M$$1/M$$1/M$$\alpha P/M$
$W^{AO}$Attention output$1/(HD)$$1/(HD)$$1/M$$\alpha P/M$
$W^{FI}$MLP input$1/M$$1/M$$1/M$$\alpha P/M$
$W^{FO}$MLP output$1/F$$1/F$$0.25/M$$\alpha P/M$
$W^U$LM head (unembed)$1/M^2$$1/M$$1/M^2$$\alpha P/M$
Attention logit scale: $\mu$P uses $\tau^{-1} = \mathbf{1/D}$ instead of the standard $1/\sqrt{D}$ — even when $D$ is fixed, $\tau^{-1}$ has a major impact on both transfer and quality.

Does $\mu$P Transfer in Practice? (Lingle Replication)

Standard Parametrization (SP): LR drifts & blows up

Width$2^{-10}$$2^{-8}$$2^{-6}$$2^{-4}$$2^{-2}$
1283.8413.7573.7063.8794.030
5123.0132.9672.9873.3837.403
20482.7382.9027.2477.4777.314

Baseline $\mu$P: locked at $2^{-6}$ across 16$\times$ width

Width$2^{-10}$$2^{-8}$$2^{-6}$$2^{-4}$$2^{-2}$
1283.8463.7433.6953.8844.143
5123.1142.9932.9533.2213.506
20482.7112.5532.5112.5633.244

Large-Scale $\mu$P: 2M $\to$ 10B (5000$\times$ params)

ParamsWidth$2^{-8}$$2^{-6}$$2^{-4}$
2M1283.7913.7663.814
40M5123.0162.9833.004
600M20482.5132.4592.466
10B81922.2382.1672.169
  • At width 2048, $\mu$P not only transfers cleanly—it reaches 2.511 vs. SP's best 2.738
  • Also transfers cleanly with projection biases

What $\mu$P Is Robust To — and What Breaks It

Robust (Transfer Holds ✓)
  • SwiGLU and squared ReLU
  • Large and small batch sizes
  • Init tweaks (e.g. zero attention)
  • Projection biases

Trainable RMSNorm gains not only break transfer—they slightly hurt the largest $\mu$P models and can be dropped.

Failures in Lingle's Ablations (Transfer Breaks ✗)
ComponentBest LR (128 → 512 → 2048)Takeaway
RMSNorm gains
(vector / scalar)
$2^{-4} \to 2^{-4} \to 2^{-8}$
$2^{-4} \to 2^{-4} \to 2^{-6}$
$\Theta(1)$ LR on gains breaks width invariance; remove gains
Lion optimizer$2^{-10} \to 2^{-8} \to 2^{-8}$Sign-based update rules violate Adam $\mu$P scaling
Decoupled weight decay (0.1)$2^{-8} \to 2^{-6} \to 2^{-6}$Biggest practical failure: $-\eta_t\lambda\theta_{t-1}$ shrinks unevenly unless $\lambda$ scales too

Late-2026 $\mu$P: Scaling to Muon and Sparse MoE

Classical $\mu$P targeted dense AdamW models with weak weight decay. Late-2026 work closed the gap to frontier MoE + Muon training:

Method / StudyKey Extension
Qiu et al.
($\mu$P for Muon)
Pairs $\mu$P with $1/\text{width}$ weight decay for Muon—directly addressing the decoupled weight-decay transfer failure on matrix optimizers
HyperPExtends zero-shot hyperparameter transfer so one learning rate transfers across width, depth, token count, and MoE granularity
"Let's Scale Step by Step"Adapts $\mu$P to an MLA + Muon MoE architecture, extrapolating the optimal LR out to ~10T tokens for a 155B total / 17B-active model

Recap: Scaling Language Models in Practice (Late 2026)

Scaling ChallengeLate-2026 Practical Solution
$O(n^2)$ Chinchilla sweep costUse WSD (~10% decay) or multi-step schedules to branch multiple token horizons from one stable trunk in $O(n)$ cost
LR, batch & MoE sizingFit empirical laws (Step Law: $B \propto D^{0.571}$, $\eta \propto N^{-0.713} D^{0.307}$; IsoFLOPs; Kimi K2 sparsity laws); watch WSD horizon caveats
Optimizer scale & stabilityTune baselines across scale & Chinchilla ratio; adopt Muon with QK-Clip / gated residuals / GatedNorm and owner-rank or compressed distributed Muon (Dion2/3, MuonBP)
Hyperparameter transferUse $\mu$P (controlling $\|W\|_*$ and $\|\Delta W\|_*$, $\tau^{-1}=1/D$, dropping RMSNorm gains) plus 2026 extensions: $1/\text{width}$ WD for Muon, HyperP, and MLA+Muon MoE $\mu$P
Predictable scaling = cheap sweeps (WSD) + invariant dynamics ($\mu$P) + stable optimization (Muon).