8 min read
Kimi K3’s hybrid linear attention can survive frontier-scale training and deliver strong long-horizon behavior while materially reducing the cache growth that makes persistent agents expensive.
Let me explain why.
The memory required to preserve the model’s attention history is very expensive.
For a conventional Transformer, that history is the KV cache.
Make the conversation eight times longer and, all else being equal, the KV cache becomes roughly eight times larger.
For agentic systems, that is a hard constraint.
The more capable the agent, the more state you want it to keep and Kimi K3 changes that calculation.
Kimi K3 uses 69 Kimi Delta Attention layers and 24 Gated MLA full-attention layers across a 93-layer stack.
Most layers update a fixed-size recurrent state instead of appending another token to a linearly growing KV cache.

The remaining full-attention layers preserve a path for high-fidelity retrieval from the sequence.
The headline is tempting: constant-state attention at frontier scale. The accurate engineering reading is more useful:
Kimi K3 moves most of the model from per-token KV storage to a fixed recurrent state, leaving cache growth in only a minority of layers.
That distinction is what makes K3 more interesting than another benchmark score.
Hybrid linear attention existed before K3.
The net-new information is that Moonshot scaled it to a 2.8T-parameter, 104B-active model with a one-million-token context window and reported frontier-level performance across coding, agentic, reasoning, and multimodal evaluations.
Disclosure: This article discusses the possible effect of model architecture on infrastructure and memory demand. It is not investment advice.
During autoregressive decoding, a Transformer reuses the keys and values computed for previous tokens.
Recomputing them for the entire context on every output token would be wasteful, so inference engines store them in a KV cache.
For a simplified full-attention layer, cache memory scales like:
KV bytes ≈ tokens × layers × cached dimensions × bytes per value
The exact number depends on the attention architecture, precision, batching, parallelism, paging, and implementation.
The variable that matters is tokens, and it only grows.
That growth was manageable when an application sent a few thousand tokens and generated a short response.
It becomes a platform concern when an agent:
In those workloads, context length becomes a memory reservation.
That reservation shapes admission control, batching, cache eviction, prefill latency, prefix reuse, session migration, failure recovery, and how many concurrent agents a cluster can hold.
A million-token context is not useful if one active session crowds out the rest of your users.
Linear attention replaces the growing token-by-token cache with a recurrent state.
A deliberately simplified mental model:
state_t = decay_t(state_t-1) + write_t(key_t, value_t)
output_t = read(state_t, query_t)The state has a fixed shape.
Whether the model has processed a thousand tokens or a million, it keeps updating the same tensor, which makes storage for those layers sequence-independent rather than sequence-dependent.
The catch is that this is a compression system.
A fixed state has to summarize an unbounded stream, so some information survives intact, some is blended, and some is discarded.
The failure mode is easy to picture.
Ask the model for a specific variable name, checksum, migration ID, or error string from much earlier in a long session, and a compressed state may retain the gist of the discussion while losing the exact tokens.
That is why pure linear-attention models have historically struggled to replace full attention at the frontier.
Kimi Delta Attention, or KDA, extends Gated DeltaNet with more fine-grained control over memory decay.
The useful intuition is selective forgetting.
Earlier recurrent designs applied a relatively coarse decay to a head’s memory, while KDA uses channel-wise gating so different dimensions of the state can decay at different rates.
Conceptually:
state_t = D_t ⊙ state_t-1 + delta_write_tHere, D_t represents learned, per-channel decay rather than one uniform forget value for the entire state.

This is not the full KDA equation, but it captures the engineering intuition: the update policy can retain some memory channels while aggressively recycling others.
K3’s published configuration makes the state concrete:
The KDA state for one session is therefore approximately:
69 layers × 96 heads × 128 × 128 × 2 bytes = 217,055,232 bytes ≈ 0.22 GB

That state is effectively independent of sequence length.
KDA also needs convolution state and serving metadata, and real engines add allocation overhead but the dominant recurrent matrix never appends an entry per token.
Moonshot has open-sourced FlashKDA, a CUTLASS-based implementation of the KDA forward kernel.
The repository exposes the state as a tensor shaped like [batch, heads, value_dim, key_dim], which makes the constant-state property visible in code rather than only in a diagram.
Editor’s note: If you want to dive deep into Local LLMs and Agentic Stack, you can join our Agent Foundry program for hands-on, in-depth trainings.
K3 is not a pure linear model.
It interleaves two layer types in a roughly 3:1 pattern:
A pure recurrent stack asks finite-state memory to do everything, K3 instead runs most sequence processing through KDA and periodically routes information through full-attention layers.
You can think of it as a database with two storage tiers:
That analogy is imperfect, but it leads to the right operational conclusion: K3 saves substantial memory without claiming that lossy compression alone can preserve every detail.
Moonshot’s earlier Kimi Linear experiments reported that the hybrid architecture could match or outperform an all-MLA baseline while reducing KV-cache use by up to 75% and improving million-token decoding throughput.
K3 is the frontier-scale validation of that direction.
Let us make the claim testable.
The public K3 configuration specifies:
num_hidden_layers = 93
KDA layers = 69
full-attention = 24
num_heads = 96
KDA head_dim = 128
kv_lora_rank = 512
qk_rope_head_dim = 64
dtype = bfloat16For simplified MLA cache accounting, use 512 + 64 = 576 BF16 values per token per layer. This represents the compressed KV latent plus the RoPE component.
cache = layers × tokens × 576 × 2 bytescache = 24 × tokens × 576 × 2 bytes
+ 69 × 96 × 128 × 128 × 2 bytesIn decimal gigabytes, using only these two formulas:
The KDA state is roughly 0.22 GB in both cases.
Almost all of the growth on the hybrid side comes from those 24 MLA layers.
A valid systems objection is that a KV cache can be paged and shared at token-block boundaries, while recurrent state depends on the entire prefix that produced it.
Suppose an agent processes one million tokens and you want restartable checkpoints every 20,000 tokens.
That is 50 state snapshots, at roughly 0.22 GB each:
50 snapshots × 0.217 GB ≈ 10.85 GB
Add that to the active hybrid cache:
27.87 GB active state/cache + 10.85 GB snapshots ≈ 38.72 GB
That is still about 64% below the simplified 107.14 GB all-MLA comparison.

It means the recurrent-state objection changes the storage model but it does not erase the architectural saving.
The vLLM K3 implementation had to redesign hybrid prefix caching for exactly this reason.
Full-attention layers use paged KV blocks, while KDA layers need recurrent-state snapshots. vLLM decouples the physical KDA state-block size from fine-grained prefix matching so shared prompts can reuse both forms of memory.
K3 forced a major inference engine to treat recurrent-state caching as a first-class serving primitive.
Agent systems often use a coordinator that launches specialized workers.
A common synchronous pattern:
main agent
├─ spawn code-search subagent
├─ wait for result
├─ discard subagent runtime state
└─ continue main session
The subagent’s cache exists while it runs, but it does not necessarily become a permanent addition to the coordinator’s footprint.
The long-lived state is usually the coordinator session itself.
The harder case is asynchronous work:
main agent
├─ background migration agent ───────────────┐
├─ background test agent ──────────┐ │
└─ interactive main session │ │
▼ ▼
persistent concurrent stateLong-running concurrent subagents do multiply state requirements, because KDA cannot repeal concurrency.

The practical design rules are straightforward:
Hybrid attention reduces the cost of each long-running branch. It does not make unlimited branching free.
Scaling laws are observations about a model family, data regime, and training process.
They are not physical constants, change the architecture and the curve can move.
K3 combines:
The result is something more useful:
Frontier capability does not require accepting the memory slope of yesterday’s architecture.
That is progress.
Kimi K3’s most consequential contribution is evidence that hybrid linear attention can survive frontier-scale training and deliver strong long-horizon behavior while materially reducing the cache growth that makes persistent agents expensive.
You should also update your assumptions:
The next generation of agents will become practical because the systems underneath them learn to remember more efficiently.