Open-Weight Kimi K3 Handles a Million-Token Context and Activates 16 of 896 Experts
Kimi K3 is an open-weight model: the weights can be downloaded, and on some independent benchmarks it outperforms the closed GPT and Anthropic models. To handle a context of one million tokens, the authors replaced the growing KV cache (the memory of previously read text) with a state matrix of fixed size. Out of 896 experts, only 16 process each token, and data compression halves the load. The takeaway: long context runs up against memory and GPU throughput.
AI-processed from Habr AI; edited by Hamidun News
Open models rarely beat closed leaders: their authors usually have fewer computing resources and less data. Kimi K3 is being called an exception. Its weights can be downloaded and deployed locally, and on some independent benchmarks it beats GPT and Anthropic's models. The headline contains three numbers: a million tokens of context (roughly the amount of text the model holds in its head at once), 896 experts inside the network, and 16 of them that work on each token. The developers scaled the model in three directions at once: longer context, more layers, more experts. Each increase threatened to break something, and it is the workarounds that are useful to engineers.
A Million Tokens Without a Bloated Cache
A standard transformer has something like a notepad, the KV cache. The attention mechanism writes already processed tokens there so it does not have to recompute the whole history at every step. The longer the text, the thicker the notepad. For a million tokens, it consumes all available memory.
The authors replaced the notepad with a state matrix S of fixed size that does not depend on text length. The model does not add a new page for every token. It rewrites the same page: it takes the previous state, partially erases the old content, and writes the new. The mechanism is called the delta rule. It has two regulators: β, the write strength (a number from 0 to 1), and α, the forgetting coefficient.
α comes with a numerical trap. It is almost always less than one, and the state is updated on every token, so over a long text α gets multiplied by itself many times. The product tends toward zero and can fall below the lower bound of the BF16 format used in training. Worse, when computing in parallel chunks, the calculation has to divide by that very product. Dividing by a number near zero produces a huge result, which overflows the upper bound of the range. The fix is targeted: α is clamped between e⁻⁵ and 1.
A second problem remains. The state update has to proceed strictly in order, while GPUs are fast when they compute thousands of operations simultaneously. The team tackled it at three levels:
- Within a chip: the FlashKDA kernel first processes all tokens within a chunk of text in parallel, then passes the state onward in parallel across attention heads. The kernel is built on CUTLASS, NVIDIA's library for fast matrix operations;
- Within a single GPU: a scheduler splits a long context into segments, computes their transitions in parallel across the GPU's blocks, and then assembles the result with mathematical exactness;
- Between GPUs: simply adding the states does not work, because a segment's effect depends on its incoming state. So each GPU computes the local increment and the transition matrix for its own chunk, the GPUs exchange results in a single all-gather operation, and the actual states are then restored with a prefix scan.
As a result, the volume of data exchanged between GPUs does not grow with text length, and computation scales linearly.
Layers and 896 Experts
The more layers there are, the longer the chain, and the higher the risk that an important signal dissolves along the way. In Kimi K3, each layer pulls from the outputs of earlier layers only what it needs. For this, every layer has a learnable pseudo-query that describes the information it is looking for. The query is compared against past outputs, their relevance is scored, and a weighted sum is taken.
Storing the outputs of all layers in full is expensive, so the layers are grouped into blocks of 12, eight blocks in total, the last one incomplete. Within a block, outputs are summed the usual way, and the pseudo-query selection operates between blocks. Memory usage drops several times over.
Mixture of Experts comes with its own difficulties. If every token had to pass through all 896 routed experts, the computation would become unmanageable. There is also the risk of "favorites": a few experts receive nearly all the tasks while the rest sit idle, and idle expensive GPUs mean direct losses of money and time.
First, tokens are compressed into a latent space half the original size. Two shared experts work with the full representation and are always active. From the 896 routed experts, 16 are selected per token, that is, one in 56. The results are projected back to the original space and added to the output of the shared experts.
Compression creates a new risk: four matrix multiplications in a row can cause values to explode and overflow at low precision. The authors added normalization before one of the multiplications and replaced the familiar SwiGLU with their own SiTU-GLU function. Both of its branches are smoothly bounded from above, so the product cannot exceed the threshold.
What This Means in Practice
The limit of long context is set by memory and GPU load. If you run models yourself, look at the kernels, the GPU communication scheme, and the balance of experts. The FlashKDA code is open alongside the weights; you can study it and try it on your own tasks.
Caveat: superiority over closed models applies only to some independent benchmarks. This analysis relies on the authors' official report, so the results should be verified on your own data and hardware before deployment.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
Key Questions Answered
What are the key details on A Million Tokens Without a Bloated Cache?
A standard transformer has something like a notepad, the KV cache. The attention mechanism writes already processed tokens there so it does not have to recompute the whole history at every step. The longer the text, the thicker the notepad. For a million tokens, it consumes all available memory. The authors replaced the notepad with a state matrix S of fixed size that does not depend on text length. The model does not add a new page for every token.
What are the key details on Layers and 896 Experts?
The more layers there are, the longer the chain, and the higher the risk that an important signal dissolves along the way. In Kimi K3, each layer pulls from the outputs of earlier layers only what it needs. For this, every layer has a learnable pseudo-query that describes the information it is looking for. The query is compared against past outputs, their relevance is scored, and a weighted sum is taken.
What This Means in Practice?
The limit of long context is set by memory and GPU load. If you run models yourself, look at the kernels, the GPU communication scheme, and the balance of experts. The FlashKDA code is open alongside the weights; you can study it and try it on your own tasks. Caveat: superiority over closed models applies only to some independent benchmarks. This analysis relies on the authors' official report, so the results should be verified on your own data and hardware before deployment.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
