Moonshot starts from DeepSeek-V3's design (MLA, fine-grained experts with a shared expert, 61 layers, hidden size 7,168) and replaces, one ablation at a time, the parts most labs inherit without question: AdamW, softmax attention in every layer, and the plain residual sum. Moonshot AI is a Beijing lab whose Kimi models are, by most aggregate measures, among the strongest open-weight lines of 2025 and 2026; its edge is not data scale or distribution but this willingness to change what is settled, each change justified by an ablation. Kimi K2 (July 2025) is a DeepSeek-V3 derivative trained with Muon instead of AdamW (K2 report); Kimi K3 (July 2026) puts Kimi Delta Attention in three of every four layers and replaces the residual sum with Attention Residuals (K3 report). The other half of the bet is cycle time: Kimi Linear went from paper (October 2025, arXiv 2510.26692) to flagship backbone in well under a year, fast for a change that touches every kernel in the stack.
You need: multi-head latent attention (MLA) from Attention variants, linear attention and the delta rule from Beyond attention, routing and shared experts from Mixture of experts, and Muon's orthogonalised update from Optimisers and learning-rate schedulers. This page says what Kimi chose and why, and links those owners for the mechanisms.
One square per layer, to scale in depth; layer types from each K2 config and K3 config (full_attn_layers 4, 8, ..., 92, 93; attn_res_block_size 12). Click a section below for each change.
| Layer | Standard design | Kimi's answer (first shipped) | Buys | Costs |
|---|---|---|---|---|
| Optimiser | AdamW on every parameter | MuonClip: orthogonalised momentum for 2D matrices, plus QK-Clip (Moonlight for Muon, then K2) | About 2× compute efficiency; one optimiser buffer instead of two; no loss spikes at 1T | Newton-Schulz matmuls, a distributed implementation, and exploding attention logits that QK-Clip has to contain; a threshold to choose and a per-head max-logit statistic to collect every step |
| Attention | Softmax attention in every layer, cache growing with context | Kimi Delta Attention in three of every four layers (Kimi Linear, then K3) | Roughly a quarter of the KV cache and several-fold faster long-context decode | Custom kernels, a fixed per-request state that dominates at short context, and a dependence on one layer in four for exact long-range recall |
| Feed-forward width | 256 experts, 8 active (DeepSeek-V3) | 384 then 896 experts, 8 then 16 active; K3's routed experts work in a half-width latent (K2, then K3) | Capacity at a fixed active count | Memory for every expert, all-to-all traffic and harder load balancing (hence Quantile Balancing) |
| Head count | 128 heads (DeepSeek-V3) | 64 heads (K2), 96 (K3) | Avoids the 83% rise in inference FLOPs at 128k context that 128 heads would have cost K2's configuration | Gives up the 0.5% to 1.2% lower validation loss they would have bought |
| Residual stream | Add every layer's output to one running sum | Attention Residuals: a learned softmax over earlier layers' outputs (K3) | About 1.25× effective compute and steadier magnitudes across depth | A few percent of training throughput under pipeline parallelism, plus block summaries to keep and send |
| Release precision | BF16 checkpoint, quantised afterwards by others | Natively quantised checkpoints trained with QAT: INT4 (K2 Thinking), then MXFP4 (K3) | A model that fits on about a quarter of the hardware with no post-hoc quality loss | QAT in the training pipeline and a dependence on hardware with fast 4-bit paths |
| Post-training | Human-written agentic data, rewards only where a checker exists | Manufactured tool-use trajectories; a self-critique reward where no checker exists (K2) | RL signal on unverifiable tasks | A grader the policy can learn to please |
Rivals and cross-provider comparisons are on Topic: llm-landscape; the DeepSeek-V3 design K2 starts from is on DeepSeek.
The order explains the design. Muon was proven on a 16B model (Moonlight) before it trained the 1T K2; KDA and Attention Residuals were proven on the 48B Kimi Linear before K3 combined them; 4-bit QAT went into K2 Thinking before K3 shipped its whole expert set in MXFP4. Click a release for its notes.
| Release | What it was |
|---|---|
| Kimi chat 2023 · closed | Long-context consumer assistant in China, the product the lab was first known for. Year only; size and architecture undisclosed. |
| Kimi k1.5 20 January 2025 · closed | An early RL reasoning model, reported to match o1 without Monte Carlo tree search or process reward models. Its policy objective (the squared group-baseline loss in the post-training section) and its colocated RL infrastructure carried into K2 (arXiv 2501.12599). |
| Moonlight-16B-A3B 24 February 2025 · 16B / 3B · MIT | The Muon scaling study's model, 5.7T tokens. Showed Muon at about 2× AdamW's compute efficiency once weight decay and Adam-matched update scaling were added (arXiv 2502.16982). |
| Kimi K2 11 July 2025 (weights; report 28 July) · 1.04T / 32.6B · Modified MIT | The breakout release: 384 experts, 8 active + 1 shared, MLA (the latent-cache design from DeepSeek-V2) with 64 heads, pretrained on 15.5T tokens with MuonClip and zero loss spikes; trained mostly at 4k context, then 32k, then extended to 128k with YaRN. On LMArena it ranked top open model and 5th overall (17 July 2025, report); Moonshot called it the strongest open agentic and coding model at release (K2 report). |
| Kimi Linear 48B-A3B 30 October 2025 · 48B / 3B · MIT | Introduced Kimi Delta Attention in a 3:1 hybrid with MLA, NoPE in the MLA layers, up to 75% less KV cache and up to 6× decoding throughput at 1M context. Its architecture was also the testbed for Attention Residuals. |
| Kimi K2 Thinking November 2025 (repository 4 November) · 1T / 32B · Modified MIT | Reasoning variant with native INT4 quantisation-aware training and a 256K context; interleaved thinking and tool calls over 200 to 300 steps. Its card claimed state-of-the-art results on Humanity's Last Exam and BrowseComp, briefly ahead of closed flagships on those agentic evaluations (model card). |
| Kimi K2.5 29 January 2026 · 1T / 32B · Modified MIT | Natively multimodal K2 with a MoonViT vision encoder and Agent Swarm parallel execution. Still served (model card). |
| Kimi K2.6 April 2026 (repository 14 April) · Modified MIT | A rapid capability update, with the same 1.03T checkpoint size as K2.5 (Hugging Face). |
| Kimi K2.7 Code June 2026 (repository 11 June) · Modified MIT | Coding specialist at K2 scale, a 1.03T checkpoint (Hugging Face). |
| Kimi K3 16 July 2026 (weights by 27 July) · 2.8T / 104B · Kimi K3 License | The current architecture: Stable LatentMoE (896 experts, 16 active, 2 shared), KDA in 69 of 93 layers with Gated MLA in the other 24, Attention Residuals, 1M context, native vision, a native MXFP4 checkpoint, Per-Head Muon. "The world's first open 3T-class model" (model card). |
| Kimi K3.1 Pro 23 October 2026 (API; weights by 4 November) · 2.8T / 104B · Kimi K3.1 Pro License | The flagship from 23 October 2026: K3 with much more post-training compute and its 24 full-attention layers switched from Gated MLA to Gated DeepSeek Sparse Attention (KDA hybrid), 55 on Artificial Analysis's index v4.3.2 (K3 44) and 46 on the rebuilt v5, with cyber data removed from mid-training and RL before the open release; a Highspeed variant serves 2 to 3 times faster (Kimi blog, model card). |
Placed by release date and sized by total parameters (log scale); open weights filled, API-only releases as rings (undisclosed sizes on the baseline).
Muon treats each 2D weight matrix's momentum as a matrix and replaces it with an approximately orthogonal one (every singular value near 1), so the update pushes in all directions at comparable scale instead of mostly along the few largest; embeddings, the output head and 1D parameters stay on AdamW. The mechanism and its Newton-Schulz stepper on a real gradient are on Optimisers and learning-rate schedulers. Moonshot's contribution was making it work at scale: its study reports about 2× the computational efficiency of AdamW under compute-optimal training, matching AdamW-trained models with about 52% of the training FLOPs (Muon is Scalable for LLM Training, arXiv 2502.16982), with one momentum buffer against AdamW's two, real memory in a sharded trillion-parameter run. The update for a weight matrix W ∈ ℝA×B at step t, with Moonshot's two additions:
The rescaled update has root-mean-square 0.2, inside the 0.2 to 0.4 range AdamW updates typically show, which lets Muon reuse AdamW's tuned learning rate and weight decay. Weight decay was the second fix: without it, Muon converged faster at first but some weights grew too large over long, over-trained runs; with it, Muon beat both vanilla Muon and AdamW.
| Matrix (rows × columns) | Orthogonal update RMS, 1/√max | Muon scale, 0.2√max |
|---|---|---|
| K2 routed expert, 7,168 × 2,048 | 0.0118 | 16.93 |
| K3 routed expert (latent), 3,584 × 3,072 | 0.0167 | 11.97 |
| K3 KDA query projection, 7,168 × 12,288 | 0.0090 | 22.17 |
| One K3 head's block under Per-Head Muon, 7,168 × 128 | 0.0118 | 16.93 |
The same 0.2 target RMS for every shape; derived from the formula above (recompute.py).
X0 = M / ‖M‖F puts every singular value in (0, 1]; each step Xk = aX + b(XX⊤)X + c(XX⊤)2X keeps the singular vectors and maps each singular value σ to f(σ) = aσ + bσ3 + cσ5, with a, b, c = 3.4445, −4.7750, 2.0315, Keller Jordan's coefficients (Muon). They are tuned to pull small singular values up fast rather than converge exactly: the design target is a band of 0.7 to 1.3, which Jordan reports does not hurt the loss.
Worked example, singular values 3 and 0.3 (a 10 to 1 spread): ‖M‖F = √(9 + 0.09) = 3.015, so X0 has 0.9950 and 0.0995; f(0.9950) = 3.4445(0.9950) − 4.7750(0.9852) + 2.0315(0.9754) = 0.7047 and f(0.0995) = 0.3381, a spread of 2.08 to 1. Steps 2 to 5 give (1.1093, 0.9889), (0.7153, 0.7097), (1.0967, 1.1034), (0.7020, 0.7087): after 5 steps the spread is 0.991 to 1, and the pair keeps oscillating inside the band rather than settling at 1 (recompute.py). Both directions get the same step, where the raw momentum would have spent ten times more on the first.
Cost. A handful of matrix multiplies per weight per step; Jordan estimates the FLOP overhead below 1% for typical language-model training (0.5% for a Llama-405B-scale run). The awkward part is distributed: orthogonalisation needs the whole matrix while the training job holds it sharded, which is why Moonshot published a distributed implementation built on ZeRO-1 sharding (arXiv 2502.16982). K3's report replaces the all-gather of the whole parameter buffer with peer-to-peer fetches of only the shards each rank owns, cutting memory and communication (K3 report, §5.2.2).
In a 53B-total, 9B-active test model trained with plain Muon, the largest attention logits passed 1,000 within a few thousand steps; logits that large saturate the softmax and are followed by loss spikes and occasional divergence, and Moonshot saw this more often with Muon than with AdamW (K2 report, §2.1). The usual fixes (owned by Normalisation, residuals and stability) do not fit K2: a logit soft-cap clips the logits, but the query-key products can still grow without bound before the cap applies; QK-Norm cannot be used with MLA, because MLA never materialises full per-head keys at inference, they are absorbed into the latent projection (Attention variants derives the absorption). QK-Clip acts on the weights instead, after the optimiser step, using the max logit the forward pass already computed. For each head h:
Predict, then watch: h3 reports 150 against τ = 100 and h5 reports 230. What happens to h2 at 88 under the per-head rule, and under a naive rule that clips the whole layer by its worst head? Steps 5 and 6 answer it. The eight maxima are illustrative; τ and the rule are K2's.
A logit is linear in both Wq and Wk, so the scaled weights multiply every logit of that head by γhαγh1−α = γh, bringing the max logit back to exactly τ. That step's forward and backward passes are unchanged.
What it removed. K2's 15.5T-token pretraining run of a model of 1.04T parameters showed no loss spikes at all (K2 report, Fig. 3), which at that scale means no weeks lost restarting from checkpoints. QK-Clip was only transiently active: in the first 70,000 steps 12.7% of attention heads triggered it at least once and were clamped to 100; after that every head's max logit stayed below 100 on its own and the clip never fired again, so the finished model is not shaped by it (Appendix D). The same appendix's small-scale ablations, including an aggressive τ = 30, showed no statistically significant loss penalty.
K3 keeps it, per head. K3 trains with Per-Head Muon "together with the weight-clipping mechanism introduced in Kimi K2", weight decay 0.1 and a cosine schedule (K3 report, §3.3). Per-Head Muon splits the Q, K and V projections' momentum matrices along the head dimension and orthogonalises each head's block separately, because full-matrix orthogonalisation lets heads with larger gradient scales dominate the shared update direction while small-scale heads are under-normalised; per head, every head gets an equal-scale update, and Newton-Schulz on tall per-head blocks is slightly cheaper (§2.5).
Adoption since: DeepSeek V4 trains most weight matrices with Muon (DeepSeek), Zhipu's GLM line also uses Muon-family optimisers (Zhipu: GLM), and K2 itself is fine-tuned with Muon, which Moonshot recommends for a Muon-pretrained checkpoint.
Full softmax attention keeps every past key and value, so its cache grows with context and every decoded token reads all of it. A linear-attention layer instead keeps a fixed-size state matrix per head, at the price of capacity: writes superimpose and precise recall far back degrades. The recurrence, the delta rule and Gated DeltaNet (GDN), the design KDA extends, are owned by Beyond attention, whose "one state, five write rules" animation shows each write rule on the same words.
KDA, from the Kimi Linear paper (arXiv 2510.26692), is a gated delta-rule linear attention: each write first subtracts what the state retrieves for that key (so a new association overwrites the old one instead of piling on top), and learned decay makes old content fade. Kimi's contribution is the gate's granularity. GDN, like Mamba-2, has one forget rate per head per token, a scalar; KDA gives every key channel its own forget rate, a diagonal matrix, so a layer can keep one feature for thousands of tokens while flushing another at once.
Predict, then try: a fact sits under key channel 1 and scratch under channel 2; ten tokens then write elsewhere. With one scalar gate, can you keep the fact and lose the scratch? Per-channel gates of 0.99 and 0.5 keep 0.904 of the fact and 0.001 of the scratch; switch to GDN's scalar gate and it must pick one rate for both. The other preset, Overwrite, writes v1 = (1, 2) then v2 = (3, −1) under k = (1, 0): plain linear attention reads back the blend (4, 1), the delta rule the new value (3, −1).
The same thing as an equation, in Beyond attention's layout (the paper stores the transpose):
Read right to left inside the first term: decay each key channel by its own rate, then erase what is stored under kt; the second term writes vt there.
The transition is a diagonal-plus-low-rank (DPLR) matrix of a constrained form, and that constraint is what lets Moonshot's chunkwise-parallel kernel run on tensor cores with substantially less computation than a general DPLR kernel. Kimi Linear also adds a low-rank sigmoid output gate and a short convolution (kernel 4) on the queries, keys and values, both of which its ablations keep: without the gate validation perplexity rose from 5.65 to 5.67, with a swish gate instead to 5.81, without the convolution to 5.70.
The stage follows a single token through one K3 attention layer: through KDA, where the state stays one fixed block per head, then through a full-attention (MLA) layer, where the cache gains an entry per token and every query reads all of them; the last step stacks K3's 93 layers. Its state values are illustrative, its layout real; the sizes are K3's, from the K3 config. The MLA explainer on Attention variants follows the full-attention side in more detail.
Predict, then watch: one KDA layer's state is 96 × 128 × 128 numbers; one MLA entry is 576. At about how many tokens does an MLA layer's cache pass the KDA state? In step 7 the two cross near 2,700 tokens.
Kimi Linear ablated the ratio on the same 1.4T-token recipe: 3:1 had the lowest validation perplexity (5.65); 7:1 matched its training loss but generalised worse (5.70); 1:1 was about as good (5.66) at a higher inference cost; pure full attention was worst (5.77), and 15:1 worse still (5.82). The full layers keep an exact, lossless recall path for retrieval and copying; the KDA layers carry most of the depth at constant memory.
No positions in the full layers. The MLA layers use no positional encoding at all (NoPE): KDA's decay is itself position-aware, so position and recency are handed entirely to the KDA layers. With nothing rotated, MLA needs no decoupled RoPE key, so these layers run as plain multi-query attention at inference (why: Attention variants), and the RoPE adjustments that long-context training otherwise needs (frequency-base tuning, YaRN: Positional encodings) disappear; K3 extrapolates to 1M tokens "without any positional-encoding modification" (K3 report, §3.4).
The payoff, against a full-MLA baseline trained the same way on 1.4T tokens: up to 75% less KV cache, up to 6 times the decoding throughput at 1M-token context (time per output token 1.84 ms against 11.48 ms, 6.3×), and equal or better quality on short-context, long-context and RL-style evaluations. It costs custom chunked-parallel kernels (needed to use tensor cores at all), and any capability that depends on exact long-range recall now leans on the one-in-four full layers.
Kimi Linear Table 1 (arXiv 2510.26692). Horizontal axis: share of layers that keep a growing cache, 1/(r + 1) for an r:1 ratio. K3's 24 of 93 is marked for reference; it was not part of the ablation.
Only full-attention layers grow a cache, so with r KDA layers per full layer the cache is 1/(r + 1) of an all-full stack of the same shape: 1/4 at 3:1, a 75% cut. In K3, 24/93 = 25.8% of the layers cache, about a 74% cut against an all-MLA 93-layer stack, plus a fixed KDA state per request that does not grow with context: 96 heads × 128 × 128 = 1,572,864 numbers per KDA layer, 108.5 million over 69 layers. That state is why the cut is "up to": at 1M tokens it is 74.0% counted in numbers, 73.8% in bytes if the state is kept in FP32, but below a few thousand tokens the hybrid holds more than an all-MLA stack would. (How to size any model's cache: Long context.)
Per sequence: a Gated MLA layer caches 576 numbers per token (the 512-number latent plus the 64-number shared key part, not rotated under NoPE); a KDA layer holds a fixed 96 × 128 × 128 state plus 3 tokens of short-convolution state for its queries, keys and values. Cache in BF16; the KDA state's precision is not stated by Moonshot, so it is a switch.
Defaults: the cut at 1,048,576 tokens is 73.8% with an FP32 state (limit 1 − 24/93 = 74.2%), matching "about a 74% cut" by construction from the config. Kimi Linear's "up to 75%" is the same arithmetic at exactly 3:1. Counts per sequence, all heads, all layers.
From the K3 report, §2.1:
K3.1 Pro swaps the global layers. Its released config keeps the 69 KDA layers and replaces the 24 Gated MLA layers with Gated DeepSeek Sparse Attention (Gated DSA): a small indexer (32 heads of dimension 128) scores every cached token and each query attends to only the top 2,048, so a global layer's attention work per token stops growing with context, though its cache still keeps an entry for every token (model card). Both halves of the hybrid are now mechanisms other labs ship: DSA and its indexer are taught on Attention variants, the linear side on Beyond attention.
Kimi Linear maps the gate logit to a log-decay with g = −eA Softplus(z), which is unbounded below; the chunkwise kernel rescales keys by the reciprocal of the cumulative decay, which can overflow, so the diagonal 16-token tiles needed a slow position-pair path. K3 uses g = gmin Sigmoid(eAz) with gmin = −5: every retention factor exceeds e−5 ≈ 0.0067, a 16-token tile's cumulative log-decay stays in (−80, 0), the reciprocal stays below e80 inside BF16's range, and every tile runs as a dense tensor-core matrix multiply. The full-rank output gate: y = Wo[Sigmoid(Wgx) ⊙ RMSNorm(õ)].
The mixture-of-experts mechanism (routers, top-k, shared experts, load balancing, and why quality tracks total parameters while decode cost tracks active parameters) is on Mixture of experts. What Kimi changed against the DeepSeek-V3 template, cell by cell (highlighted cells differ from DeepSeek-V3):
| Setting | DeepSeek-V3 | Kimi K2 | Kimi Linear 48B | Kimi K3 |
|---|---|---|---|---|
| Total / active parameters | 671B / 37B | 1.04T / 32.6B | 48B / 3B | 2.8T / 104B (card); 2.78T / 104.2B (report) |
| Layers | 61 | 61 | 27 (20 KDA + 7 MLA) | 93 (69 KDA + 24 Gated MLA) |
| Hidden size | 7,168 | 7,168 | 2,304 | 7,168 |
| Attention | MLA, RoPE + YaRN to 128k | MLA, RoPE + YaRN to 128k | KDA 3:1 MLA, NoPE | KDA 3:1 Gated MLA, NoPE, final MLA layer |
| Attention heads | 128 | 64 | 32 | 96 |
| MLA latent + shared key | 512 + 64 | 512 + 64 | 512 + 64 | 512 + 64 |
| Routed experts / active per token | 256 / 8 | 384 / 8 | 256 / 8 | 896 / 16 |
| Expert hidden size | 2,048 | 2,048 | 1,024 | 3,072, inside a 3,584-wide latent |
| Shared experts | 1 | 1 | 1 | 2 |
| Dense (non-MoE) layers | 3 | 1 | 1 | 1 |
| Expert grouping in routing | yes | no | no | no (one group in the config) |
| Activation | SwiGLU | SwiGLU | SwiGLU | SiTU-GLU |
| Residual | sum | sum | sum | Block AttnRes, 12 layers per block |
| Context | 128k | 128k | 1M | 1M |
| Released weights | FP8 | FP8 blocks | BF16 | MXFP4 experts, BF16 rest |
Sources: DeepSeek-V3's column is the K2 report Table 2; the others are read from each config (K2 config, Kimi Linear config, K3 config: first_k_dense_replace 1, num_expert_group 1; Kimi Linear's expert count and shared experts from num_experts, num_shared_experts) and the K3 report Table 1. An earlier version of this page listed K3's dense layers and grouping as "not stated", from the card alone; the report and config now state them.
The stage puts one MoE layer of each model on the same scale, from the configs: each routed expert is a slab whose area is its weights (input width by hidden width), so the shapes Moonshot chose can be compared by eye.
With hundreds of small experts the MoE page's costs sharpen: load imbalance, all-to-all traffic per token, every expert resident in memory, and each expert seeing proportionally fewer tokens.
K2's expert sparsity is 384 / 8 = 48, but its parameter ratio is 1.04T / 32.6B = 31.9, because attention, embeddings and the shared expert are always active. K3: 896 / 16 = 56 for experts, 2.8T / 104B = 26.9 for parameters (26.7 with the report's 2.78T / 104.2B). K3 is sparser than K2 by the first measure and less sparse by the second; quote which one you mean. Where the parameters live, rebuilt from each config:
Computed in the page from the released configuration files and the module shapes in K3's modeling code; checked in recompute.py.
In a conventional MoE each selected expert receives the full d-wide token, so communication and expert-weight traffic grow with the number of experts each token visits. LatentMoE separates the two widths: shared experts keep a full-width path, while routed experts work in a compact latent of width ℓ (3,584, half of 7,168) (K3 report, §2.3):
"Stable" names three fixes for failure modes that get worse at 896 experts. The routed path chains W↓, a gated expert network and W↑ into nearly four consecutive matrix multiplies, which at 2.8T scale produced exploding internal activations; an RMSNorm before the up-projection (which also improved validation loss and benchmarks) and SiTU-GLU, a SwiGLU whose gate and up branches are each soft-capped with β tanh(x/β) (β1 = 4, β2 = 25, so the output is bounded by β1β2 = 100 while it tracks SwiGLU near the origin), suppress it. And balancing nearly 103 experts exceeds the regime where DeepSeek's fixed-step bias update behaves, so K3 uses Quantile Balancing: each expert's routing bias is set directly from the quantile of router-score margins that would give it exactly its target load, q = mk/n tokens.
Predict, then try: 16 tokens choose among 4 experts with skewed router scores (illustrative). Which update reaches equal loads first? Press the Quantile Balancing step a few times: it jumps most of the way to the target from one pass and settles within a token of it after two or three, with no step size to tune. Reset and press the fixed-step update instead: it creeps, then keeps oscillating, faster or slower with γ.
The new bias takes effect only in the next step, so a batch is never routed with a bias derived from itself; at scale the quantile is read from per-expert histograms summed with one all-reduce, and the final bias is frozen at inference. DeepSeek-V3's rule instead nudges each bias by a fixed γ towards the mean load, trading slow adaptation against oscillation.
Attention Residuals (arXiv 2603.15031, March 2026) change the residual stream itself. In a standard PreNorm transformer each layer adds its output to a running sum, hl = hl−1 + fl−1(hl−1), so layer l sees the embedding plus every earlier output with weight exactly 1. Two problems follow: the sum's magnitude grows roughly linearly with depth, diluting each new layer's contribution (later layers learn ever larger outputs to be heard, which can destabilise training), and no layer can pick out one earlier layer's output once it has been summed in. Moonshot's observation is that this is the depth-wise analogue of an RNN compressing a sequence into one state, and the fix is the one attention brought to sequences. (Other attempts at the stream, such as DeepSeek's mHC, are on Normalisation, residuals and stability.)
Predict, then watch: at layer 40 of K3, how many vectors does each scheme keep per token? The plain residual keeps one running sum, Full AttnRes every earlier output, Block AttnRes at most 9. The "trained" weights in step 4 are illustrative: only their shape (a softmax over sources) is real.
The RMSNorm on the keys stops a large-magnitude layer from dominating the weights by size alone. The weights depend on the token, because the vi do, so different tokens can retrieve different depths; no token attends to another through them. The cost per layer is one d-dimensional vector of parameters. The pseudo-queries start at zero, so training begins with uniform weights: at layer 4, the four sources each get 0.25, the standard residual sum divided by 4, a scale the next RMSNorm removes, so the model starts out behaving like a standard transformer.
Block AttnRes in production. At scale every layer's output would have to be kept and, under pipeline parallelism, shipped between stages, so production groups layers into about 8 blocks, sums outputs inside a block as usual, and runs the softmax only over the block summaries and the embedding, cutting memory and communication from one vector per layer to one per block. Moonshot reports Block AttnRes matching a baseline trained with 1.25× more compute, under 4% end-to-end training overhead with pipeline parallelism, under 2% inference latency overhead, and bounded hidden-state magnitudes with gradients spread more evenly across depth. It was validated on the Kimi Linear 48B architecture over 1.4T tokens before K3 adopted it.
Moonshot ships its models natively quantised: the published checkpoint is the deployable one, trained to tolerate its own precision (formats, PTQ against QAT and the hardware: Quantization and Precision). Weight memory is bytes = Σparts Npart × bpart / 8, with N each part's parameter count and b the bits stored per weight, including its share of any per-block scale.
Worked example: K3's weights. At BF16, 2.78 × 1012 × 2 = 5.56 TB. MXFP4 stores 4-bit elements plus one 8-bit scale per block of 32, so b = 4 + 8/32 = 4.25. But only the routed experts are MXFP4: 2,722,740,830,208 of them, 98% of the parameters; attention, the latent projections, shared experts, routers, embeddings and the vision encoder stay in higher precision (K3 report, §4.1.4; config ignore list). So the weights take 2.7227 × 1012 × 4.25/8 + 57.18 × 109 × 2 = 1.561 TB, the checkpoint's published size to the byte (safetensors index): about 28% of BF16, the difference between a model a few labs can run and one a well-equipped team can serve. An earlier version of this page put every weight at 4.25 bits and got 1.49 TB.
INT4 QAT, K2 Thinking. Moonshot applied quantisation-aware training in the post-training stage, with weight-only INT4 on the MoE components, which hold nearly all the parameters (model card). The forward pass sees the 4-bit weights while training continues, so the model adapts to the coarse grid instead of being rounded onto it afterwards. It matters most for reasoning models: post-training quantisation introduces small per-step errors that compound over long chains of dependent reasoning steps, so the loss shows up far more in long chains than in short answers. Moonshot reports a lossless 2× speed-up in low-latency mode, since decode is memory-bandwidth-bound and the expert weights are a quarter of their BF16 size; all its benchmark results are reported at INT4.
MXFP4, K3. K3 ships MXFP4 expert weights with MXFP8 activations, trained in with QAT from the SFT stage onward and through RL, with rollout and training sharing the same quantisation so there is no train-inference mismatch (model card; report §4.1.4). Block-wise scaling is what makes 4 bits survivable: an outlier distorts only its own 32-value block instead of the whole tensor's resolution, and the format has native tensor-core support on Blackwell-class hardware, so it is fast rather than merely small. Shipping the flagship as an MXFP4 checkpoint is how a 2.8T model gets to be practically open-weight.
MXFP4 is 4.25 bits; FP8 with K2's 128 × 128 block scales is about 8 bits. Model: the K3/K2 switch in the parameter card above.
Defaults reproduce K3's checkpoint, 1,560,860,324,864 bytes, equal to the safetensors index total exactly (independent arithmetic on Hugging Face's per-dtype counts).
There is very little naturally occurring data for multi-step tool use, so Moonshot manufactures it (K2 report, §3.1.1), as large-scale rejection sampling in three stages (the diagram).
The kept trajectories feed supervised fine-tuning. Reinforcement learning then runs in a Gym-like framework over many tasks with verifiable rewards (tests, checkers), the RLVR recipe owned by RL for LLMs: RLHF, GRPO, RLVR, with K1.5's policy objective optimised with Muon. Three additions keep it stable across domains: a per-task token budget, with responses that exceed it truncated and penalised (RL otherwise inflates lengths everywhere, including where thinking does not pay); an auxiliary loss on hand-picked high-quality data (PTX) so RL does not erase it; and a sampling temperature that starts high for exploration and decays.
Minimising the squared term pushes each response's log-probability ratio towards its advantage divided by τ.
The self-critique rubric reward. Where no automatic checker exists (writing quality, judgement, following a complex instruction), the model, bootstrapped as a judge during supervised fine-tuning, ranks its own candidate responses by pairwise comparison against rubrics (core values, prescriptive rubrics written to block known reward hacks, and human-written rubrics for specific instructions), and the ranking becomes the reward. It buys reward coverage over the large fraction of real work that is not verifiable, and costs the honesty of the grader: a policy trained against a judge derived from itself has an obvious incentive to learn what the judge likes. Moonshot's mitigation is to keep retraining the critic on on-policy rollouts from verifiable tasks, so its judgement stays tied to outcomes that can be checked. What defeats that is any quality the verifiable tasks never exercise, such as style in creative writing, where nothing anchors the critic (Reward Hacking owns the general failure).
The thinking variants are additionally trained for interleaved reasoning, alternating reasoning and tool calls rather than thinking once and then acting, which is what agentic browsing benchmarks reward. K2 Thinking's card claims coherent behaviour across 200 to 300 consecutive tool calls, where prior models degraded after 30 to 50 (model card); test-time compute in general is on Test-time compute and reasoning.
K2 report, §3.1.1.
K3 adds nine RL experts distilled into one student (K3 report, §4): one expert per domain and reasoning effort, then a single model taught by all nine (the diagram).
Effort is trained with a per-problem budget: a trajectory longer than τ · b0(x), with b0 estimated from the cold-start model, gets reward −1, and annealing τ down yields the high and low experts. For non-verifiable tasks an agentic generative reward model reads the output, writes a rubric, scores each candidate and records the scores, with a verbosity budget under which an over-long candidate automatically loses its comparison. Rollouts pause when a fraction of trajectories finish and resume next iteration from resumable microVM sandboxes. K3 always thinks; its API takes reasoning_effort low, high or max (default max), and the full assistant message, reasoning included, must be passed back each turn (model card).
Columns are reasoning efforts. Distillation in general: Distillation and small language models.
K3 (July 2026) is the architecture: 2.8T total / 104B active, Kimi Delta Attention in 69 of its 93 layers, Attention Residuals, 1M context, native vision (a 401M MoonViT-V2 encoder trained from scratch with next-token prediction), shipped as a native MXFP4 checkpoint. Kimi K3.1 Pro (23 October 2026) is K3's MoE and KDA layers with Gated DSA in place of Gated MLA in the 24 global layers and "substantially larger" post-training compute (no figure given): 2.8T total / 104B active, 1M context, text and image in, reasoning levels low, medium and max, shipped like K3 as MXFP4 weights with MXFP8 activations from quantisation-aware training. It launched on the API (kimi-k3.1-pro, and kimi-k3.1-pro-highspeed, 2 to 3 times faster at twice the price except cache hits), and its weights followed on Hugging Face in the first days of November under the Kimi K3.1 Pro License, servable by vLLM, SGLang and TokenSpeed (Kimi blog, model card). On Artificial Analysis's index v4.3.2 it scored 55, fourth of all models and 11 points above K3; on the rebuilt v5 (27 October 2026, a new scale) it scores 46, the best open-weight model there (dated readings below). Its rank depends on the ruler, so each reading below carries its version and date and none is joined to another.
| Fact or measure (version, date) volatile | Kimi | Reference points |
|---|---|---|
| API price, per million tokens: K3.1 Pro from 23 October 2026, K3 read 1 October 2026 (Kimi blog) | K3.1 Pro: $2.00 input, $0.20 cache hit, $10.00 output, 33% below K3's $3.00 input (cache miss), $0.30 cache hit, $15.00 output | GPT-6.1 Sol the same headline price; Claude Opus 5.5 $4 / $20 |
| AA Intelligence Index v5.0.1 (new scale from 27 October 2026), read 16 November 2026 (Artificial Analysis) | K3.1 Pro 46: the best open-weight model, 19 points behind the top | Claude Fable 5.2 65, Gemini 4 Carbon 60, Claude Opus 5.5 59; next open weights DeepSeek V4.1 Flash 1017 33, GLM-5.3 32, Inkling 2 Small 31 |
| Vals Index, updated 15 November 2026 (Vals AI) | K3.1 Pro 62.52%: 12th | Claude Fable 5.2 71.31% first; Qwen4 Max 63.20% 11th |
| AA Intelligence Index v4.3.2, read 26 October 2026 (Artificial Analysis) | K3.1 Pro 55: 4th overall, $1.98 per index task | Claude Opus 5.5 58, Claude Sonnet 5.5 56, Muse Wonder Full 56; K3 44 |
| Terminal-Bench 4.0, three harnesses (read 24 to 26 October 2026) | K3.1 Pro: 67% in AA's run (the highest of any model there; K3 13%); 63.64% on Vals AI's mini-swe-agent (one bash tool, avg@3), 3rd, at $4.57 a test; 65.7% in the Claude Code harness (Moonshot's own run, vendor) | Vals: Opus 5.5 65.15% at $13.20 a test, Sonnet 5.5 64.14%; Moonshot's run: Opus 5.5 66.4%, GPT-6 Astra 58.2% |
| Still served: K2.7 Code (coding, 1.03T checkpoint), K2 Thinking (INT4 QAT) and K2.5 (multimodal), both 1T / 32B; Kimi Linear 48B / 3B is the research testbed | lineup as of 1 October 2026 | |
| Hardware that drew the starting weights, read from untouched embedding rows (checkpoint forensics, report of 12 November 2026, read 27 November 2026; our reading) | K2, K2.5 (and K2.6, same initialisation): a 132-SM layout, Hopper, consistent with the H800s Moonshot disclosed; K3 and K3.1 Pro (K3's seed): a 152-SM layout, which the report assigns to the GB200 or GB300; K2.7 Code a blend, about 80% K2.5's Hopper values and 20% a new 148-SM draw in every row, read as a merged checkpoint | DeepSeek V3 132, V4-Flash 148, V4-Pro 152; MiniMax M3 148. An inference about which hardware drew the starting weights, not where the chips were, who owned them or that the whole run used them |
| AA Intelligence Index v4.1, 23 July 2026 (K3 report, Table 5) | 57.1: 4th of 580 overall, first open weights | Claude Fable 5 59.9, GPT-5.6 Sol 58.9, GLM-5.2 51.1 |
| AA Intelligence Index v4.3, read 1 October 2026 (Artificial Analysis) | 43.6: 3rd among open weights | MiMo-V2.6-Pro 46.3, GLM-5.3 44.8; best overall Claude Opus 5.5 57.6 |
| Real-SWE, private enterprise codebases, as quoted 25 September 2026 (DEV Community, citing Specific Labs) | 18.8%: 7th of 8 | GLM 5.3 28.8%, Fable 5.1 38.8% |
| Real-SWE leaderboard, read 1 October 2026, pass@1 over 8 runs (Specific Labs) | 20.00%: 8th of 8 | GLM 5.3 37.50%, GPT-6 Astra 46.25% |
| WebDev Arena, 23 July 2026 (K3 report, Table 5) | 1,678 Elo: 1st of 99, first open model to top it | Claude Fable 5 1,634 |
| Phi-Bench, infrastructure-engineering tasks | 28.12% unconfirmed | Claude Opus 5 36.53% (no source located for this pair) |
An open release with the cyber capability taken out. For K3.1 Pro's open release Moonshot "identified and removed" cyber-related data from both mid-training and RL while keeping general coding data. On its internal xdev-bench-hard (pass@3, exploitation tasks) the checkpoint trained without the removal scores 90.5, the released K3.1 Pro 81.0 and K3 33.3 (vendor claim, not independently checked). The stated rule is not to "release open weights that would extend the absolute frontier of cyber capability": capability, not only the licence, now decides what goes into an open checkpoint.
The licence. K2's is a modified MIT licence: MIT terms plus a requirement to display "Kimi K2" in products above 100 million monthly active users or 20 million US dollars in monthly revenue (K2 licence). K3 has its own, stricter Kimi K3 License: the same display rule, and a "Model as a Service" business above 20 million US dollars of group revenue must sign a separate agreement before commercial use. The Kimi K3.1 Pro License keeps both conditions for its weights (a model-as-a-service business above 20 million dollars of revenue in any 12 months needs a separate agreement; products above 100 million monthly active users or 20 million dollars of monthly revenue must display "Kimi K3.1-Pro"), with the same exemptions (licence).
The v4.3 index rescaled every score after GPQA Diamond was dropped and Terminal-Bench moved from 2.1 to 4.0, so 57.1 and 43.6 are on different scales, not a decline (detail on Other notable providers). By lab, taking each lab's best v4.3 model, K3 left Moonshot 10th on 1 October, behind Anthropic, OpenAI, Google, Meta, SpaceXAI, Xiaomi, Alibaba, Zhipu and StepFun (43.7); K3.1 Pro lifted it to third on v4.3.2, behind only Anthropic and Meta (26 October). An earlier ranking on the reranked v4.2 had put Moonshot above Zhipu and Google, and AA no longer shows v4.2. Moonshot's own card reports 81.2 on FrontierSWE and 88.3 on Terminal-Bench 2.1, the 2.x line that Terminal-Bench 4.0 has since replaced, so the two are not comparable. The two Real-SWE readings, a week apart, disagree on both models; GLM 5.3 leads K3 in each. Which open model "leads" is now a question about the benchmark, not about the models.
Licence detail. The Model-as-a-Service condition covers a licensee offering third-party inference or fine-tuning access, for example by API, whose group revenue exceeds 20 million US dollars over any 12 consecutive months. Products that merely embed the model in their own features, and relays of requests to models hosted by others, do not count as Model as a Service; internal use, and access through Moonshot's own products or certified inference partners, are exempt from both conditions (licence).
Cognition SWE-2 (10 September 2026) is K3 post-trained with reinforcement learning into a coding agent, the clearest evidence that the weights matter: a third party productised them. It reports FrontierCode 1.1 Main at 50.0% against Claude Fable 5.1's 50.9% at a claimed 64% lower cost. The training result is more interesting than the score: every selectable reasoning-effort level was trained in a single RL run, with a linear cost penalty per effort level tuned to the slope of K3's own cost-quality frontier, and SWE-2 medium used 58% fewer turns and cost 81% less than SWE-1.7 for the same work. Its card is also a clean example of benchmark version skew, quoting Terminal-Bench 2.1 at 92.8% and Terminal-Bench 4 at 27.3% for one model, about 30 points behind Fable 5.1 (55.8%) and GPT-6 Astra (57.9%) on the newer test. No open weights or standalone API are announced: it ships in Devin Desktop and CLI, rolling out to Devin Web and Fusion (Cognition).
Reading times measured on 24 October 2026 (core reading, closed details not counted); pages being rebuilt may change.
The parent page: every lab compared on the current index, cost per task and the release timeline. (25 min, plus 5)
How reasoning models such as K2 Thinking are trained and how test-time compute is spent. (35 min, plus 8)
Linear attention, the delta rule, Gated DeltaNet and KDA, hybrids and the state against KV crossover, with the five write rules animated. (37 min read)
MLA and its absorption, the decoupled RoPE key, NoPE layers as multi-query attention, and output gates. (37 min read)
The MoE mechanism in full (routing, top-k, shared experts, load balancing, capacity), with K2 and K3 in its landscape table of total over active ratios. (35 min read)
SGD, momentum, Adam and AdamW, the baseline Muon is measured against, and Muon's Newton-Schulz stepper on a real gradient. (34 min read)
QK-norm, logit caps, loss spikes and DeepSeek's mHC, the other recent rework of the residual stream. (31 min read)
KV-cache sizing for any model, with the calculator. (28 min read)
The DeepSeek-V3 design K2 started from, MLA's origin, and V4's own use of Muon. (26 min read)
Integer and block-scaled formats, NVFP4 against MXFP4, and quantisation-aware training in general. (34 min read)
The post-training recipes K2's objective and verifiable-reward gym belong to. (53 min read)
On-policy distillation, the method K3 uses to merge its nine RL experts. (25 min, plus 8)
The general failure mode behind a self-critique reward. (33 min read)
The SVD and orthogonal matrices behind Muon's UV⊤. (45 min read)
A rival: the other linear-attention hybrid line, Gated DeltaNet in Qwen3-Next. (26 min read)
A rival: GLM, which also trains with Muon and beats K3 on Real-SWE. (32 min, plus 13)
Xiaomi's MiMo-V2.6-Pro, first among open weights on the current index, and the index rescaling. (43 min read)
MuonClip, agentic data synthesis, 1T-scale MoE training. (~1h 30m)
Kimi Delta Attention, the hybrid linear-attention design K3 productionised. (~45 min)
The depth-wise softmax residual, Block AttnRes and its scaling results. (~40 min)
The bounded KDA decay, Stable LatentMoE with SiTU-GLU and Quantile Balancing, Per-Head Muon, multi-effort RL and distillation, and the serving system. (~1h 30m)
Moonshot's weight-decay and RMS-matching fixes, the distributed implementation and the 2× efficiency result. (~40 min)
The original optimiser, the Newton-Schulz coefficients and the overhead estimate. (~25 min)
Weights, model cards and licences (docs; about 15 min for the flagship model cards). (~15 min)
The post-trained flagship: prices, the Highspeed variant, the open release and the cyber-data removal with its xdev-bench-hard numbers. (~10 min)
The independent index run: 55 on v4.3.2, 67% on its Terminal-Bench 4.0 run, and the open-against-closed gap on that version. (~6 min)
The full text: the Model-as-a-Service threshold, the display rule and the exemptions. (~5 min)
A community overview of K3 and its MXFP4 format; its active-parameter and licence lines differ from the official model card, which this page follows. (~20 min)
K3 post-trained into a coding agent; multi-effort RL with slope-matched cost penalties. (8 min)
Private enterprise codebases; the live board behind the ranking table. (~15 min)
Recurring deep coverage of Moonshot's role in open weights. (~30 min per deep-dive post)