QK-Clip: Taking Muon Further on the Scaleup Journey
Jianlin Su’s July-2025 kexue.fm post explaining QK-Clip and
MuonClip, the stability mechanisms behind Kimi K2’s 15.5T-token
zero-loss-spike pretraining run. After Moonlight (16B MoE) validated
Muon at moderate scale via weight decay + Update-RMS alignment, scaling
to hundreds of billions of parameters hit a new roadblock: MaxLogit
explosion — attention logits drifting upward in some heads, leading
to numerical instability. QK-Clip is a post-update weight rescaling
that minimally shrinks and to keep per-head MaxLogit below
a threshold . It directly modifies weights rather than logits,
so it composes with QK-Norm and MLA. In Kimi K2 (), Muon
and QK-Clip “battled” for ~70k of ~220k steps; afterward the model
self-regulated and the clip became inactive. The article is in
Chinese; an English translation exists at frontier.soket.ai. Note:
the original kexue.fm URL returned 403 at filing time; this page
synthesizes the post’s claims from the Soket AI translation, Su’s
announcement tweet, and the Fireworks / Lakernewhouse / Kimi K2 tech
report secondary writeups, not from a direct fetch.
Key claims
Section titled “Key claims”- Failure mode at scale: Muon scaled past hundreds of billions of parameters hits MaxLogit explosion — per-head max attention logits drift up over training, eventually exceeding 1000 in a mid-scale run and risking numerical divergence [Soket translation §Background; echoed in Kimi K2 tech report Fig. — “left panel”].
- Existing fixes are insufficient: logit soft-capping distorts the attention distribution; QK-Norm normalizes Q and K vectors but doesn’t address the root cause (weight norms) and is awkward to combine with MLA [Soket translation §Why not soft-cap / QK-Norm].
- QK-Clip mechanism: after each Muon update, if the per-head MaxLogit , rescale and with and — a minimal post-hoc weight shrink that caps scores at without changing the attention pattern’s relative geometry [Soket translation §QK-Clip procedure; Fireworks deep-dive §How qk-clip works].
- Compatible with MLA and QK-Norm: because QK-Clip operates on weights post-update rather than on logits at forward time, it composes with MLA’s compressed K-cache and with existing QK-Norm stacks where soft-capping does not [Soket translation §Compatibility].
- Empirical trajectory in Kimi K2 (, 220k steps): around step 7k some heads first exceeded ; QK-Clip and Muon remained in tension for ~70k steps (Muon pushing MaxLogit up, the clip pulling it down); after step ~70k MaxLogit decayed below on its own and QK-Clip became inactive for the remainder of training [Soket translation §Training behavior; Kimi K2 tech report Fig. “right panel”].
- Self-regulation hypothesis: under weight decay, once early instability is navigated, the model naturally adapts to reduce MaxLogit — QK-Clip is therefore “performance-safe”: it only acts during the unstable early phase [Soket translation §Self-regulation].
- Performance-safety check: in small-model ablations, aggressive clipping (down to ) shows no measurable performance degradation [Soket translation §Small-model ablation].
- Muon-specific: in matched experiments Muon exhibits MaxLogit blow-up more readily than AdamW, so QK-Clip is best read as an update rule supplementing Muon at scale rather than as a generic stability fix [Soket translation §Closing].
- Result claimed for Kimi K2: 15.5T-token pretraining with zero loss spikes, attributed to the MuonClip = Muon + weight decay + Update-RMS alignment + QK-Clip stack [Kimi K2 tech report Abstract; also reproduced in the Kimi K2 blog and on the Soket translation §Background].
Method
Section titled “Method”QK-Clip is a per-step post-update intervention. After a Muon step updates the model parameters, for each attention head with current projection matrices and :
- Measure over the most-recent batch (or a running estimate), where the logit is or the MLA equivalent.
- If , compute .
- Rescale and , with (typically 0.5).
- Otherwise leave the weights untouched.
Because , the product is scaled exactly by , which scales every logit in the head by and therefore brings MaxLogit to exactly . The split between and (via ) is what makes the intervention “minimal” in spectral terms — both matrices shrink by a small amount rather than one of them shrinking sharply.
The article emphasizes that this is fundamentally a weight fix, not an activation fix. Soft-capping changes the attention distribution non-trivially (clips one logit harder than another); QK-Norm changes the forward path and is awkward to graft onto MLA. QK-Clip leaves the forward path untouched and only nudges weights — so the attention pattern’s relative geometry is preserved, and the intervention sits on top of any forward-path stack (MLA, QK-Norm, GQA, etc.).
In Kimi K2’s setting, MaxLogit is measured per attention head, and was chosen as the cap. Su notes in the comment thread on the original post that the choice of matters less than one might expect — too-small slows training negligibly in small ablations (down to 30 was fine).
Results
Section titled “Results”The article is primarily methodological. The empirical numbers come from the Kimi K2 training run that it explains:
- 15.5T tokens, zero loss spikes [Kimi K2 tech report Abstract; Su’s article §Background].
- MaxLogit trajectory: caps at from ~step 7k through ~step 70k, then decays freely below 100 for the remainder of the 220k-step run; QK-Clip becomes a no-op past step ~70k [Soket translation §Training behavior; Kimi K2 tech report Fig. right panel].
- Small-model ablation: aggressive clipping at shows no measurable degradation in final loss [Soket translation §Small-model ablation].
- Mid-scale failure baseline (no QK-Clip): attention logits exceed 1000, training diverges [Kimi K2 tech report Fig. left panel; Soket translation references this same figure].
No standalone QK-Clip-vs-no-QK-Clip ablation at K2 scale is reported in this post (the K2 run was done with the clip throughout); the performance-safety argument is built from small-model ablations plus the observation that the clip self-deactivates past step 70k.
Why it’s interesting
Section titled “Why it’s interesting”This is the source-of-record for one of the two “remove the tuning axis” tricks that Jianlin Su / Kimi has pushed into the open optimizer literature — the other being Quantile Balancing for MoE routing (Quantile Balancing: A Hyperparameter-Free MoE Load Balancing Method). Both share the recipe “identify the exact constraint that the hand-tuned heuristic was approximating, solve for it in closed form, ship without a coefficient to tune.” The QK-Clip post is the older and more famous of the two — it’s the technique credited with Kimi K2’s loss-spike-free 15.5T-token run.
The article also fits cleanly into the architecture-vs-optimizer fork that Training stability at scale is tracking. The unified-sinks work (A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training) argues outlier-driven rescaling via softmax/RMSNorm is load-bearing for training stability — QK-Clip is the dual move: bound the outliers explicitly so the rescaling stays in a numerically safe regime. SSO (Controlled LLM Training on Spectral Sphere) takes the “do this at the optimizer level for all layers” generalization. The “Muon scales past hundreds of billions only with extra weight-norm control” framing in this post is also the empirical motivation behind all the recent torch.optim Muon discussion (Addition of Muon optimizer to torch.optim — PyTorch team welcomes PR (Issue #148819)) and behind Aurora’s leverage-aware variant (Aurora: A Leverage-Aware Optimizer for Rectangular Matrices).
For Luma: if Muon (or a Muon variant) ever displaces AdamW for large- scale training internally, the QK-Clip recipe is essentially free insurance — one extra clip per step, scales to the head count, and self-deactivates once the model self-regulates.
See also
Section titled “See also”- Quantile Balancing: A Hyperparameter-Free MoE Load Balancing Method — same author, same “remove the tuning axis” recipe applied to MoE routing instead of attention logits
- Beyond MuP 3: Special Cases, Special Treatment (Embedding, LM Head, RMS Norm) — same author’s later post extending per-layer-type optimizer derivation to Embedding / LM Head / RMS Norm
- Kimi K2: Open Agentic Intelligence — the Kimi K2 tech report; this blog post is the long-form explanation of the K2 paper’s “MuonClip” section
- Controlled LLM Training on Spectral Sphere — SSO; takes the “constrain spectra to bound activations” idea to the optimizer level for all layers, not just attention
- A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training — outlier-driven rescaling as a stability primitive; QK-Clip bounds the outlier side of that dynamic
- Addition of Muon optimizer to torch.optim — PyTorch team welcomes PR (Issue #148819) — torch.optim.Muon discussion that cites K2’s MuonClip as social proof
- Aurora: A Leverage-Aware Optimizer for Rectangular Matrices — leverage-aware Muon variant addressing the same scaling regime
- Gram Newton-Schulz: A Fast, Hardware-Aware Newton-Schulz Algorithm for Muon — Gram Newton-Schulz: hardware-aware Muon kernel work
- This Simple Optimizer Is Revolutionizing How We Train AI [Muon] — pop-science Muon explainer
- Training stability at scale — broader concept this post contributes to
- English translation: https://frontier.soket.ai/posts/muon_qk_clip/ (Soket AI)
- Translation tracker: https://main-horse.github.io/translations/kexue/ (no English translation of this specific post listed there as of 2026-05-24)
- Original post (Chinese, 403 at filing time): https://kexue.fm/archives/11126