Primer llms ai

How Kimi is built

Moonshot AI's Kimi models are the open-weight frontier's second blueprint. Where the design is not DeepSeek's, it is a deliberate push past it: an attention mechanism that compresses its memory about twenty-eight-fold at Kimi's own dimensions, hundreds of tiny experts of which each token wakes a handful, an optimizer that had to be clipped to survive training, and in the 2026 flagship, whole layers that keep no growing memory at all. The numbers in the launch posts are mostly real. The two places to push back are the optimizer, where controlled studies contradict the lab's claim, and the scoreboard, where the independent index quietly re-scored the model under a new ruler.

Ink illustration of a tall tower in cross-section: floors of small expert doors, a few open and lit, with ribbons from the top windows braiding into a single scroll
A tower of layers. Most floors are walls of tiny doors, the experts, and only a few stand open for any given token. At the top, the memory of everything read so far, many ribbons of keys and values, is braided into a single compressed scroll. That braid is the whole design philosophy: spend memory and compute only where the token in front of you needs them.
The one sentence to keep

Kimi is a memory-budget argument: compress the attention cache (MLA), buy parameters you mostly leave asleep (fine-grained MoE), and in K3 remove the cache entirely from most layers (KDA); everything else is engineering in service of those three decisions.

Researched October 2026. Architecture figures are from Moonshot's technical reports and model cards; where a number is a lab claim rather than an independent measurement, the page says so.

How it works

Four mechanisms carry the design. The first one gets its arithmetic worked in full, because the cache is where long-context models live or die.

Figure 1: the memory trick, in arithmetic

Attention remembers every token it has read by storing two vectors per token, a key and a value, in every layer: the KV cache (the KV cache primer works that machine in full). The cache grows with the conversation and caps how many users a GPU can serve. Cost three designs at K2's published shape: 64 attention heads, 128 numbers per head, 61 layers, 2 bytes per number.

Tap the arrows to step through

Figure 2: K2 to K3, what actually changed

Two generations, eighteen months apart: K2 (July 2025) and K3 (July 2026). Same blueprint, three big swaps, and one candid footnote from Moonshot itself.

Tap the arrows to step through

Figure 3: the cache explorer

Figure 1 priced one token. Multiply by a whole conversation: pick a context length and see what each design has to hold in GPU memory for a single user at that length, at the published K2 and K3 shapes. The KDA layers in the hybrid contribute a fixed state, counted here as no growth.

The road here

Landmarks only: where each load-bearing idea entered the design.

Tap the arrows to step through

Key voices

The architects, the optimizer's inventor's school, the skeptics, and the scorekeepers.

The Kimi K2 team
K2 technical report, arXiv, July 2025

The design paper: 1 trillion parameters, 32 billion active, 384 experts, MLA inherited from DeepSeek, and MuonClip presented as the reason a 15.5-trillion-token run finished without a loss spike. Also the source of the honest training detail most launch posts skip: WSD schedule, a 67-million-token global batch, and a separate long-context activation phase.

DeepSeek
DeepSeek-V2 paper, May 2024

Origin of MLA: compress keys and values into one latent vector per token, claiming a 93.3 percent smaller KV cache and 5.76 times the generation throughput of their MHA predecessor. Kimi's architecture starts here; Moonshot's contribution is pushing the idea further, not inventing it.

The Moonlight team
Moonshot scaling study, February 2025

The Muon evidence Moonshot cites: scaling-law experiments reporting Muon at roughly twice AdamW's compute efficiency, run on their 16-billion-parameter Moonlight model. At-scale and internally consistent, but produced by the same lab that ships the claim.

The controlled-study critics
Independent spectral analyses, 2025 to 2026

The counterweight: controlled comparisons find no significant Muon advantage over well-tuned Adam variants once clipping, decay, and normalization confounds are removed, plus extra communication cost in tensor-parallel training. Their verdict is not that Muon fails, but that the published edge is the recipe around it.

Moonshot, on K3
Kimi K3 launch post, July 2026

Unusually candid for a launch: claims about 2.5 times K2's overall scaling efficiency, and states plainly that K3 still trails Claude Fable 5 and GPT-5.6 Sol overall. The specs (2.8 trillion parameters, 104 billion active, 896 experts, 1,048,576-token context) are confirmed on the model's Hugging Face card.

Artificial Analysis
Independent index, July to October 2026

At launch their Intelligence Index scored K3 at 57, the top open-weight model, behind Fable 5 at 60. Months later, a re-versioned index (v4.3.2) scores the same weights far lower. Both numbers are real; they are measured with different rulers, and the gap between them is the lesson about launch-day scoreboards.

DeepSWE
Independent coding eval, 2026

Puts K3 at 67 to 69 percent on its software-engineering benchmark, inside the frontier cluster rather than behind it. The independent picture, averaged: K3 is a genuine frontier-class open model whose exact rank depends on who is measuring and with which version of the test.

The Kimi Linear team
Kimi Linear paper, October 2025

Authors of KDA, the gated delta-rule attention that fills 69 of K3's 93 layers: a fixed-size recurrent state instead of a growing cache, with claims of up to 75 percent less KV memory and up to 6 times faster decoding at a million tokens, measured against full MLA in their own experiments. Lab numbers, clearly labeled as such.

Where the field agrees

The cache is the constraint

DeepSeek, Moonshot, and the serving community all design around KV memory first. MLA exists to shrink it, KDA exists to abolish it in most layers, and the inference stacks (vLLM and friends) schedule around it. Nobody serious argues the cache is a detail.

Sparsity is the scaling path

Every frontier open model since DeepSeek-V3 is a fine-grained mixture of experts. K3's 896 experts at 16 per token is the current extreme of a consensus direction: total parameters are capacity, active parameters are cost, and the ratio between them is where the efficiency lives.

Where it splits

Split 1, Side A: Muon is a real advance

Moonshot and the Moonlight results. Twice the compute efficiency in scaling studies, and a 15.5-trillion-token production run with zero loss spikes once QK-Clip is added. The proof standard offered is: it shipped, at scale, twice (Moonlight, then K2).

Split 1, Side B: the edge is the recipe, not the optimizer

The controlled-study critics. Remove the confounds and the advantage over tuned Adam variants is not statistically significant; add tensor-parallel communication costs and it can go negative. Their standard: only a neutral at-scale A/B settles it, and none exists.

Split 2, Side A: trust the launch scoreboard

Launch materials and launch-day indexes. K3 at 57 on the Artificial Analysis index, first among open weights, with records across reasoning and coding suites. For a release decision made in July 2026, those were the numbers on the table.

Split 2, Side B: the ruler changed

The same index, re-versioned, plus DeepSWE. A later index version scores identical weights far lower, not because the model changed but because the test did. Side B's rule: never compare scores across index versions, and weight independent evals (DeepSWE's frontier-cluster placement) over launch suites.

Takeaways

So, the Kimi architecture in one paragraph: it is DeepSeek's two ideas (latent attention, fine-grained experts) executed at larger scale with one original training contribution (MuonClip, contested) and one original architectural bet (KDA hybrid layers, promising and unproven independently). If you remember the arithmetic from Figure 1, you understand why every choice was made: at a million tokens of context, memory is the product.

  • MLA is the transferable idea. Compressing the KV cache into a latent vector works at K2's shape to roughly a twenty-eight-fold reduction per token, and any lab can adopt it; DeepSeek published it, Kimi scaled it.
  • Active parameters are the price; total parameters are the capacity. K3 carries 2.8 trillion weights and wakes 104 billion per token, 3.7 percent. Judge MoE models by the second number.
  • K3's real bet is that most layers need no growing memory. 69 of 93 layers run KDA's fixed state. If quality holds at a million tokens, full attention becomes the exception in open models, not the rule.
  • MuonClip is claimed, not settled. Moonshot's at-scale stability story is real engineering; the efficiency edge over tuned Adam does not survive controlled comparison. File optimizer revolutions under verify.
  • Launch benchmarks expire. The same weights scored 57 and then far lower under a re-versioned index. Compare models only within one version of one eval, and prefer independent suites for rank.
  • Read the training section, not the launch thread. The reusable knowledge in K2's report is the recipe: WSD schedule, 67-million-token batches, a dedicated long-context activation phase, and quantization-aware training for the release weights.

Keep exploring

Sources

Every load-bearing number traces to one of these.

PaperKimi K2: Open Agentic Intelligence (technical report)
The K2 architecture and training recipe: 1T/32B, 384 experts, MLA, MuonClip, 15.5T tokens, WSD, 67M-token batches, long-context activation, and the report's benchmark table.
PaperDeepSeek-V2
The MLA paper: low-rank joint compression of keys and values, the 93.3 percent cache reduction and 5.76x throughput claims against its MHA predecessor.
PaperKimi Linear: An Expressive, Efficient Attention Architecture
KDA, the gated delta-rule linear attention behind 69 of K3's 93 layers, with the KV-reduction and decode-speed claims labeled as the team's own measurements.
PaperMoonlight: Muon scaling study (Moonshot)
The scaling-law experiments reporting Muon at roughly twice AdamW's compute efficiency, run on the 16B Moonlight model; the evidence base for the MuonClip claim and its confounds.
PaperKimi K1.5: Scaling Reinforcement Learning with LLMs
The generation before K2: Moonshot's RL-scaling report, in the timeline as the moment Kimi's recipe turned toward long-context reasoning training.
Launch postKimi K3 (Moonshot launch post)
K3's official announcement: 2.8T/104B, the hybrid KDA and Gated MLA stack, 1M context, API pricing, the 2.5x scaling-efficiency claim, and the admission of trailing Fable 5 and GPT-5.6 Sol. Confirmed reading in a browser; the page refuses scripted checks.
Model cardmoonshotai/Kimi-K3 on Hugging Face
The released weights' card: layer counts, expert counts, LatentMoE dimensions, vocab, context length, and the custom Kimi K3 license.
Model cardmoonshotai/Kimi-K2-Instruct on Hugging Face
K2's released configuration, the published shape the Figure 1 arithmetic is costed at.
PaperDeepSeek-V3 technical report
Source of the cross-model cache comparison cited in Figure 1: about 70 KB per token for MLA against 516 KB (Llama-3.1-405B, MHA) and 327 KB (Qwen2.5-72B, GQA), lab-reported.