Kimi K2

Kimi Team (Moonshot AI) · 2025-07-28 · analysed 2026-08-10 · skill v0.3.5

sparse-MoE full-attention text-only open-weights frontier frontier-generalist

Design overview

Kimi K2 is a 61-layer, 1.04T-parameter ultra-sparse MoE (32.6B active per token) that largely follows DeepSeek-V3's blueprint: Multi-head Latent Attention in every layer (latent KV compression, partial rotary encoding), a hidden width of 7168, and a shared-expert MoE — but with sparsity scaled up to 48 via a dedicated scaling law (384 routed experts of width 2048, 8 active per token, 1 shared expert), attention heads halved to 64 to cut long-context inference FLOPs, and expert grouping dropped. The headline novelty is MuonClip: the Muon optimizer (inherited from Moonlight) augmented with per-head QK-Clip, which rescales query/key projection weights whenever max attention logits exceed τ=100, stabilizing Muon's tendency to explode logits and yielding a spike-free 15.5T-token run (4k context, WSD schedule, 67M-token batches, annealing at 4k/32k, then YaRN to 128k). Post-training is a three-stage story: SFT on a large instruction set with a large-scale agentic tool-use synthesis pipeline (real MCP tools plus evolved synthetic tools, rubric-verified trajectories), then joint RL combining verifiable rewards with a self-critique rubric reward and per-sample budget control, PTX loss, and temperature decay, with long-horizon agentic rollout in real sandboxes. The report positions K2 as the strongest open non-thinking model, particularly on SWE and tool-use. In the atlas, K2 is the direct ancestor of moonshot-kimi-k3, whose report explicitly carries over K2's weight-clipping and data pipelines; note this record's own report is text-only and predates the K3 report by a year.

What the report claims is novel

Atlas assessment: Architecturally, K2 is a direct refinement of DeepSeek-V3 (the closest atlas peer, deepseek-v3): the same MLA attention and shared-expert MoE skeleton, with sparsity pushed to 48 (384 routed + 1 shared expert vs 256 + 1), attention heads halved 128→64, expert grouping removed, and one unexplained dense layer among 61. The genuinely novel contributions sit at the optimizer and data/RL level: QK-Clip is a distinct stability mechanism (post-update per-head weight rescaling) that the report explicitly contrasts with both logit soft-capping and QK-Norm, and the agentic data-synthesis + self-critique rubric RL pipeline is a training contribution, not a block change. The 15.5T-token zero-loss-spike claim is internally validated only by a loss curve. Within the atlas, K2 is the direct ancestor of moonshot-kimi-k3, whose report inherits the weight-clipping lineage and rephrasing pipelines.

Relation to the atlas

Lineage in

Influence out

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyKimi K2[1]
OrganisationKimi Team (Moonshot AI)[2]
Release date2025-07-28
Report URLhttps://arxiv.org/abs/2507.20534[3]
Licensenot disclosed
Open weightsyes[4]

Scale

Total parameters1.043T[5]
Active parameters / token32.6B[6]
Layers61[7]
Hidden dimension7168[8]
FFN inner dimension2048[9]
FFN ratio0.29
Query heads64[10]
KV headsn/a[11]
Head dimension112
Vocabulary sizenot disclosed
Embedding tyingnot disclosed

Core block

Block typesparse-MoE
Attention variantMLA[12]
Attention layer patternuniform — MLA in every layer; 1 of the 61 layers has a dense (non-routed) FFN per Table 2, otherwise no attention-type alternation[13]
Depth mixingsequential-residual
ActivationSwiGLU[14]
Expert count384[15]
Experts per token8[16]
Shared experts1[17]
Routingnot disclosed
Load balancingnot disclosed
Expert granularityungrouped experts at 2048 width — Table 2 lists 'Expert Grouping: No' (vs DeepSeek-V3's 'Yes'); 384 routed experts, no grouping
MethodRoPE[20]
RoPE base frequencynot disclosed
Partial RoPEyes
TypeRMSNorm[21]
Placementnot disclosed
QK-normno[22]
Attention sinksno
Softcappingno[23]

Context

Trained context length4,096[24]
Deployed context length131,072[18]
Extension methodYaRN after an annealing phase (400B tokens at 4k, then 60B tokens at 32k sequence) and a long-context activation stage[25]

Tokenizer

Algorithmnot disclosed
NotesNo tokenizer details disclosed; Appendix B documents the tool-calling token template (<|im_begin|>, <|tool_call_section_begin|>, <|tool_call_begin|>, <|tool_arguments_begin|>, <|tool_call_end|>, <|im_end|>) with TypeScript tool declarations and a constrained-decoding 'enforcer' module[26]

Training

Training tokens15.5T[27]
Data composition15.5T tokens of curated high-quality data over four domains — Web Text, Code, Mathematics, Knowledge; most pipelines follow Kimi K1.5; Knowledge rephrased with WRAP-inspired style-/perspective-diverse prompting, chunk-wise autoregressive rewriting and fidelity verification; Mathematics rewritten into SwallowMath-style learning notes and translated into English; each corpus rephrased at most twice[28]
Curriculum / stagingannealing phase (400B tokens at 4k sequence, then 60B tokens at 32k) followed by a long-context activation stage; YaRN extension to 128k; batch size held constant throughout[25]
OptimizerMuonClip: Muon with weight decay, consistent update RMS scaling, and per-head QK-Clip (τ = 100)[29]
LR scheduleWSD: 500-step warm-up then constant 2e-4 for the first 10T tokens, cosine decay 2e-4 → 2e-5 over the remaining 5.5T; annealing decays 2e-5 → 7e-6[25]
Batch scheduleglobal batch size held at 67M tokens throughout pre-training and annealing[25]
Precisionparameters stored in BF16 with FP32 gradient-accumulation buffer; FP8-E4M3 used only for storing insensitive activations (1×128 tiles, FP32 scales), never in computation[30]
Parallelism16-way Pipeline Parallelism with virtual stages (interleaved 1F1B; weight-gradient computation decoupled from backward and overlapped with PP communication), 16-way Expert Parallelism, ZeRO-1 Data Parallelism; EP all-to-all overlapped with computation; trainable on any node count multiple of 32[31]
HardwareNVIDIA H800 cluster: 8 GPUs per node with NVLink/NVSwitch and 2 TB RAM per node, 8×400 Gbps RoCE inter-node interconnect[32]
Disclosed computenot disclosed

Post-training

SFTyes[33]
Preference optimisationother[34]
Reasoning trainingjoint RL stage combining verifiable rewards (math/STEM/logic, complex instruction following, faithfulness via a sentence-level judge, coding/SWE, safety) with self-critique rubric reward; per-sample token budget control, PTX loss, temperature decay; long-horizon agentic rollout in real and synthetic environments with partial rollouts[35]
Distillationnone disclosed

Modality

Typetext-only
Attachmentn/a[36]

Inference efficiency

KV-cache designMLA low-rank latent KV cache (keys/values reconstructed from a compressed per-token latent, DeepSeek-V3-style); attention heads deliberately cut from 128 to 64 to reduce long-context inference overhead (83% inference-FLOP increase estimated for 128 heads at 128k)
Quantisation shippednone disclosed
Speculative decodingnone disclosed
Serving optimisationsnone disclosed

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
Tau2-Bench (Pass@1)66.1Abstract
ACEBench (En) (Acc.)76.5Abstract, Table 3
SWE-bench Verified — Agentic Single Attempt (Pass@1)65.8Abstract, Table 3
SWE-bench Multilingual (Pass@1)47.3Abstract, Table 3
LiveCodeBench v6 (Pass@1)53.7Abstract, Table 3
AIME 2025 (Avg@64)49.5Abstract, Table 3
GPQA-Diamond (Avg@8)75.1Abstract, Table 3
OJBench (Pass@1)27.1Abstract, Table 3
SWE-bench Verified — Agentic Multi-Attempt (Pass@1)71.6Table 3
SWE-bench Verified — Agentless Single Patch (Pass@1)51.8Table 3
MultiPL-E (Pass@1)85.7Table 3
Multi-SWE-bench (Pass@1)18.3Table 3
SWE-Lancer (Pass@1)39.1Table 3
PaperBench Code-Dev (Acc.)27.8Table 3
Terminal Bench Terminus (Acc.)25.0Table 3
Terminal Bench In-House (Acc.)30.0Table 3, Appendix C
Aider-Polyglot (Acc.)60.0Table 3
Tau2 retail (Avg@4)70.6Table 3
AIME 2024 (Avg@64)69.6Table 3
MATH-500 (Acc.)97.4Table 3
HMMT 2025 (Avg@32)38.8Table 3
ZebraLogic (Acc.)89.0Table 3
AutoLogi (Acc.)89.5Table 3
SuperGPQA (Acc.)57.2Table 3
MMLU (EM)89.5Table 3
MMLU-Redux (EM)92.7Table 3
MMLU-Pro (EM)81.1Table 3
IFEval (Prompt Strict)89.8Table 3
Multi-Challenge (Acc.)54.1Table 3
SimpleQA (Correct)31.0Table 3
LiveBench (Pass@1)76.4Table 3
Arena Hard v2.0 Hard Prompt (Win rate)54.5Table 3
Arena Hard v2.0 Creative Writing (Win rate)85.0Table 3
FACTS Grounding (Adjusted)88.5Table 3
HHEM v2.1 (1-Hallu.)98.9Table 3
FaithJudge (1-Hallu.)92.6Table 3
DROP (Acc.)93.5Table 3
MRCR (Acc.)55.0Table 3
FRAMES (Acc.)77.1Table 3
LongBench v2 (Acc.)49.1Table 3
MMLU (Base, 5-shot)87.79Table 4
EvalPlus (Base)80.33Table 4

Provenance references

  1. stated · Title
  2. stated · Title byline; fn 1 (github.com/MoonshotAI/checkpoint-engine); Appendix C ('Moonshot's in-house agentic framework')
  3. stated · pipeline
  4. stated · Abstract: 'We release our base and post-trained model checkpoints'; fn 1 (huggingface.co/moonshotai/Kimi-K2-Instruct)
  5. stated · Table 4 (# Total Params 1043B)
  6. stated · Table 2 (Activated Parameters 32.6B)
  7. stated · Table 2 (#Layers 61)
  8. stated · §2.3 (model hidden dimension of 7168)
  9. stated · §2.3 (MoE expert hidden dimension of 2048)
  10. stated · §2.3, Table 2 (Attention Heads 64)
  11. n/a · §2.3 (MLA: keys/values not materialized per head; low-rank latent KV compression)
  12. stated · §2.3 ('employing Multi-head Latent Attention (MLA) as the attention mechanism')
  13. stated · §2.3, Table 2 (Number of Dense Layers 1)
  14. stated · §2.4.3 (recomputation of 'SwiGLU'; FP8 storage for 'inputs of MoE up-projections and SwiGLU')
  15. stated · §2.3, Table 2 (Experts total 384)
  16. stated · §2.3, Table 2 (Experts Active per Token 8)
  17. stated · Table 2 (Shared Experts 1)
  18. stated · §2.5 ('To extend the context window to 128k, we employed the YaRN method')
  19. stated · §2.5 (context window extended to 128k)
  20. stated · §2.1 (MLA decomposed into compressed qC/kC and rotary qR/kR components); §2.5 (YaRN extension applied to the rotary encoding)
  21. stated · Appendix E ('RMS-Norm keeps ‖xi‖‖xj‖ bounded'); §2.4.3 names 'LayerNorm' for recomputation, presumably the same norm
  22. stated · §2.1 (QK-Norm 'is not applicable to MLA'; Kimi K2 instead applies QK-Clip weight clipping)
  23. stated · §2.1 (logit soft-cap described as an insufficient mitigation — 'the dot products between queries and keys can still grow excessively before capping is applied'; K2 uses QK-Clip instead)
  24. stated · §2.5 ('We pre-trained the model with a 4,096-token context window')
  25. stated · §2.5
  26. stated · Appendix B
  27. stated · Abstract, §2 ('pre-trained on 15.5 trillion tokens')
  28. stated · §2.2
  29. stated · §2.1
  30. stated · §2.4.2, §2.4.3
  31. stated · §2.4.2
  32. stated · §2.4.1
  33. stated · §3.1 (large-scale instruction-tuning dataset; agentic tool-use data synthesis pipeline with 3,000+ real MCP tools and 20,000+ synthetic tools)
  34. stated · §3.2.3 (Kimi K1.5 policy-optimization objective with mean-reward baseline and KL regularization; RLVR for verifiable tasks plus Self-Critique Rubric Reward for subjective tasks; no RLHF/PPO/DPO/GRPO named)
  35. stated · §3.2, §3.3.4
  36. n/a · modality.type (text-only)