Track VI · Frontier Tech Reports · 10/20

Kimi K2 — MuonClip, agentic 데이터 합성, 자기 비평 보상Kimi K2 — MuonClip, agentic data synthesis, self-critique rewards

1T 파라미터 MoE를 loss spike 없이 학습시킨 MuonClip(Muon + QK-Clip)을 Newton–Schulz 직교화부터 유도하고 attention logit 폭주를 직접 재현해 본다. 도구 사용 궤적을 대량으로 만드는 합성 파이프라인과, 검증 가능 보상과 자기 비평 rubric 보상을 섞은 RL을 읽는다.Derive MuonClip (Muon + QK-Clip), which trained a 1T MoE without a single loss spike, from Newton–Schulz orthogonalisation up, and reproduce attention-logit explosion yourself. Then read the pipeline that synthesises tool-use trajectories at scale and the RL that mixes verifiable rewards with a self-critique rubric reward.

Where k1.5 published its RL recipe and hid the model, Kimi K2 (2025-07) did the opposite: it released both base and instruct weights of a 1T-parameter MoE and talked a lot about pre-training. The report’s theme is “agentic intelligence”, with three contributions underneath.

  1. MuonClip: scaling Muon, which is more token-efficient than AdamW, to 1T makes attention logits explode. QK-Clip, which shrinks Wq and Wk after each update, prevents it, and 15.5T tokens were trained without a single loss spike.
  2. Large-scale agentic data synthesis: more than 23,000 real and synthetic tools, thousands of agents, tasks with rubrics and a tool simulator produce tool-use trajectories at scale, filtered by a judge.
  3. Verifiable rewards + a self-critique rubric reward: on top of an RLVR gym, the model itself acts as a critic that compares responses pairwise, so even subjective tasks are trained with RL.

This lesson goes deep on 1 with equations and code, and reads 2 and 3 from an agent post-training perspective. K2’s architecture, optimiser and data recipe are the base of K2.5 and K3 (K3 lesson).

At a glance

ItemDetails
LabMoonshot AI (Kimi Team)
Released2025-07 (arXiv 2507.20534, v1 2025-07-28 / v2 2026-02-03)
Size1.04T total (Table 4: 1043B), 32.6B active (Table 2)
ArchitectureMLA + MoE, 61 layers (1 dense), 8 of 384 routed experts + 1 shared, hidden 7168, expert hidden 2048, 64 attention heads
Context4k → 32k in pre-training, 128k with YaRN
Pre-training tokens15.5T
OptimiserMuonClip (Muon + weight decay + RMS matching + QK-Clip); Muon also in post-training
WeightsOpen (Kimi-K2-Base, Kimi-K2-Instruct; license listed on Hugging Face as modified-mit)
LinksarXiv · checkpoint-engine

What is new

  • MuonClip trains a 1T MoE on 15.5T tokens with zero loss spikes (Figure 3).
  • A sparsity scaling law: with the number of active experts fixed, adding more total experts keeps lowering the loss at equal FLOPs. Sparsity 48 (384/8) is adopted.
  • Raising token utility by rephrasing: knowledge and maths data are rewritten in other styles and perspectives, increasing high-quality tokens without the overfitting of repeated epochs.
  • A tool-use trajectory synthesis pipeline mixed with real sandboxes for SFT data.
  • Self-critique rubric reward: K2 itself judges subjective tasks against rubrics, and that critic is continually recalibrated with on-policy rollouts of verifiable tasks.

Architecture

K2 starts from the DeepSeek-V3 architecture and turns just two knobs (Table 2).

DeepSeek-V3Kimi K2Change
Layers6161=
Total params671B1.04T↑54%
Active params37B32.6B↓13%
Routed experts256384↑50%
Active experts per token88=
Shared experts11=
Attention heads12864↓50%
Dense layers31↓67%
Expert groupingyesno

Attention is MLA (KV compressed into a low-dimensional cached latent) and the FFN is a fine-grained MoE (many small experts plus an always-on shared expert; see MoE).

Knob 1 — more sparsity. The report fits a “sparsity scaling law” for Muon-trained MoEs, with sparsity = total experts / active experts. With 8 active experts and 1 shared expert fixed and only the total increased, active parameters (= FLOPs) stay the same while training and validation loss keep falling (Figure 5). To reach a validation loss of 1.5, sparsity 48 needs 1.69×, 1.39× and 1.15× fewer FLOPs than sparsity 8, 16 and 32. More would be better still, but infrastructure complexity grows, so they stopped at 48.

Knob 2 — fewer heads. DeepSeek-V3 uses about twice as many heads as layers (128). Looking at long-context inference cost for agentic work, K2 cuts this to 64. At 128k length, going from 64 to 128 heads raises inference FLOPs by 83%, while at equal training tokens the validation loss improves by only 0.5–1.2% (Figure 6).

→ Go deeper: The Kimi lineage — K2 → Kimi Linear → K3.

k1.5가 RL 레시피를 공개하고 모델은 감췄다면, Kimi K2(2025.7)는 반대로 1T 파라미터 MoE의 base와 instruct 가중치를 모두 공개하면서 사전학습 쪽 이야기를 많이 했다. 보고서의 축은 “agentic intelligence”이고, 그 아래에 세 가지 기여가 있다.

  1. MuonClip: AdamW보다 토큰 효율이 좋은 Muon을 1T 규모로 키우면 attention logit이 폭주한다. 이를 Wq, Wk를 학습 후 잘라 내는 QK-Clip으로 막아 15.5T 토큰을 loss spike 없이 학습했다.
  2. 대규모 agentic 데이터 합성: 실제·합성 도구 2만 3천여 개, 수천 개의 agent, rubric이 붙은 과제, 도구 시뮬레이터로 도구 사용 궤적을 대량 생성하고 judge로 거른다.
  3. 검증 가능 보상 + 자기 비평 rubric 보상: RLVR gym에 더해, 모델 자신이 critic이 되어 pairwise로 응답을 비교하는 보상으로 주관적 과제까지 RL로 학습한다.

이 레슨은 1을 수식과 코드로 깊게 보고, 2와 3을 agent 사후학습 관점에서 읽는다. K2의 아키텍처·옵티마이저·데이터 레시피는 이후 K2.5, K3의 바탕이 된다(K3 레슨).

한눈에

항목내용
연구소Moonshot AI (Kimi Team)
공개2025-07 (arXiv 2507.20534, v1 2025-07-28 / v2 2026-02-03)
크기총 1.04T (Table 4: 1043B), 활성 32.6B (Table 2)
아키텍처MLA + MoE, 61층(dense 1층), routed expert 384개 중 8개 + shared 1개, hidden 7168, expert hidden 2048, attention head 64
문맥사전학습 4k → 32k, YaRN으로 128k
사전학습 토큰15.5T
옵티마이저MuonClip (Muon + weight decay + RMS 맞춤 + QK-Clip), 사후학습도 Muon
가중치공개 (Kimi-K2-Base, Kimi-K2-Instruct; Hugging Face 라이선스 표기 modified-mit)
링크arXiv · checkpoint-engine

무엇이 새로운가

  • MuonClip으로 1T MoE를 15.5T 토큰 동안 loss spike 0회로 학습(Figure 3).
  • sparsity scaling law: 활성 expert 수를 고정하고 총 expert 수를 늘리면 같은 FLOPs에서 loss가 계속 내려간다. sparsity 48(384/8)을 채택.
  • rephrasing으로 토큰 효용 높이기: 지식·수학 데이터를 다른 문체·관점으로 다시 써서 반복 학습의 과적합 없이 고품질 토큰을 늘린다.
  • 도구 사용 궤적 합성 파이프라인과 실제 sandbox를 섞은 SFT 데이터.
  • self-critique rubric reward: 주관적 과제의 보상을 K2 자신이 rubric으로 판단하고, 그 critic을 검증 가능 과제의 on-policy rollout으로 계속 보정한다.

아키텍처

K2는 DeepSeek-V3 구조를 출발점으로 두 손잡이만 돌렸다(Table 2).

DeepSeek-V3Kimi K2변화
층 수6161=
총 파라미터671B1.04T↑54%
활성 파라미터37B32.6B↓13%
routed expert256384↑50%
토큰당 활성 expert88=
shared expert11=
attention head12864↓50%
dense 층31↓67%
expert grouping있음없음

attention은 MLA(KV를 저차원 latent로 압축해 캐시), FFN은 fine-grained MoE(작은 expert 여럿 + 항상 켜진 shared expert)다(MoE).

손잡이 1 — sparsity를 키운다. 보고서는 Muon으로 학습한 MoE에 대해 “sparsity scaling law”를 세웠다. sparsity = 총 expert 수 / 활성 expert 수. 활성 expert 8개와 shared 1개를 고정하고 총 expert만 늘리면 활성 파라미터(= FLOPs)는 그대로인데 train·validation loss가 꾸준히 내려간다(Figure 5). validation loss 1.5에 도달하는 데 sparsity 48은 sparsity 8, 16, 32보다 FLOPs가 각각 1.69배, 1.39배, 1.15배 적다. 더 키울수록 좋아지지만 인프라 복잡도가 커져서 48에서 멈췄다.

손잡이 2 — head를 줄인다. DeepSeek-V3는 head 수를 층 수의 약 두 배(128)로 두었다. K2는 agent 작업의 긴 문맥 추론 비용을 보고 64로 줄였다. 128k 길이에서 head를 64 → 128로 늘리면 추론 FLOPs가 83% 늘어나는 반면, 같은 토큰 수 학습에서 validation loss 개선은 0.5–1.2%에 그쳤다(Figure 6).

→ 더 깊이: Kimi 계보 — K2 → Kimi Linear → K3.

sparsity E/k – 총 파라미터total params – 활성 파라미터active params – token당 dispatch 폭 k·(d 또는 ℓ)dispatch width per token k·(d or ℓ) – BF16 가중치BF16 weights –
One routed expert is three matrices (gate, up, down): 3·(input width)·dff parameters. K2 has d = 7168, dff = 2048 and 60 MoE layers (61 layers, one dense); K3 has ℓ = 3584, dff = 3072 and 92 MoE layers. Everything else (attention, shared experts, embeddings, latent projections, the MTP layer…) is derived by subtracting the routed-expert share from the report's total and active counts (the report does not break it down). The active bar is scaled ×20 for visibility. Increase E and only the total grows; the active count (= compute per token) stays put. That is the axis of K2's sparsity scaling law. In the K3 config, switch LatentMoE off and the routed parameters and dispatch width double for the same E and k. Note that K2 (8 × 7168) and K3 (16 × 3584) have the same dispatch width. routed expert 하나는 gate·up·down 세 행렬, 3·(입력 폭)·dff개 파라미터다. K2는 d = 7168, dff = 2048, MoE 층 60개(61층 중 dense 1개), K3는 ℓ = 3584, dff = 3072, MoE 층 92개다. 나머지(attention, shared expert, embedding, latent 투영, MTP 층 등)는 보고서의 총·활성 파라미터에서 routed expert 몫을 빼서 구했다(그 세부 구성은 보고서에 없다). 활성 막대는 보기 좋게 20배 했다. E를 늘리면 총 파라미터만 늘고 활성 파라미터(= token당 연산)는 그대로다. K2 보고서의 sparsity scaling law가 다루는 축이다. K3 설정에서 LatentMoE를 끄면 같은 E, k에서 routed 파라미터와 dispatch 폭이 두 배가 된다. K2(8 × 7168)와 K3(16 × 3584)의 dispatch 폭이 같다는 점을 확인해 보자.

The calculator’s “rest” share is about 28B: the reported total minus the routed experts (60 layers × 384 × 3·7168·2048 ≈ 1.015T). The same computation on the active side leaves about 11.5B, a gap of about 17B. That is almost exactly one layer of 384 experts (about 16.9B), which suggests the MTP layer is included in the total — but the report does not break it down, so this is a guess.

Data

Pre-training: 15.5T tokens, four domains

The corpus is 15.5T tokens across Web Text, Code, Mathematics and Knowledge, and most processing follows k1.5 (rule filters, quality classifiers, dedup) (§2.2). Domain mixture ratios are not disclosed. What K2 newly stresses is token utility: how much learning signal one token provides. High-quality tokens are limited, and repeating the same data for several epochs overfits. So: rewrite it.

Knowledge rephrasing has three parts.

  • Prompts that vary style and perspective (inspired by WRAP)
  • Chunk-wise autoregressive generation: split long documents into chunks, rewrite them in order while keeping the preceding context, and stitch them back together (Figure 4). This sidesteps LLM output-length limits.
  • Fidelity verification that the rewrite matches the source’s meaning

The effect was measured with SimpleQA on an early K2 checkpoint (Table 1).

RephrasingsEpochsSimpleQA accuracy
0 (raw wiki text)1023.76
11027.39
10128.94

Seeing ten rewrites once each beats seeing the same text ten times. On the real large knowledge corpora, each corpus was rephrased at most twice. Maths data are rewritten into a “learning-note” style following SwallowMath, and high-quality maths material in other languages is translated into English for diversity.

Post-training data

SFT data come from candidate responses by k1.5 and in-house domain-expert models, filtered by LLM and human judges. Tool-use data come from the synthesis pipeline of key method 2 below. RL data differ by task type (§3.2.1).

AreaData and reward
Maths, STEM, logicExpert annotation + internal QA extraction + open datasets; tags used to fill under-covered areas. Only moderate difficulty by SFT pass@k. Logic includes table reasoning and puzzles such as the 24 game and Sudoku
Complex instruction followingHybrid verification by code interpreter (length, format…) and LLM judge, plus a hack-check layer catching outputs that merely claim to follow instructions. Generated by experts + AutoIF-style augmentation + a model that probes failure modes
FaithfulnessA sentence-level judge that flags factual claims unsupported by the context, used as a reward
Coding & SWEPublic and synthetic contest problems + human-written unit tests found in pre-training data. SWE environments built from GitHub PRs/issues with executable tests, 10,000+ concurrent Kubernetes sandboxes
SafetyHuman-written seed prompts evolved into jailbreaks by an attacker–target–judge loop, judged success/failure with rubrics

Training

Pre-training recipe (§2.5)

ItemValue
OptimiserMuonClip (τ = 100), weight decay 0.1
Learning rateWSD: after a 500-step warm-up, 2e-4 for 10T tokens, then cosine from 2e-4 to 2e-5 over 5.5T tokens
Batch67M tokens global (fixed throughout)
Context4,096 tokens
Annealing + long contextLR decayed from 2e-5 to 7e-6 over 400B tokens at 4k, then 60B tokens at 32k; extended to 128k with YaRN
HardwareNVIDIA H800, 8 GPUs per node, 8×400 Gbps RoCE between nodes
Parallelism16-way PP (virtual stages) × 16-way EP × ZeRO-1 DP; the same configuration on any multiple of 32 nodes
MemoryBF16 params + FP32 gradient-accumulation buffer ≈ 6TB over a 256-GPU model-parallel group (≈ 30GB of state per GPU). Activations: selective recomputation, MoE up-projection and SwiGLU inputs stored in FP8-E4M3 (1×128 tiles), the rest offloaded to CPU

FP8 is used for storage only, not for computation, because preliminary experiments showed a risk of degradation. Instead of DualPipe, they overlap EP all-to-all with computation by adding warm-up micro-batches to interleaved 1F1B, and keep EP at the minimum of 16 because attention time shrank with 64 heads.

Post-training

SFT also uses Muon, following Moonlight’s conclusion that a Muon-pre-trained checkpoint fine-tunes best with Muon; the report recommends Muon for fine-tuning K2 as well.

The RL algorithm takes k1.5’s as its foundation (§3.2.3). For each prompt xx, sample KK responses from πold\pi_{\text{old}} and minimise with Muon

LRL(θ)=Ex∼D[1K∑i=1K(r(x,yi)−rˉ(x)−τlog⁡πθ(yi∣x)πold(yi∣x))2],rˉ(x)=1K∑ir(x,yi)L_{\text{RL}}(\theta)=\mathbb{E}_{x\sim\mathcal{D}}\Big[\frac1K\sum_{i=1}^{K}\Big(r(x,y_i)-\bar r(x)-\tau\log\frac{\pi_\theta(y_i\mid x)}{\pi_{\text{old}}(y_i\mid x)}\Big)^2\Big],\qquad \bar r(x)=\frac1K\sum_{i}r(x,y_i)

The derivation and interpretation are in the k1.5 lesson. Four additions:

  • Budget control: responses over a per-task-type maximum token budget are truncated and penalised, preventing long responses in non-reasoning domains.
  • PTX loss: an auxiliary language-modelling loss on hand-picked high-quality samples is added to the RL objective to prevent forgetting (InstructGPT’s PTX).
  • Temperature decay: explore with a high temperature early on creative writing and complex reasoning, then lower it.
  • Rewards: the graders in the table above for verifiable tasks, and the self-critique rubric reward below for subjective ones.

→ Go deeper: Inference for RL covers the rollout side of this RL — weight sync (K2 released checkpoint-engine for it), colocated vs disaggregated engines and long-tail responses; Parallelism for serving, and MoE covers serving a 1T MoE.

Self-critique rubric reward (§3.2.2)

For tasks without a grader — creative writing, open questions — K2 uses itself as the critic. The actor K2 generates responses and the critic K2 ranks them by pairwise comparison under a combination of rubrics, of three kinds:

  • Core rubrics (App. F.1): clarity and relevance, conversational fluency and engagement, objective and grounded interaction (no meta-commentary, no flattery).
  • Prescriptive rubrics (App. F.2): prohibitions against reward hacking — do not open by praising the user or the question; do not explain why your own response is good.
  • Human-written rubrics tailored to specific instruction contexts.

The critic ability is first instilled in SFT with open and in-house preference data. Then during RL the critic is continually updated with on-policy rollouts of verifiable tasks (closed-loop critic refinement): objective signal from tasks with answers is distilled into the critic’s judgment, so subjective judgments are recalibrated as the policy changes. The exact rule turning pairwise rankings into scalar rewards is not disclosed (later K2.5–K3 only say “a tournament-style group reward with binary comparisons”).

The report also lists a side effect (App. F.3): because of “no self-qualification, disclaimers or hedging” and “prefer clear, single answers”, the reward can favour overconfident answers even on ambiguous questions.

A closer look at the key methods

1. The MuonClip optimiser

Muon: orthogonalise the update

Muon does not apply the momentum Mt=μMt−1+Gt\mathbf M_t=\mu\mathbf M_{t-1}+\mathbf G_t of a matrix parameter W∈Rn×m\mathbf W\in\mathbb R^{n\times m} directly. It takes the SVD Mt=UΣV⊤\mathbf M_t=\mathbf U\boldsymbol\Sigma\mathbf V^\top, drops Σ\boldsymbol\Sigma, and moves along UV⊤\mathbf U\mathbf V^\top. UV⊤=(MM⊤)−1/2M\mathbf U\mathbf V^\top=(\mathbf M\mathbf M^\top)^{-1/2}\mathbf M is the orthogonal matrix closest to M\mathbf M in Frobenius distance. The effect is to update every singular direction by the same amount. Gradients are usually dominated by a few large singular values; SGD and Adam move far only along those, and the small directions learn slowly. Muon lifts the small directions.

SVD is expensive, so an odd polynomial iteration approximates it. From X0=M/∥M∥F\mathbf X_0=\mathbf M/\|\mathbf M\|_F (all singular values ≤ 1):

Xk+1=aXk+b (XkXk⊤)Xk+c (XkXk⊤)2Xk\mathbf X_{k+1}=a\mathbf X_k+b\,(\mathbf X_k\mathbf X_k^\top)\mathbf X_k+c\,(\mathbf X_k\mathbf X_k^\top)^2\mathbf X_k

If Xk=UΣkV⊤\mathbf X_k=\mathbf U\boldsymbol\Sigma_k\mathbf V^\top then XkXk⊤Xk=UΣk3V⊤\mathbf X_k\mathbf X_k^\top\mathbf X_k=\mathbf U\boldsymbol\Sigma_k^3\mathbf V^\top, so the iteration keeps the singular vectors and applies the scalar function f(x)=ax+bx3+cx5f(x)=ax+bx^3+cx^5 to each singular value. Iterating ff should send every value in (0,1](0,1] to about 1. Jordan et al.’s coefficients (a,b,c)=(3.4445,−4.7750,2.0315)(a,b,c)=(3.4445,-4.7750,2.0315) trade exact convergence for speed: a slope a≈3.4a\approx3.4 grows small xx fast, and the values then oscillate near 1 instead of converging exactly. The Moonlight paper reports that 5 steps suffice and 10 steps give a more accurate orthogonalisation but no better performance.

→ Go deeper: Muon and orthogonalised optimisers — the derivations, Newton–Schulz, and why update-RMS matching works.

계산기의 “그 외” 몫은 보고된 총 파라미터에서 routed expert(60층 × 384 × 3·7168·2048 ≈ 1.015T)를 빼서 얻은 약 28B다. 활성 쪽에서 같은 방식으로 얻은 나머지는 약 11.5B여서 둘 사이에 약 17B 차이가 난다. 이는 expert 384개짜리 층 하나 분량(약 16.9B)과 거의 같아 MTP 층이 총계에 포함된 것으로 보이지만, 보고서는 내역을 밝히지 않으므로 추정이다.

데이터

사전학습: 15.5T 토큰, 네 도메인

말뭉치는 Web Text, Code, Mathematics, Knowledge 네 도메인 15.5T 토큰이고, 대부분의 처리 파이프라인은 k1.5의 방법(규칙 필터, 품질 분류기, dedup)을 따른다(§2.2). 도메인별 혼합 비율은 공개하지 않았다. K2에서 새로 강조한 것은 토큰 효용(token utility), 즉 토큰 하나가 주는 학습 신호의 양이다. 고품질 토큰은 한정되어 있고, 같은 데이터를 여러 epoch 반복하면 과적합된다. 그래서 다시 쓴다.

지식 데이터 rephrasing은 세 부품으로 이루어진다.

  • 문체·관점을 다양하게 바꾸는 프롬프트(WRAP에서 영감)
  • 긴 문서를 chunk로 나눠 앞 문맥을 유지한 채 순서대로 다시 쓰고 이어 붙이는 chunk 단위 autoregressive 생성(Figure 4). LLM의 출력 길이 한계를 피한다.
  • 원문과 의미가 일치하는지 보는 fidelity 검증

효과는 초기 K2 체크포인트에서 SimpleQA로 쟀다(Table 1).

rephrasing 횟수epochSimpleQA 정확도
0 (원본 위키 텍스트)1023.76
11027.39
10128.94

같은 원문을 10번 반복하는 것보다 10가지로 다시 써서 한 번씩 보는 쪽이 낫다. 실제 대규모 지식 말뭉치에는 말뭉치당 최대 두 번까지만 rephrasing했다. 수학 데이터는 SwallowMath 방식으로 “학습 노트” 문체로 다시 쓰고, 다른 언어의 고품질 수학 자료를 영어로 번역해 다양성을 더했다.

사후학습 데이터

SFT 데이터는 k1.5와 사내 도메인 전문가 모델이 후보 응답을 만들고 LLM·사람 judge가 거르는 방식이다. 도구 사용 데이터는 아래 핵심 method 2의 합성 파이프라인에서 나온다. RL 데이터는 과제 유형마다 다르다(§3.2.1).

영역데이터와 보상
수학·STEM·논리전문가 주석 + 내부 QA 추출 + 공개 데이터. 태그로 덜 덮인 영역 보강. SFT 모델의 pass@k로 중간 난이도만 선택. 논리는 표 추론, 24게임·스도쿠 등 퍼즐
복잡한 지시 따르기코드 인터프리터(길이·형식 등)와 LLM judge의 혼합 검증, “지시를 따랐다고 주장만 하는” 출력을 잡는 hack-check 층. 전문가 작성 + AutoIF식 증강 + 실패 유형 탐색 모델로 생성
충실성(faithfulness)문맥 근거 없이 사실을 주장하는 문장을 잡는 문장 단위 judge 모델을 보상으로
코딩·SWE공개·합성 대회 문제 + 사전학습 데이터에서 찾은 사람이 쓴 단위 테스트. SWE는 GitHub PR·issue로 실행 가능한 테스트 환경을 만들고 Kubernetes sandbox로 10,000개 이상 동시 실행
안전사람이 만든 seed 프롬프트를 공격 모델·대상 모델·judge 모델의 3자 루프로 진화시킨 jailbreak 프롬프트, rubric으로 성공/실패 판정

학습

사전학습 레시피 (§2.5)

항목값
옵티마이저MuonClip (τ = 100), weight decay 0.1
학습률WSD: 500 step warmup 후 2e-4로 10T 토큰, 이어 5.5T 토큰 동안 cosine으로 2e-4 → 2e-5
배치전역 67M 토큰 (전 구간 고정)
문맥4,096 토큰
annealing + 장문학습률 2e-5 → 7e-6으로 줄이며 4k 길이 400B 토큰, 이어 32k 길이 60B 토큰. 128k는 YaRN으로 확장
하드웨어NVIDIA H800, 노드당 8 GPU, 노드 간 8×400 Gbps RoCE
병렬화16-way PP(virtual stage) × 16-way EP × ZeRO-1 DP. 32의 배수 노드 어디서나 같은 설정
메모리BF16 파라미터 + FP32 gradient 누적 버퍼 ≈ 6TB를 256 GPU 모델 병렬 그룹에 분산(GPU당 상태 ≈ 30GB). activation은 선택적 재계산, MoE up-projection·SwiGLU 입력을 FP8-E4M3(1×128 tile)로 저장, 나머지는 CPU offload

FP8은 저장에만 쓰고 연산에는 쓰지 않았다. 예비 실험에서 성능 저하 위험을 봤기 때문이다. DualPipe 대신 interleaved 1F1B에 warm-up micro-batch를 늘려 EP all-to-all을 연산과 겹쳤고, head가 64개로 줄어 attention 연산 시간이 짧아진 만큼 EP를 16으로 최소화했다.

사후학습

SFT도 Muon으로 한다. Muon으로 사전학습한 체크포인트는 Muon으로 미세조정할 때 가장 좋다는 Moonlight 논문의 결론을 따른 것이고, 보고서는 K2를 미세조정할 때도 Muon을 권한다.

RL 알고리즘은 k1.5의 것을 그대로 기초로 쓴다(§3.2.3). 프롬프트 xx마다 πold\pi_{\text{old}}에서 KK개 응답을 뽑고

LRL(θ)=Ex∼D[1K∑i=1K(r(x,yi)−rˉ(x)−τlog⁡πθ(yi∣x)πold(yi∣x))2],rˉ(x)=1K∑ir(x,yi)L_{\text{RL}}(\theta)=\mathbb{E}_{x\sim\mathcal{D}}\Big[\frac1K\sum_{i=1}^{K}\Big(r(x,y_i)-\bar r(x)-\tau\log\frac{\pi_\theta(y_i\mid x)}{\pi_{\text{old}}(y_i\mid x)}\Big)^2\Big],\qquad \bar r(x)=\frac1K\sum_{i}r(x,y_i)

를 Muon으로 최소화한다. 유도와 해석은 k1.5 레슨에 있다. 여기에 넷을 더했다.

  • budget control: 과제 유형별 최대 토큰 예산을 넘는 응답은 잘라 내고 벌점을 준다. 비추론 영역에서 응답이 길어지는 것을 막는다.
  • PTX loss: 사람이 고른 고품질 샘플에 대한 보조 언어모델 손실을 RL 목적함수에 더해 망각을 막는다(InstructGPT의 PTX).
  • temperature decay: 창작·복잡한 추론에서 초반에는 높은 temperature로 탐색하고 점점 낮춘다.
  • 보상: 검증 가능한 과제는 위 표의 채점기, 주관적 과제는 아래의 self-critique rubric reward.

→ 더 깊이: 이 RL의 rollout 쪽(가중치 동기화 — K2는 이를 위해 checkpoint-engine을 공개했다, colocated와 disaggregated 엔진, 긴 꼬리 응답)은 RL을 위한 추론, 1T MoE의 서빙은 서빙을 위한 병렬화와 MoE에서 다룬다.

자기 비평 rubric 보상 (§3.2.2)

창작, 열린 질문처럼 채점기가 없는 과제에서 K2는 자신을 critic으로 쓴다. actor K2가 응답들을 만들면 critic K2가 rubric 조합으로 pairwise 비교해 순위를 매긴다. rubric은 세 종류다.

  • core rubric(부록 F.1): 명료성과 관련성, 대화의 유창성과 몰입, 객관적이고 근거 있는 상호작용(메타 코멘트와 아첨 금지).
  • prescriptive rubric(부록 F.2): reward hacking을 막는 금지 규칙. 사용자나 질문을 칭찬하며 시작하지 말 것, 자기 응답이 왜 좋은지 설명하지 말 것.
  • 사람이 쓴 rubric: 특정 지시 맥락에 맞춘 것.

critic 능력은 SFT 단계에서 공개·사내 선호 데이터로 먼저 심는다. 그리고 RL 중에 검증 가능 과제의 on-policy rollout으로 critic을 계속 갱신한다(closed-loop critic refinement). 정답이 있는 과제에서 얻은 객관적 신호를 critic의 판단에 증류해, 주관적 판단이 정책의 변화에 맞춰 재보정되게 하는 장치다. pairwise 순위를 스칼라 보상으로 바꾸는 구체 규칙은 공개되지 않았다(후속 K2.5–K3는 “tournament식 그룹 보상과 이진 비교”라고만 적는다).

보고서 스스로 부작용도 적었다(부록 F.3). “자기 평가·면책·얼버무림 금지”와 “명확하고 단일한 답 선호” 때문에, 모호한 질문에서도 과하게 확신하는 답을 선호할 수 있다.

핵심 method 깊게 보기

1. MuonClip 옵티마이저

Muon: 갱신을 직교화한다

Muon은 행렬 파라미터 W∈Rn×m\mathbf W\in\mathbb R^{n\times m}의 momentum Mt=μMt−1+Gt\mathbf M_t=\mu\mathbf M_{t-1}+\mathbf G_t를 그대로 쓰지 않고, 특이값 분해 Mt=UΣV⊤\mathbf M_t=\mathbf U\boldsymbol\Sigma\mathbf V^\top에서 Σ\boldsymbol\Sigma를 버린 UV⊤\mathbf U\mathbf V^\top 방향으로 움직인다. UV⊤=(MM⊤)−1/2M\mathbf U\mathbf V^\top=(\mathbf M\mathbf M^\top)^{-1/2}\mathbf M은 Frobenius 거리로 M\mathbf M에 가장 가까운 직교 행렬이다. 효과는 “모든 특이 방향을 같은 크기로 갱신한다”는 것이다. gradient는 보통 큰 특이값 몇 개가 지배하는데, SGD나 Adam은 그 지배적 방향으로만 크게 움직이고 작은 방향의 학습은 느리다. Muon은 작은 방향을 끌어올린다.

SVD는 비싸므로 홀수 다항식 반복으로 근사한다. X0=M/∥M∥F\mathbf X_0=\mathbf M/\|\mathbf M\|_F(모든 특이값 ≤ 1)에서

Xk+1=aXk+b (XkXk⊤)Xk+c (XkXk⊤)2Xk\mathbf X_{k+1}=a\mathbf X_k+b\,(\mathbf X_k\mathbf X_k^\top)\mathbf X_k+c\,(\mathbf X_k\mathbf X_k^\top)^2\mathbf X_k

Xk=UΣkV⊤\mathbf X_k=\mathbf U\boldsymbol\Sigma_k\mathbf V^\top이면 XkXk⊤Xk=UΣk3V⊤\mathbf X_k\mathbf X_k^\top\mathbf X_k=\mathbf U\boldsymbol\Sigma_k^3\mathbf V^\top이므로 이 반복은 특이벡터는 그대로 두고 특이값마다 스칼라 함수 f(x)=ax+bx3+cx5f(x)=ax+bx^3+cx^5를 적용한다. ff를 반복하면 (0,1](0,1]의 모든 값이 1 근처로 가야 한다. Jordan et al.의 계수 (a,b,c)=(3.4445,−4.7750,2.0315)(a,b,c)=(3.4445,-4.7750,2.0315)는 작은 xx에서 기울기 a≈3.4a\approx3.4로 빠르게 키우는 대신 정확히 1로 수렴하지 않고 1 근처에서 진동하도록 고른 것이다. Moonlight 논문은 5단계면 충분하고 10단계로 늘려도 성능이 오르지 않는다고 보고한다.

→ 더 깊이: Muon과 직교화 옵티마이저 — 유도, Newton–Schulz, update RMS 맞춤이 통하는 이유.

effective rank: momentum – Muon – Muon 최소/최대min/max σ –
Left: singular values (log axis, each normalised by its maximum) of a momentum matrix M (8×8, a gradient whose singular values decay exponentially) and of the Muon update NS(M). SGD-momentum uses M as is, so it moves a lot only along a few large singular directions. Muon turns M ≈ UΣVᵀ into UVᵀ with Newton–Schulz. Raise the steps from 0 to 5 and Muon's small singular values are pulled up to about 1, so every direction is updated by the same amount (effective rank ≈ 8). Right: the scalar iteration x ↦ ax + bx³ + cx⁵ applied to each singular value. The quintic coefficients grow small x fast but do not converge exactly to 1; they oscillate around 0.7–1.2. Switch to cubic: exact but slow. 왼쪽: momentum 행렬 M(8×8, 특이값이 지수적으로 줄어드는 gradient)과 Muon 갱신 NS(M)의 특이값(로그 축, 각자 최댓값으로 정규화). SGD-momentum은 M을 그대로 쓰므로 큰 특이값 몇 개 방향으로만 크게 움직인다. Muon은 Newton–Schulz로 M ≈ UΣVᵀ를 UVᵀ로 바꾼다. 단계를 0→5로 올리면 Muon의 작은 특이값이 1 근처로 끌려 올라와 모든 방향이 같은 크기로 갱신된다(effective rank ≈ 8). 오른쪽은 각 특이값에 적용되는 스칼라 반복 x ↦ ax + bx³ + cx⁵. quintic 계수는 작은 x를 빠르게 키우는 대신 1에 정확히 수렴하지 않고 0.7–1.2 근처에서 진동한다. cubic으로 바꾸면 정확하지만 느리다.

The Muon update also needs a magnitude. The element RMS of an n×mn\times m orthogonal matrix is 1/max⁡(n,m)1/\sqrt{\max(n,m)}, which depends on the shape. Moonlight observes that AdamW’s update RMS is empirically 0.2–0.4 and multiplies by 0.2max⁡(n,m)0.2\sqrt{\max(n,m)} to make the RMS 0.2, so the learning rate and weight decay tuned for AdamW can be reused. To stop weight and layer-output RMS growing past BF16’s range at scale, weight decay is added too. The Muon step of K2’s Algorithm 1 combines both:

Mt=μMt−1+Gt,Ot=NS(Mt)⋅max⁡(n,m)⋅0.2,Wt=Wt−1−η(Ot+λWt−1)\mathbf M_t=\mu\mathbf M_{t-1}+\mathbf G_t,\quad \mathbf O_t=\mathrm{NS}(\mathbf M_t)\cdot\sqrt{\max(n,m)}\cdot0.2,\quad \mathbf W_t=\mathbf W_{t-1}-\eta\big(\mathbf O_t+\lambda\mathbf W_{t-1}\big)

In Moonlight’s scaling-law experiments, Muon matched AdamW at compute-optimal settings with about 52% of the training FLOPs.

NumPy Newton–Schulz orthogonalisation and the update RMS
import numpy as np

def newton_schulz(G, steps=5, eps=1e-7):
    """Muon's orthogonalisation: G ≈ U Σ Vᵀ → U Vᵀ (quintic coefficients of Jordan et al. 2024)."""
    a, b, c = 3.4445, -4.7750, 2.0315
    X = G / (np.linalg.norm(G, axis=(-2, -1), keepdims=True) + eps)  # Frobenius-normalise → singular values ≤ 1
    tall = X.shape[-2] > X.shape[-1]
    if tall:
        X = X.swapaxes(-1, -2)                 # work with the smaller Gram matrix
    for _ in range(steps):
        A = X @ X.swapaxes(-1, -2)
        X = a * X + (b * A + c * A @ A) @ X    # x ↦ ax + bx³ + cx⁵ on every singular value
    return X.swapaxes(-1, -2) if tall else X   # (leading axes are a batch: one orthogonalisation per head)

rng = np.random.default_rng(0)
n, m = 256, 128
# A momentum matrix whose singular values decay exponentially, like a real gradient
U, _ = np.linalg.qr(rng.normal(size=(n, m)))
V, _ = np.linalg.qr(rng.normal(size=(m, m)))
s = np.exp(-np.arange(m) / 30.0)
M = (U * s) @ V.T

Ue, Se, Vte = np.linalg.svd(M, full_matrices=False)
exact = Ue @ Vte                               # exact orthogonalisation (msign)
print(f"singular values of M: max {Se[0]:.3f}  min {Se[-1]:.2e}  (condition number {Se[0]/Se[-1]:.1e})")

def eff_rank(sv):
    p = sv / sv.sum()
    return np.exp(-(p * np.log(p + 1e-30)).sum())

for k in [1, 3, 5, 10]:
    O = newton_schulz(M, steps=k)
    so = np.linalg.svd(O, compute_uv=False)
    cos = (O * exact).sum() / np.linalg.norm(O) / np.linalg.norm(exact)
    print(f"NS {k:2d} steps: singular values [{so.min():.3f}, {so.max():.3f}]  cos to UVᵀ {cos:.4f}  effective rank {eff_rank(so):6.1f}")
print(f"(effective rank of M itself {eff_rank(Se):.1f}, max {m})")

# The scale in K2's Algorithm 1: O · sqrt(max(n, m)) · 0.2  → update RMS ≈ 0.2 (matched to AdamW)
O = newton_schulz(M)
upd = O * np.sqrt(max(n, m)) * 0.2
exact_upd = exact * np.sqrt(max(n, m)) * 0.2
print(f"\nMuon update RMS = {np.sqrt((upd**2).mean()):.3f}  (exact UVᵀ would give {np.sqrt((exact_upd**2).mean()):.3f})")
 

After 5 steps the singular values sit in [0.68, 1.20] and the effective rank is about 126 of 128. The cosine with the exact UV⊤\mathbf U\mathbf V^\top is about 0.98: not a perfect orthogonalisation but a “flat enough” approximation.

Why logits explode with Muon

An attention logit is qi⋅kj=(xiWq)⋅(xjWk)q_i\cdot k_j=(x_i\mathbf W_q)\cdot(x_j\mathbf W_k), and RMSNorm keeps ∥x∥\|x\| bounded, so

∣qi⋅kj∣≤∥xi∥ ∥xj∥ ∥Wq∥2 ∥Wk∥2|q_i\cdot k_j|\le\|x_i\|\,\|x_j\|\,\|\mathbf W_q\|_2\,\|\mathbf W_k\|_2

and the culprit is growth of the spectral norms of Wq\mathbf W_q, Wk\mathbf W_k (App. E). The report’s hypothesis: a Muon update has all singular values equal and thus full effective rank, and Muon-trained weights also have higher effective rank than Adam-trained ones (confirmed on the 16B Moonlight via singular-value entropy). Then the update’s singular directions uˉjvˉj⊤\bar u_j\bar v_j^\top are more likely to align with the weight’s uivi⊤u_iv_i^\top, and when they align that singular value keeps growing additively. Moreover the logit involves the product WqWk⊤\mathbf W_q\mathbf W_k^\top, so growth in either is squared. Indeed, training a 9B-active / 53B-total MoE with vanilla Muon pushed the max logit past 1000 quickly (Figure 2, left).

Existing remedies did not fit. A logit soft-cap clips right before the softmax, but q⋅kq\cdot k has already grown by then. QK-Norm cannot be used with MLA, whose key matrices are never fully materialised at inference.

QK-Clip: shrinking W_q and W_k

Let Smax⁡h=1dmax⁡X∈Bmax⁡i,jQihKjh⊤S^h_{\max}=\frac{1}{\sqrt d}\max_{\mathbf X\in B}\max_{i,j}\mathbf Q^h_i\mathbf K^{h\top}_j be head hh‘s max logit in the batch. After the optimiser step, if Smax⁡h>τS^h_{\max}>\tau, set γh=τ/Smax⁡h\gamma_h=\tau/S^h_{\max} and

Wqh←γhα Wqh,Wkh←γh1−α Wkh(α=0.5)\mathbf W^h_q\leftarrow\gamma_h^{\alpha}\,\mathbf W^h_q,\qquad \mathbf W^h_k\leftarrow\gamma_h^{1-\alpha}\,\mathbf W^h_k\qquad(\alpha=0.5)

The current step’s forward/backward is untouched; the Smax⁡S_{\max} already computed in the forward pass is used only as a signal to shrink the weights for the next step. Two details matter.

  • Per head. Shrinking every head by Smax⁡=max⁡hSmax⁡hS_{\max}=\max_hS^h_{\max} also shrinks healthy heads; in practice only a few heads explode.
  • In MLA, only head-specific components are clipped: the per-head content parts qC,kC\mathbf q^C,\mathbf k^C by γh\sqrt{\gamma_h} each, the per-head rotary query qR\mathbf q^R by γh\gamma_h, and the shared rotary key kR\mathbf k^R is left alone (so other heads are not affected). The rotary part of the logit is qR⋅kR\mathbf q^R\cdot\mathbf k^R, so qR\mathbf q^R must take all of γh\gamma_h for the whole logit to scale by γh\gamma_h.

→ Go deeper: Stability components — QK-Clip next to QK-norm and logit soft-capping.

Muon 갱신은 크기도 맞춰야 한다. n×mn\times m 직교 행렬의 원소 RMS는 1/max⁡(n,m)1/\sqrt{\max(n,m)}이어서 행렬 모양마다 다르다. Moonlight는 AdamW의 갱신 RMS가 경험적으로 0.2–0.4라는 관찰에서 0.2max⁡(n,m)0.2\sqrt{\max(n,m)}를 곱해 RMS를 0.2로 맞추고, 덕분에 AdamW용으로 튜닝한 학습률과 weight decay를 그대로 쓴다. 대규모에서 weight와 층 출력 RMS가 계속 커져 BF16 범위를 넘는 문제를 막으려고 weight decay도 넣었다. K2 Algorithm 1의 Muon 단계는 이 둘을 합친 것이다.

Mt=μMt−1+Gt,Ot=NS(Mt)⋅max⁡(n,m)⋅0.2,Wt=Wt−1−η(Ot+λWt−1)\mathbf M_t=\mu\mathbf M_{t-1}+\mathbf G_t,\quad \mathbf O_t=\mathrm{NS}(\mathbf M_t)\cdot\sqrt{\max(n,m)}\cdot0.2,\quad \mathbf W_t=\mathbf W_{t-1}-\eta\big(\mathbf O_t+\lambda\mathbf W_{t-1}\big)

Moonlight의 scaling law 실험에서 Muon은 compute-optimal 설정에서 AdamW와 같은 성능에 학습 FLOPs의 약 52%만 썼다.

NumPy Newton–Schulz 직교화와 update RMS
import numpy as np

def newton_schulz(G, steps=5, eps=1e-7):
    """Muon의 직교화: G ≈ U Σ Vᵀ → U Vᵀ (Jordan et al. 2024의 quintic 계수)."""
    a, b, c = 3.4445, -4.7750, 2.0315
    X = G / (np.linalg.norm(G, axis=(-2, -1), keepdims=True) + eps)  # Frobenius 정규화 → 특이값 ≤ 1
    tall = X.shape[-2] > X.shape[-1]
    if tall:
        X = X.swapaxes(-1, -2)                 # 작은 쪽 Gram 행렬로 계산
    for _ in range(steps):
        A = X @ X.swapaxes(-1, -2)
        X = a * X + (b * A + c * A @ A) @ X    # 특이값마다 x ↦ ax + bx³ + cx⁵
    return X.swapaxes(-1, -2) if tall else X   # (앞쪽 축은 batch: head별로 따로 직교화)

rng = np.random.default_rng(0)
n, m = 256, 128
# 실제 gradient처럼 특이값이 지수적으로 줄어드는 momentum 행렬
U, _ = np.linalg.qr(rng.normal(size=(n, m)))
V, _ = np.linalg.qr(rng.normal(size=(m, m)))
s = np.exp(-np.arange(m) / 30.0)
M = (U * s) @ V.T

Ue, Se, Vte = np.linalg.svd(M, full_matrices=False)
exact = Ue @ Vte                               # 정확한 직교화 (msign)
print(f"M 특이값  최대 {Se[0]:.3f}  최소 {Se[-1]:.2e}  (조건수 {Se[0]/Se[-1]:.1e})")

def eff_rank(sv):
    p = sv / sv.sum()
    return np.exp(-(p * np.log(p + 1e-30)).sum())

for k in [1, 3, 5, 10]:
    O = newton_schulz(M, steps=k)
    so = np.linalg.svd(O, compute_uv=False)
    cos = (O * exact).sum() / np.linalg.norm(O) / np.linalg.norm(exact)
    print(f"NS {k:2d}단계: 특이값 [{so.min():.3f}, {so.max():.3f}]  UVᵀ와 cos {cos:.4f}  effective rank {eff_rank(so):6.1f}")
print(f"(M 자체의 effective rank {eff_rank(Se):.1f}, 최대 {m})")

# K2 Algorithm 1 의 스케일: O · sqrt(max(n, m)) · 0.2  → update RMS ≈ 0.2 (AdamW 수준에 맞춤)
O = newton_schulz(M)
upd = O * np.sqrt(max(n, m)) * 0.2
exact_upd = exact * np.sqrt(max(n, m)) * 0.2
print(f"\nMuon update RMS = {np.sqrt((upd**2).mean()):.3f}  (정확한 UVᵀ라면 {np.sqrt((exact_upd**2).mean()):.3f})")
 

5단계에서 특이값이 [0.68, 1.20]에 모이고 effective rank가 128 중 약 126이 된다. 정확한 UV⊤\mathbf U\mathbf V^\top와의 cosine은 0.98 정도로, 완벽한 직교화가 아니라 “충분히 평평한” 근사라는 점이 보인다.

왜 Muon에서 logit이 폭주하는가

attention logit은 qi⋅kj=(xiWq)⋅(xjWk)q_i\cdot k_j=(x_i\mathbf W_q)\cdot(x_j\mathbf W_k)이고 RMSNorm이 ∥x∥\|x\|를 묶어 두므로

∣qi⋅kj∣≤∥xi∥ ∥xj∥ ∥Wq∥2 ∥Wk∥2|q_i\cdot k_j|\le\|x_i\|\,\|x_j\|\,\|\mathbf W_q\|_2\,\|\mathbf W_k\|_2

결국 Wq\mathbf W_q, Wk\mathbf W_k의 spectral norm이 커지는 것이 원인이다(부록 E). 보고서의 가설은 이렇다. Muon 갱신은 모든 특이값이 같아 effective rank가 가득 차 있고, Muon으로 학습한 가중치도 Adam보다 effective rank가 높다(16B Moonlight에서 특이값 엔트로피로 확인). 그러면 갱신의 특이 방향 uˉjvˉj⊤\bar u_j\bar v_j^\top이 가중치의 특이 방향 uivi⊤u_iv_i^\top와 정렬될 확률이 높아지고, 정렬되면 그 특이값이 덧셈으로 계속 커진다. 게다가 logit은 WqWk⊤\mathbf W_q\mathbf W_k^\top라는 곱이라 한쪽 증가가 제곱으로 증폭된다. 실제로 9B 활성 / 53B 총 MoE를 vanilla Muon으로 학습하자 최대 logit이 금세 1000을 넘었다(Figure 2 왼쪽).

기존 처방은 맞지 않았다. logit soft-cap은 softmax 직전에 자르지만 그 전에 q⋅kq\cdot k 자체가 이미 커진다. QK-Norm은 MLA에 쓸 수 없다. MLA는 추론 때 key 행렬을 완전히 만들지 않기 때문이다.

QK-Clip: W_q, W_k를 잘라 내기

head hh의 배치 내 최대 logit을 Smax⁡h=1dmax⁡X∈Bmax⁡i,jQihKjh⊤S^h_{\max}=\frac{1}{\sqrt d}\max_{\mathbf X\in B}\max_{i,j}\mathbf Q^h_i\mathbf K^{h\top}_j라 하자. 옵티마이저 step 뒤 Smax⁡h>τS^h_{\max}>\tau이면 γh=τ/Smax⁡h\gamma_h=\tau/S^h_{\max}로

Wqh←γhα Wqh,Wkh←γh1−α Wkh(α=0.5)\mathbf W^h_q\leftarrow\gamma_h^{\alpha}\,\mathbf W^h_q,\qquad \mathbf W^h_k\leftarrow\gamma_h^{1-\alpha}\,\mathbf W^h_k\qquad(\alpha=0.5)

로 줄인다. 이번 step의 forward/backward는 건드리지 않고, 이미 forward에서 계산한 Smax⁡S_{\max}를 다음 step의 가중치를 줄이는 신호로만 쓴다. 두 가지 세부가 중요하다.

  • head별로 한다. 모든 head를 Smax⁡=max⁡hSmax⁡hS_{\max}=\max_hS^h_{\max}로 한꺼번에 줄이면 멀쩡한 head까지 줄어든다. 실제로 폭주하는 head는 일부뿐이다.
  • MLA에서는 head 전용 성분만 자른다. head별 content 성분 qC,kC\mathbf q^C,\mathbf k^C는 각각 γh\sqrt{\gamma_h}, head별 rotary query qR\mathbf q^R은 γh\gamma_h, 모든 head가 공유하는 rotary key kR\mathbf k^R은 건드리지 않는다(다른 head에 영향을 주지 않으려고). logit에서 rotary 부분은 qR⋅kR\mathbf q^R\cdot\mathbf k^R이므로 qR\mathbf q^R에 γh\gamma_h를 다 주어야 전체가 γh\gamma_h배가 된다.

→ 더 깊이: 안정화 부품 — QK-Clip을 QK-norm, logit soft-capping과 함께 본다.

최대 logitmax logit – clip된 headheads clipped – 마지막 clip 시점last clip – 정상 head 최종 logit (clip 없을 때 대비)normal heads' final logit (vs. no clip) –
Toy dynamics. Two of 16 heads (red, orange) receive updates early in training that sharpen their attention and reinforce themselves, so the scale of Wq, Wk grows exponentially; the rest (grey) grow mildly. The update pressure fades as training goes on and weight decay remains. Switch QK-Clip off and the max logit passes several thousand (the phenomenon K2 Figure 2, left, shows for a 9B/53B model). Per-head clipping pins only the problem heads at τ; once the pressure is gone their logits fall below τ on their own and clipping switches off. Global clipping does the same while shrinking healthy heads too (rightmost readout). 장난감 동역학이다. head 16개 중 2개(빨강·주황)는 학습 초반 attention을 날카롭게 만드는 방향의 갱신이 스스로를 강화해 Wq, Wk의 스케일이 지수적으로 커지고, 나머지(회색)는 완만하다. 갱신 압력은 학습이 진행되며 줄고 weight decay가 남는다. QK-Clip을 끄면 최대 logit이 수천을 넘는다(K2 Figure 2 왼쪽의 9B/53B 모델에서 관찰된 현상). head별 clip은 문제 head만 τ에 묶어 두고, 압력이 사라지면 logit이 스스로 τ 아래로 내려와 clip이 꺼진다. 전역 clip은 같은 일을 하면서 멀쩡한 head까지 같이 줄인다(오른쪽 통계).

K2 used τ = 100. The max logit was quickly pinned at 100 and came down naturally after about 30% of training (Figure 2, right). During the first 70,000 steps 12.7% of heads were clipped at least once; after that all heads stayed below 100 and QK-Clip switched off entirely (App. D). On a 0.5B-active / 3B-total MoE, clipping with an aggressive τ = 30 left the loss curve essentially unchanged (Figure 12).

The code below reproduces the phenomenon by training a real single attention layer (4 heads). Head 0’s target is to focus each query on a single key, so larger logits keep lowering its loss; the other heads’ targets are spread-out distributions with a finite optimal logit.

NumPy Attention-logit explosion: Adam vs Muon vs Muon + QK-Clip
import numpy as np
# (reuses newton_schulz from the block above)

rng = np.random.default_rng(1)
T, d, dh, H = 32, 32, 16, 4
X = rng.normal(size=(T, d))
X *= np.sqrt(d) / np.linalg.norm(X, axis=1, keepdims=True)       # RMSNorm: fixed ‖x‖

# Target attention distribution Y_h per head (each row sums to 1)
perm = rng.permutation(T)
Y = np.zeros((H, T, T))
Y[0, np.arange(T), perm] = 1.0                                     # head 0: focus on one key → sharper is better
for h in range(1, H):                                              # others: spread-out targets → finite optimal logits
    Z = rng.normal(size=(T, T)) * 0.7
    Y[h] = np.exp(Z) / np.exp(Z).sum(1, keepdims=True)

def forward(Wq, Wk):
    Q = X @ Wq; K = X @ Wk                                         # [H, T, dh]
    S = Q @ K.transpose(0, 2, 1) / np.sqrt(dh)                     # [H, T, T] attention logits
    P = np.exp(S - S.max(-1, keepdims=True)); P /= P.sum(-1, keepdims=True)
    loss = -(Y * np.log(P + 1e-30)).sum((1, 2)).mean() / T
    G = (P - Y) / (T * H)                                          # dloss/dS
    dWq = X.T @ (G @ K) / np.sqrt(dh)
    dWk = X.T @ (G.transpose(0, 2, 1) @ Q) / np.sqrt(dh)
    return loss, S.max((1, 2)), dWq, dWk

def train(opt, clip_tau=None, steps=400, lr=0.02):
    r = np.random.default_rng(2)
    Wq = r.normal(size=(H, d, dh)) / np.sqrt(d); Wk = r.normal(size=(H, d, dh)) / np.sqrt(d)
    st = {k: [np.zeros_like(Wq), np.zeros_like(Wq)] for k in 'qk'}
    smax, nclip = [], 0
    for t in range(1, steps + 1):
        loss, Sh, dWq, dWk = forward(Wq, Wk)
        smax.append(Sh.max())
        for W, g, key in ((Wq, dWq, 'q'), (Wk, dWk, 'k')):
            m, v = st[key]
            if opt == 'muon':                                      # orthogonalise each head's matrix separately
                m *= 0.95; m += g
                W -= lr * newton_schulz(m) * np.sqrt(max(d, dh)) * 0.2
            else:                                                  # Adam (β1=0.9, β2=0.95)
                m *= 0.9; m += 0.1 * g; v *= 0.95; v += 0.05 * g * g
                W -= lr * (m / (1 - 0.9**t)) / (np.sqrt(v / (1 - 0.95**t)) + 1e-8)
        if clip_tau is not None:                                   # QK-Clip: shrink W_q, W_k before the next step
            _, Sh_new, _, _ = forward(Wq, Wk)
            for h in range(H):
                if Sh_new[h] > clip_tau:
                    gam = clip_tau / Sh_new[h]
                    Wq[h] *= np.sqrt(gam); Wk[h] *= np.sqrt(gam); nclip += 1
    _, Sh, _, _ = forward(Wq, Wk)
    return np.array(smax), Sh, loss, nclip

for name, opt, tau in [("Adam", "adam", None), ("Muon", "muon", None), ("Muon + QK-Clip τ=30", "muon", 30.0)]:
    smax, Sh, loss, nclip = train(opt, tau)
    print(f"{name:20s} final loss {loss:.3f}  max logit at step 100/400 {smax[99]:6.1f} / {smax[-1]:6.1f}"
          f"  per head {np.round(Sh, 1)}  clips {nclip}")
 

At the same learning rate, after 400 steps Adam leaves head 0’s max logit near 35 while Muon pushes it past 330. The loss is the same for all three: head 0’s softmax is already almost one-hot at logit 30, so growing further adds almost nothing to the loss and only adds numerical risk. QK-Clip pins head 0 at 30 and leaves the other heads alone. It is a toy, so it is no proof that “Muon always explodes more”, but it lets you check by hand the mechanism the report describes: full-rank updates rapidly grow the spectral norm of heads that want sharp attention.

PyTorch PyTorch: one MuonClip step (MHA version) 로컬에서 실행run locally (pip install torch)
import torch

@torch.no_grad()
def newton_schulz(G, steps=5, eps=1e-7):
    a, b, c = 3.4445, -4.7750, 2.0315
    X = G.bfloat16() / (G.norm(dim=(-2, -1), keepdim=True) + eps)
    tall = X.size(-2) > X.size(-1)
    if tall:
        X = X.mT
    for _ in range(steps):
        A = X @ X.mT
        X = a * X + (b * A + c * A @ A) @ X
    return (X.mT if tall else X).to(G.dtype)

@torch.no_grad()
def muonclip_step(matrix_params, momenta, lr, wd=0.1, mu=0.95,
                  attn_layers=(), smax_per_layer=(), tau=100.0):
    # 1) Muon: 2-D matrix parameters only (embedding, LM head and norms go to AdamW separately)
    for W, M in zip(matrix_params, momenta):
        M.mul_(mu).add_(W.grad)
        O = newton_schulz(M) * (max(W.shape) ** 0.5) * 0.2        # update RMS ≈ 0.2
        W.mul_(1 - lr * wd).add_(O, alpha=-lr)                     # W ← W − η(O + λW)
    # 2) QK-Clip: per-head max logit S_max[h] recorded in the forward pass (shape [n_heads])
    for layer, smax in zip(attn_layers, smax_per_layer):
        gamma = tau / smax.clamp(min=tau)                          # γ_h = τ / max(S_max^h, τ) (1 if S_max^h ≤ τ, even < 0)
        hd = layer.head_dim
        Wq = layer.q_proj.weight.view(layer.n_heads, hd, -1)       # [H, hd, d_model]
        Wk = layer.k_proj.weight.view(layer.n_heads, hd, -1)       # assumes MHA (with GQA, mind shared key heads)
        Wq.mul_(gamma.sqrt()[:, None, None])
        Wk.mul_(gamma.sqrt()[:, None, None])
 

2. The agentic data synthesis pipeline

The bottleneck for tool use is data. Real environments are hard to build at scale for reasons of cost, complexity and access. Starting from ACEBench’s synthesis framework, K2 builds a three-stage pipeline (§3.1.1, Figure 8): (a) build a repository of tool specs, (b) build agents and tasks for each tool combination, (c) generate trajectories in which agents call tools to complete the tasks, then filter.

K2에서는 τ = 100이었다. 최대 logit은 금세 100에 묶였다가 학습의 약 30%가 지난 뒤 자연스럽게 내려갔고(Figure 2 오른쪽), 처음 70,000 step 동안 전체 head의 12.7%가 한 번 이상 clip되었으며 그 뒤에는 모든 head가 100 아래로 내려가 QK-Clip이 완전히 꺼졌다(부록 D). 0.5B 활성 / 3B 총 MoE에서 공격적인 τ = 30으로 clip해도 loss 곡선이 거의 같았다(Figure 12).

아래 코드는 실제 attention 한 층(head 4개)을 학습시켜 이 현상을 재현한다. head 0의 목표는 query마다 key 하나에 집중하는 것이라 logit이 클수록 손실이 줄고, 나머지 head의 목표는 넓게 퍼진 분포라 유한한 logit이 최적이다.

NumPy attention logit 폭주: Adam vs Muon vs Muon + QK-Clip
import numpy as np
# (위 블록의 newton_schulz 를 그대로 쓴다)

rng = np.random.default_rng(1)
T, d, dh, H = 32, 32, 16, 4
X = rng.normal(size=(T, d))
X *= np.sqrt(d) / np.linalg.norm(X, axis=1, keepdims=True)       # RMSNorm: ‖x‖ 고정

# head별 목표 attention 분포 Y_h (행마다 합 1)
perm = rng.permutation(T)
Y = np.zeros((H, T, T))
Y[0, np.arange(T), perm] = 1.0                                     # head 0: 한 key에 집중 → 날카로울수록 좋다
for h in range(1, H):                                              # 나머지: 넓게 퍼진 분포 → 유한한 logit이 최적
    Z = rng.normal(size=(T, T)) * 0.7
    Y[h] = np.exp(Z) / np.exp(Z).sum(1, keepdims=True)

def forward(Wq, Wk):
    Q = X @ Wq; K = X @ Wk                                         # [H, T, dh]
    S = Q @ K.transpose(0, 2, 1) / np.sqrt(dh)                     # [H, T, T] attention logits
    P = np.exp(S - S.max(-1, keepdims=True)); P /= P.sum(-1, keepdims=True)
    loss = -(Y * np.log(P + 1e-30)).sum((1, 2)).mean() / T
    G = (P - Y) / (T * H)                                          # dloss/dS
    dWq = X.T @ (G @ K) / np.sqrt(dh)
    dWk = X.T @ (G.transpose(0, 2, 1) @ Q) / np.sqrt(dh)
    return loss, S.max((1, 2)), dWq, dWk

def train(opt, clip_tau=None, steps=400, lr=0.02):
    r = np.random.default_rng(2)
    Wq = r.normal(size=(H, d, dh)) / np.sqrt(d); Wk = r.normal(size=(H, d, dh)) / np.sqrt(d)
    st = {k: [np.zeros_like(Wq), np.zeros_like(Wq)] for k in 'qk'}
    smax, nclip = [], 0
    for t in range(1, steps + 1):
        loss, Sh, dWq, dWk = forward(Wq, Wk)
        smax.append(Sh.max())
        for W, g, key in ((Wq, dWq, 'q'), (Wk, dWk, 'k')):
            m, v = st[key]
            if opt == 'muon':                                      # head별 행렬 하나씩 직교화
                m *= 0.95; m += g
                W -= lr * newton_schulz(m) * np.sqrt(max(d, dh)) * 0.2
            else:                                                  # Adam (β1=0.9, β2=0.95)
                m *= 0.9; m += 0.1 * g; v *= 0.95; v += 0.05 * g * g
                W -= lr * (m / (1 - 0.9**t)) / (np.sqrt(v / (1 - 0.95**t)) + 1e-8)
        if clip_tau is not None:                                   # QK-Clip: 다음 step 전에 W_q, W_k를 줄인다
            _, Sh_new, _, _ = forward(Wq, Wk)
            for h in range(H):
                if Sh_new[h] > clip_tau:
                    gam = clip_tau / Sh_new[h]
                    Wq[h] *= np.sqrt(gam); Wk[h] *= np.sqrt(gam); nclip += 1
    _, Sh, _, _ = forward(Wq, Wk)
    return np.array(smax), Sh, loss, nclip

for name, opt, tau in [("Adam", "adam", None), ("Muon", "muon", None), ("Muon + QK-Clip τ=30", "muon", 30.0)]:
    smax, Sh, loss, nclip = train(opt, tau)
    print(f"{name:20s} 최종 loss {loss:.3f}  step100/400 최대 logit {smax[99]:6.1f} / {smax[-1]:6.1f}"
          f"  head별 {np.round(Sh, 1)}  clip 횟수 {nclip}")
 

같은 학습률에서 Adam은 400 step 뒤 head 0의 최대 logit이 35 근처인데 Muon은 330을 넘는다. 손실은 셋이 같다. head 0의 softmax는 logit 30에서 이미 거의 one-hot이어서, 그 이상 커지는 것은 손실에 거의 기여하지 않고 수치 위험만 키운다. QK-Clip은 head 0만 30에 묶고 나머지 head는 건드리지 않는다. 장난감이므로 “Muon이 늘 더 폭주한다”는 일반 명제의 증거는 아니지만, 보고서가 말하는 메커니즘(가득 찬 랭크의 갱신이 날카로운 attention을 원하는 head에서 spectral norm을 빠르게 키운다)을 손으로 확인할 수 있다.

PyTorch PyTorch: MuonClip 한 step (MHA 버전) 로컬에서 실행run locally (pip install torch)
import torch

@torch.no_grad()
def newton_schulz(G, steps=5, eps=1e-7):
    a, b, c = 3.4445, -4.7750, 2.0315
    X = G.bfloat16() / (G.norm(dim=(-2, -1), keepdim=True) + eps)
    tall = X.size(-2) > X.size(-1)
    if tall:
        X = X.mT
    for _ in range(steps):
        A = X @ X.mT
        X = a * X + (b * A + c * A @ A) @ X
    return (X.mT if tall else X).to(G.dtype)

@torch.no_grad()
def muonclip_step(matrix_params, momenta, lr, wd=0.1, mu=0.95,
                  attn_layers=(), smax_per_layer=(), tau=100.0):
    # 1) Muon: 2D 행렬 파라미터만 (embedding, LM head, norm은 AdamW로 따로)
    for W, M in zip(matrix_params, momenta):
        M.mul_(mu).add_(W.grad)
        O = newton_schulz(M) * (max(W.shape) ** 0.5) * 0.2        # update RMS ≈ 0.2
        W.mul_(1 - lr * wd).add_(O, alpha=-lr)                     # W ← W − η(O + λW)
    # 2) QK-Clip: forward에서 기록한 head별 max logit S_max[h] (shape [n_heads])
    for layer, smax in zip(attn_layers, smax_per_layer):
        gamma = tau / smax.clamp(min=tau)                          # γ_h = τ / max(S_max^h, τ) (S_max^h ≤ τ이면 음수여도 1)
        hd = layer.head_dim
        Wq = layer.q_proj.weight.view(layer.n_heads, hd, -1)       # [H, hd, d_model]
        Wk = layer.k_proj.weight.view(layer.n_heads, hd, -1)       # MHA 가정 (GQA면 key head 공유에 주의)
        Wq.mul_(gamma.sqrt()[:, None, None])
        Wk.mul_(gamma.sqrt()[:, None, None])
 

2. agentic 데이터 합성 파이프라인

도구 사용 능력의 병목은 데이터다. 진짜 환경은 비용·복잡도·접근성 때문에 대량으로 만들기 어렵다. K2는 ACEBench의 합성 프레임워크에서 출발해 세 단계 파이프라인을 만들었다(§3.1.1, Figure 8). (a) 도구 명세 저장소를 만들고, (b) 도구 조합마다 agent와 과제를 만들고, (c) agent가 도구를 불러 과제를 끝내는 궤적을 생성한 뒤 거른다.

 
보존 비율kept – 보존된 궤적 중 오류 회복 포함kept trajectories with error recovery – 보존된 궤적 중 "거짓 완료"kept trajectories with a "fake completion" –
Click a stage box to see what the report says about it, with its numbers. Below is a toy generator (domain and tool names are examples). Each task has three tool calls as rubric items, and the tool simulator returns failures with some probability. The agent retries, and when retries run out it falsely reports "done" with probability 30%. The judge grades the rubric by looking at the simulator's state. Raise the failure rate: the kept fraction drops, but among kept trajectories the share containing "fail → retry → recover" rises. Controlled stochastic failures are what manufacture error-recovery demonstrations. Loosen the judge and fake completions leak into the data. 위 단계 상자를 클릭하면 보고서가 설명하는 내용과 수치가 나온다. 아래는 장난감 생성기다(도메인·도구 이름은 예시). 과제마다 도구 호출 3개가 rubric 항목이고, 도구 시뮬레이터는 일정 확률로 실패를 돌려준다. agent는 재시도하거나, 재시도가 바닥나면 30% 확률로 "완료했다"고 거짓 보고한다. judge는 시뮬레이터의 상태를 보고 rubric을 채점한다. 실패 확률을 올리면 보존 비율은 떨어지지만 보존된 궤적 중 "실패 → 재시도 → 회복"을 담은 비율이 오른다. 통제된 확률적 실패가 오류 회복 시연을 만드는 장치다. judge를 느슨하게 하면 거짓 완료가 데이터에 섞여 들어온다.

For someone doing agent post-training, three points in this design matter.

  • Tool simulator = world model. The simulator does not just invent call results; it maintains and updates state and deliberately injects partial failures and edge cases with controlled stochasticity. As the figure shows, this is what produces demonstrations of “fail → diagnose → retry”.
  • Rubrics are generated together with tasks. Writing success criteria, expected tool-use patterns and checkpoints at task-creation time keeps the judge’s grading consistent. The report calls the whole process “large-scale rejection sampling”.
  • Simulation + real sandboxes. Where fidelity is decisive, as in coding and SWE, real execution results (test pass rates) replace simulation: a hybrid that combines the diversity of simulation with the accuracy of reality.
확인 문제Check yourself

Why does K2's QK-Clip leave the shared rotary key k^R of MLA unscaled?

In MLA’s decoupled RoPE, the rotary key kR\mathbf k^R is shared by all heads. Shrinking it would also shrink the logits of heads that need no clipping (the same side effect as global clipping). So the head-specific qR\mathbf q^R takes all of γh\gamma_h, making the rotary part qR⋅kR\mathbf q^R\cdot\mathbf k^R scale by γh\gamma_h, and the content part is split as γh\sqrt{\gamma_h} on each of qC,kC\mathbf q^C,\mathbf k^C.

Results

K2-Instruct’s main comparison sets every model to its non-thinking mode (§4.1.1). Output is capped at 8,192 tokens (16,384 for SWE-bench Verified Agentless only), and high-variance benchmarks are averaged over kk runs (Avg@k).

이 설계에서 agent 사후학습을 하는 사람에게 중요한 지점은 세 곳이다.

  • 도구 시뮬레이터 = world model. 시뮬레이터는 호출 결과만 지어내는 것이 아니라 상태를 유지·갱신하고, 통제된 확률성으로 부분 실패와 엣지 케이스를 일부러 만든다. 그림에서 보듯 이것이 “실패 → 진단 → 재시도”를 담은 시연을 만드는 장치다.
  • rubric을 과제와 함께 만든다. 과제를 만든 시점에 성공 기준·기대 도구 사용 패턴·체크포인트를 같이 써 두면 judge의 채점이 일관되어진다. 보고서는 전체를 “대규모 rejection sampling”으로 규정한다.
  • 시뮬레이션 + 실제 sandbox 혼합. 코딩·SWE처럼 충실도가 결정적인 영역은 실제 실행 결과(테스트 통과율)로 대체한다. 시뮬레이션의 다양성과 실제의 정확성을 함께 쓰는 하이브리드다.
확인 문제Check yourself

MLA를 쓰는 K2에서 QK-Clip이 head별 공유 rotary key k^R을 스케일하지 않는 이유는?

MLA의 decoupled RoPE에서 rotary key kR\mathbf k^R은 모든 head가 공유한다. 이것을 줄이면 clip이 필요 없는 head의 logit도 같이 줄어든다(전역 clip과 같은 부작용). 그래서 head 전용인 qR\mathbf q^R에 γh\gamma_h 전부를 곱해 rotary 부분 qR⋅kR\mathbf q^R\cdot\mathbf k^R을 γh\gamma_h배로 만들고, content 부분은 qC,kC\mathbf q^C,\mathbf k^C에 γh\sqrt{\gamma_h}씩 나눠 곱한다.

실험 결과

K2-Instruct의 주 비교는 모든 모델을 non-thinking 모드로 맞춘 것이다(§4.1.1). 출력은 8,192 토큰으로 제한(SWE-bench Verified Agentless만 16,384), 분산이 큰 벤치마크는 kk번 반복 평균(Avg@k)이다.

Switch the category to see at a glance where the model leads and where it trails. Bar length is normalised to each row's maximum (for Elo, zero sits just below the row minimum). "Show difference" plots each model's score minus Kimi's. Numbers: K2 report, Table 3. Claude's SWE-bench agentic scores (72.7, 72.5) are taken from those models' own reports/blogs (*). 분야를 바꿔 보면 어느 영역에서 앞서고 어느 영역에서 뒤지는지가 한눈에 보인다. 막대 길이는 벤치마크마다 그 행의 최댓값으로 정규화했다(Elo는 행 안의 최솟값 근처를 0으로 잡았다). "차이로 보기"를 켜면 각 모델 점수에서 Kimi 점수를 뺀 값을 보여 준다. 수치: K2 보고서 Table 3. Claude의 SWE-bench Agentic 수치(72.7, 72.5)는 해당 모델 보고서·블로그에서 가져온 값(*)이다.
  • Agents and coding: the strongest open model, sometimes above Claude Opus 4 (Tau2 telecom 65.8 vs 57.0). Single-attempt agentic SWE-bench Verified is 65.8, still behind the Claude 4 family (72.5–72.7); with multiple attempts (best-of-N via an internal verifier) it is 71.6.
  • Long-context retrieval (MRCR 55.0, LongBench v2 49.1) is below the proprietary models — readable as the price of the 64-head, 128k design.
  • SimpleQA (31.0) is below GPT-4.1 (42.3) but above the other open models, consistent with rephrasing helping knowledge absorption.
  • On the LMSYS Arena cited in the abstract (as of 2025-07-17, 3,000+ votes) it was the top open model and 5th overall.

Base model (Table 4, subset)

BenchmarkKimi-K2-BaseDeepSeek-V3-BaseLlama4-Maverick-BaseQwen2.5-72B-Base
MMLU (5-shot)87.7987.1084.8786.08
MMLU-Pro (5-shot)69.1760.5963.4762.80
SimpleQA (5-shot)35.2526.4923.7410.31
GPQA-Diamond (avg@8)48.1150.5149.4340.78
EvalPlus80.3365.6165.4866.04
MATH (4-shot)70.2261.7063.0262.68

Ablations that justify the methods

ClaimEvidence (location in report)
Rephrasing > repetitionSimpleQA 23.76 (raw, 10 epochs) → 27.39 (1 rephrase × 10 epochs) → 28.94 (10 rephrases × 1 epoch) (Table 1)
Sparsity 481.69×/1.39×/1.15× fewer FLOPs than sparsity 8/16/32 to reach val loss 1.5 (Figure 5, §2.3)
64 heads128 heads: +83% inference FLOPs at 128k for 0.5–1.2% better val loss (Figure 6)
QK-Clip is harmless0.5B/3B MoE, τ=30: no difference in loss curve or downstream (Figure 12, App. D)
QK-Clip self-deactivatesOnly 12.7% of heads clipped in the first 70k steps, then all heads below τ (App. D)
Muon token efficiencyAbout 52% of AdamW’s FLOPs at compute-optimal (Moonlight paper, Figure 1)

On the post-training side (synthetic data, self-critique, PTX, temperature decay) there are no ablation numbers.

Reading critically

  • The non-thinking frame. Setting every baseline to non-thinking is fair, but limits the meaning on tasks (AIME, GPQA) where thinking models were already in use in mid-2025. Some Claude SWE-bench numbers come from other sources (*) and may use different harnesses.
  • Post-training is a black box. The number of synthetic trajectories, judge pass rates, data volume per RL stage, the rule mapping self-critique to a scalar reward and the budget penalty are all missing — the numbers most needed for reproduction.
  • Causality of QK-Clip. Appendix E’s explanation that “Muon is more prone to logit explosion” is explicitly a hypothesis. There is a plot of the 9B/53B explosion but no matching AdamW control.
  • Circularity of self-critique. When policy and critic are the same model (K2), the policy’s biases easily become the critic’s. How much the closed loop through verifiable tasks prevents this is not quantified; the “overconfidence” admitted in App. F.3 is one symptom.
  • Contamination. LiveCodeBench v6 uses problems from 2024-08 to 2025-05 and so has decent temporal separation, but no contamination checks are reported for the other benchmarks.
확인 문제Check yourself

What is the main reason for multiplying Muon's update by 0.2·√max(n, m)?

An n×mn\times m orthogonal matrix has all singular values 1, so ∥O∥F2=min⁡(n,m)\|\mathbf O\|_F^2=\min(n,m) and its element RMS is min⁡(n,m)/(nm)=1/max⁡(n,m)\sqrt{\min(n,m)/(nm)}=1/\sqrt{\max(n,m)}. Multiplying by 0.2max⁡(n,m)0.2\sqrt{\max(n,m)} makes the RMS 0.2 for every matrix, matching AdamW’s empirical update RMS (0.2–0.4). In the code above the exact UV⊤\mathbf U\mathbf V^\top gives exactly 0.200, which is the check.

Summary

  • K2 is a 1.04T/32.6B MoE that takes the DeepSeek-V3 architecture, raises the experts to 384 (sparsity 48) and cuts the heads to 64, justified by the sparsity scaling law and long-context inference cost.
  • Muon orthogonalises the momentum with Newton–Schulz so every singular direction is updated equally, and matches AdamW’s RMS with 0.2max⁡(n,m)0.2\sqrt{\max(n,m)}.
  • Scaling Muon grows the spectral norms of Wq,Wk\mathbf W_q,\mathbf W_k until attention logits explode. QK-Clip shrinks Wq,Wk\mathbf W_q,\mathbf W_k only when a head’s max logit exceeds τ and switches itself off once training stabilises; in MLA it clips only head-specific components.
  • Rephrasing knowledge and maths data gave higher token utility than repetition (SimpleQA 23.76 → 28.94).
  • Tool-use data come from rejection sampling through tool repository → agents → rubric tasks → user/tool-simulator trajectories → judge filter, complemented by real sandboxes.
  • RL adds budget control, a PTX loss and temperature decay to the k1.5 objective, and learns subjective tasks with a self-critique rubric reward recalibrated on verifiable tasks.
  • agent·코딩에서 열린 모델 중 가장 강하고, Tau2 telecom(65.8)처럼 일부는 Claude Opus 4(57.0)보다 높다. SWE-bench Verified agentic 단일 시도는 65.8로 Claude 4 계열(72.5–72.7)과는 아직 차이가 있다. 다중 시도(내부 verifier로 best-of-N)에서는 71.6이다.
  • 장문 검색(MRCR 55.0, LongBench v2 49.1)은 독점 모델보다 낮다. 64-head·128k 설계의 대가로 읽을 수 있다.
  • SimpleQA(31.0)는 GPT-4.1(42.3)보다 낮지만 다른 열린 모델보다는 높다. rephrasing의 지식 흡수 효과와 맞는 방향이다.
  • 보고서 초록의 LMSYS Arena(2025.7.17 기준, 3,000표 이상)에서 열린 모델 1위, 전체 5위.

Base 모델 (Table 4, 일부)

벤치마크Kimi-K2-BaseDeepSeek-V3-BaseLlama4-Maverick-BaseQwen2.5-72B-Base
MMLU (5-shot)87.7987.1084.8786.08
MMLU-Pro (5-shot)69.1760.5963.4762.80
SimpleQA (5-shot)35.2526.4923.7410.31
GPQA-Diamond (avg@8)48.1150.5149.4340.78
EvalPlus80.3365.6165.4866.04
MATH (4-shot)70.2261.7063.0262.68

방법을 정당화하는 ablation

주장근거 (보고서 위치)
rephrasing > 반복SimpleQA 23.76 (원본 10 epoch) → 27.39 (1회 rephrase × 10 epoch) → 28.94 (10회 rephrase × 1 epoch) (Table 1)
sparsity 48val loss 1.5 도달 FLOPs가 sparsity 8/16/32 대비 1.69×/1.39×/1.15× 적음 (Figure 5, §2.3)
head 64128 head는 128k에서 추론 FLOPs +83%, val loss 개선 0.5–1.2% (Figure 6)
QK-Clip 무해0.5B/3B MoE, τ=30에서 loss 곡선·다운스트림 차이 없음 (Figure 12, 부록 D)
QK-Clip 자가 비활성첫 70k step에 head 12.7%만 clip, 이후 모든 head가 τ 아래 (부록 D)
Muon 토큰 효율compute-optimal에서 AdamW 대비 FLOPs 약 52% (Moonlight 논문 Figure 1)

사후학습 쪽(합성 데이터, self-critique, PTX, temperature decay)은 ablation 수치가 없다.

비판적으로 읽기

  • non-thinking 비교라는 틀. 모든 baseline을 non-thinking으로 맞춘 것은 공정하지만, 2025년 중반 이미 thinking 모델이 쓰이던 과제(AIME, GPQA)에서는 의미가 제한된다. Claude의 SWE-bench 수치 일부는 다른 출처(*)에서 가져왔고 harness가 다를 수 있다.
  • 사후학습의 블랙박스. 합성 궤적 수, judge 통과율, RL 단계별 데이터 양, self-critique 보상을 스칼라로 바꾸는 규칙, budget 벌점 값이 없다. 재현에 가장 필요한 숫자가 빠져 있다.
  • QK-Clip의 인과. 부록 E의 “Muon이 logit 폭주에 더 취약하다”는 설명은 스스로 hypothesis라고 밝힌다. 9B/53B 모델의 폭주 그림은 있지만 같은 설정의 AdamW 대조군 그림은 없다.
  • 자기 비평 보상의 순환성. 정책과 critic이 같은 모델(K2)이면 정책의 편향이 critic의 편향이 되기 쉽다. 검증 가능 과제로 critic을 보정하는 closed loop가 이를 얼마나 막는지는 정량화되지 않았다. 부록 F.3이 인정하는 “과한 확신” 경향이 한 증상이다.
  • 오염. LiveCodeBench v6는 2024.8–2025.5 문제를 써서 시간적 분리가 비교적 좋지만, 다른 벤치마크의 오염 점검은 보고되지 않았다.
확인 문제Check yourself

Muon 갱신에 0.2·√max(n, m)을 곱하는 주된 이유는?

n×mn\times m 직교 행렬은 특이값이 모두 1이므로 ∥O∥F2=min⁡(n,m)\|\mathbf O\|_F^2=\min(n,m), 원소 RMS는 min⁡(n,m)/(nm)=1/max⁡(n,m)\sqrt{\min(n,m)/(nm)}=1/\sqrt{\max(n,m)}이다. 여기에 0.2max⁡(n,m)0.2\sqrt{\max(n,m)}를 곱하면 RMS가 0.2가 되어 모든 행렬의 갱신 크기가 같아지고 AdamW의 경험적 update RMS(0.2–0.4)와 맞는다. 위 코드에서 정확한 UV⊤\mathbf U\mathbf V^\top의 RMS가 정확히 0.200으로 나오는 것이 그 확인이다.

정리

  • K2는 DeepSeek-V3 구조에서 expert를 384개로(sparsity 48) 늘리고 head를 64개로 줄인 1.04T/32.6B MoE다. sparsity scaling law와 긴 문맥 추론 비용이 그 근거다.
  • Muon은 momentum을 Newton–Schulz로 직교화해 모든 특이 방향을 같은 크기로 갱신하고, 0.2max⁡(n,m)0.2\sqrt{\max(n,m)}로 RMS를 AdamW에 맞춘다.
  • Muon을 키우면 Wq,Wk\mathbf W_q,\mathbf W_k의 spectral norm이 커져 attention logit이 폭주한다. QK-Clip은 head별 최대 logit이 τ를 넘을 때만 Wq,Wk\mathbf W_q,\mathbf W_k를 줄이고, 학습이 안정되면 스스로 꺼진다. MLA에서는 head 전용 성분만 자른다.
  • 지식·수학 데이터를 rephrasing해 반복 학습보다 높은 토큰 효용을 얻었다(SimpleQA 23.76 → 28.94).
  • 도구 사용 데이터는 도구 저장소 → agent → rubric 과제 → 사용자·도구 시뮬레이터 궤적 → judge 필터의 rejection sampling으로 만들고, 실제 sandbox로 보완한다.
  • RL은 k1.5 목적함수 위에 budget control, PTX loss, temperature decay를 더하고, 주관적 과제는 검증 가능 과제로 보정되는 self-critique rubric reward로 학습한다.

더 읽을거리Further reading