Linear attention explained: Why new models only do full attention every fourth layer
Raon-1-mini, Qwen, Kimi Linear and Ling swap most of their attention layers for a fixed-size memory. That saves a lot of memory on long contexts. MiniMax still deliberately stuck with full attention. We explain how the delta rule works, where the memory savings really come from, what you give up, and why prompt caching on your own machine often breaks with these models.

What's going on
In late October, KRAFTON/Raon-1-mini showed up on Hugging Face. It comes from the South Korean game publisher best known for PUBG. The model has 28.8 billion parameters, 4.3 billion of which are active per token, and it's released under the Apache 2.0 license. Only 7 of its 25 layers use full attention, the mechanism a language model uses to compare every word with all the words before it. The other 18 use “Raon Delta Attention” (RDA), which gets by with a fixed-size memory. That's why the Model Card says the KV cache needs only about 8 KiB per token. The KV cache is the buffer where a model stores intermediate results for every token it has read so far.
Raon isn't a one-off. Qwen, Moonshot (Kimi Linear) and Ant Group (Ling) build similar hybrid models. MiniMax, by contrast, explicitly chose full attention for M2. We explain how the trick works, where it really saves memory, what it costs you and what it means for your own machine.
The delta rule: a notepad that corrects instead of overwriting
Standard attention stores every token individually. With 100,000 tokens, that's 100,000 entries in the KV cache, and every new token has to be compared against all of them. Linear attention instead compresses the past into a fixed matrix. In Raon, that's 128 × 128 numbers per head. Think of it as a notepad that stays the same size whether you've read 1,000 tokens or a million.
The simplest version just piles each new key-value association on top. Eventually the entries are scribbled over each other so badly that nobody can read them. The delta rule works differently. According to the Kimi Linear paper, it first checks what the memory already holds for the new key. Then it corrects only the difference from the new value. It's like fixing a phone number in your address book instead of scrawling a second one over it. The variants differ in how finely they control forgetting:
- Gated DeltaNet (Qwen) has a “forget gate”: the notepad fades at its own rate for each attention head.
- Kimi Delta Attention (KDA) gives each feature channel its own forgetting rate, according to the paper. That way, different dimensions can be retained for different lengths of time.
- Raon Delta Attention separates the erase and write gates, which are coupled in KDA, according to the Model Card. OrcaRouter says the write gate is also scaled independently after the convolution. There's no technical report yet.
Nobody owns the idea. NVIDIA researchers described the same decoupling in Gated DeltaNet-2 (NeurIPS 2026). It reduces exactly to KDA when both gates are equal. The authors measured the biggest gain on multi-key retrieval in RULER needle tests. On October 19, Sepp Hochreiter's group presented the Kronecker Delta Rule (KronLSTM). It updates the memory along a single direction only, so new entries interfere less with old ones. The abstract gives no numbers.
Who mixes what
| Model | Linear layer | Full layer | Ratio |
|---|---|---|---|
| Qwen3-Next 80B-A3B | Gated DeltaNet | Gated Attention | 36:12 (3:1) |
| Qwen3.6-35B-A3B | Gated DeltaNet | Full Attention | 30:10 (3:1) |
| Kimi Linear 48B-A3B | KDA | MLA | 3:1 |
| Raon-1-mini | RDA | Gated MLA | 18:7 (officially “3:1”) |
| Ling-3.2-air | KDA | Gated MLA | 35:7 (5:1) |
| Ling 2.5 1T | Lightning Attention | MLA | 7:1 |
| MiniMax M2 | – | full attention | – |
Sources: config files, Model Cards, Raschka's overview. MLA (Multi-Head Latent Attention) is full attention that also compresses its cache. There's a reason 3:1 caught on. A study of 72 trained models (arXiv 2507.06457) found that retrieval improves noticeably with every extra full layer, most of all at ratios below 3:1. It recommends ratios between 3:1 and 6:1.
Where the memory savings really come from
The savings only apply to the KV cache, meaning the context. The weights are just as big as in a transformer of the same size. That's why Kimi Linear is honest enough to say “up to 75% less KV cache”: three out of four layers no longer need one. Raon saves twice, because its remaining MLA layers compress on top of that. Here's our calculation with a BF16 cache:
| Model | KV per token | 128k tokens | 262k tokens | Tokens per GiB |
|---|---|---|---|---|
| Raon-1-mini | approx. 8 KiB | 1 GiB | 2 GiB | approx. 131,000 |
| Qwen3.6-35B-A3B (hybrid) | 20 KiB | 2.5 GiB | 5 GiB | approx. 52,000 |
| Qwen3-30B-A3B (pure attention) | 96 KiB | 12 GiB | 24 GiB* | approx. 10,900 |
* According to its Model Card, Qwen3-30B-A3B natively handles only 32,768 tokens, or 131,072 with YaRN. The 262k figure is purely theoretical. We calculated the Qwen values from config.json (layers × KV heads × head dimension × 2 × 2 bytes). The linear layers add a fixed-size state on top. We estimate this at a few tens of megabytes per conversation for Raon, which is negligible.
Here's how that plays out on actual GPUs. Raon GGUF sizes are IQ4_XS 16.2 GB, Q4_K_M 19.7 GB and Q6_K 25.8 GB. Qwen3-30B-A3B Q4_K_M is 18.6 GB. These are our estimates; we didn't measure them ourselves:
- 16 GB: Even as IQ4_XS, Raon barely fits entirely into VRAM. Some of the experts have to move to system RAM.
- 24 GB: Raon Q4_K_M plus 2 GiB of cache for the full context should just about fit. Qwen3-30B-A3B with a BF16 cache would get to roughly 40,000 tokens.
- 32 GB (RTX 5090): Raon runs even as Q6_K with the full context. Qwen3-30B-A3B hits the limit at 128k.
One caveat: KRAFTON's own vLLM example for the RTX 5090 uses just 32,768 tokens of context and 3 GiB of FP8 cache for eight parallel requests. The claim that 262,000 tokens fit on the card comes from our math. KRAFTON hasn't demonstrated it.
Don't confuse this with sparse attention, which MiniMax M3 and Qwen's QSA use. Sparse attention reads only selected blocks of the cache per query. That saves compute, but the full cache stays in memory. That's why MiniMax's MSA paper only claims 28.4 times less compute at 1 million tokens and says nothing about memory.
What you give up
Exact retrieval. A fixed-size notepad is lossy. In its paper on Qwen3.8-Flash-Next, Qwen writes that full attention preserves
the direct token-level retrieval that no finite-size memory can exactly replicate.
That's why any full layers remain at all. Still, the benchmarks don't clearly go against hybrids. In the Kimi Linear paper, the hybrid model beats the pure MLA variant on RULER 128k, 84.3 to 81.3 points. An older snapshot of Context Arena (MRCR, 128k) puts Qwen3-Next mid-table at 46.2%. That's ahead of some of Qwen's pure attention models, but well behind Kimi K2.5 at 81.9%. For Raon, KRAFTON only reports AA-LCR (70.7) and GDP.pdf (7.7). There are no RULER or needle tests.
Multi-step reasoning. MiniMax reports that hybrids of Lightning and full attention matched full attention on saturated benchmarks like MMLU. At larger scale, though, they showed “clear deficits in complex multi-hop reasoning”, meaning reasoning across several intermediate steps. A theoretical paper (arXiv 2602.01763) proves a gap in expressive power. A network with L+1 full layers can handle a chain of nested functions. A hybrid with L−1 full layers would need exponentially many linear layers to do the same.
Sensitivity to rounding. The state gets rewritten with every token, so rounding errors can add up. MiniMax calls this an open problem. Several papers this fall show ways around it. LeapQuant reports near-lossless 8-bit states on GDN and KDA models. The paper “Quantizing Recurrent Language Models Is Easier Than You Think” reports robust 8-bit results for Qwen 3.5, Nemotron-H and Kimi Linear. Both are specialized methods, and it's still unclear how popular local tools will handle the problem.
Other approaches exist too. In GateSight (arXiv 2610.14754), the GDN state predicts which cache entries the full layers will need later. A tenth of the cache is then enough, and the method beats KVzip by 9.5 to 47.2 points. Another paper (2611.08133) transfers the entire state from Qwen 3.5 4B and 9B to 27B. It keeps 89.9% and 94.1% of the performance, respectively.
Why MiniMax opted out
MiniMax's head of pretraining explains the decision in the blog post “Why did M2 end up as a full attention model?”. Besides the weaknesses above, he mainly points to infrastructure. Many linear architectures are held back by memory bandwidth. Prefix caching and speculative decoding are unsolved with a linear backbone. And linear attention only gets cheaper once you pass “a few thousand tokens”. An experiment with sliding-window hybrids got worse as context grew. So for M3 (June 2026), MiniMax went with sparse attention instead of linear attention.
What this means locally: prompt caching breaks
MiniMax's last point hits local users directly. Prompt caching works like this: an agent like Claude Code or qwen-code sends the same long system prompt every turn, and the server reuses the part it has already computed. You can easily cut a KV cache back to any position, but you can't do that with a fixed-size state. In llama.cpp issue #18497, developer pwilkin says: “The problem is the recurrent state, not the KV cache.” Only state saved as a snapshot (a “checkpoint”) can be reused. Otherwise the server logs “forcing full prompt re-processing” and reads everything in again.
The effects are well documented. In issue #22384, the second turn with Qwen3.6-27B on an RTX 3090 took about 11 seconds for 12,146 tokens. With the user's patch, it took just 115 ms. Georgi Gerganov rejected the patch as incorrect. A qwen-code issue reports that reprocessing “often takes over 100 seconds” in sessions above 50,000 tokens. vLLM needs the --mamba-cache-mode align mode for Gated DeltaNet models. With Qwen3.5, the block size is then 528 tokens, so shorter prompts practically never hit the cache (0% at 479 tokens, 95.4% at 552). The issue was closed unresolved in October. A guide on zenn.dev suggests what helps: increase --ctx-checkpoints, use --checkpoint-every-nb, and never set --cache-ram 0. --cache-reuse and --swa-full don't work with these models.
Raon adds another problem. So far it only runs on KRAFTON's fork of llama.cpp (branch raon-1-mini) and a vLLM fork. According to OrcaRouter, a pull request to vLLM was closed unmerged after 184 seconds.
The bottom line
Our take: hybrids are the biggest step forward in context length per gigabyte for local users. On paper, Raon fits about twelve times as many tokens into a GiB as Qwen3-30B-A3B. But that only matters for long contexts. In short chats, the design does very little. And for agents whose prompts keep changing, unreliable prompt caching can wipe out the advantage.
It's still unclear whether linear attention is ready. Qwen, Moonshot, Ant and KRAFTON say yes, but they hedge by keeping every fourth to eighth layer as full attention. MiniMax says no and saves compute with sparse attention instead. This fall's papers go straight after the known weak spots: interference in memory, rounding errors and state management. That shows the problems are real. Independent long-context tests of Raon-1-mini are still missing.
Sources
- Hugging Face: KRAFTON/Raon-1-mini huggingface.co
- Hugging Face: KRAFTON/Raon-1-mini-gguf huggingface.co
- OrcaRouter: Raon-1 mini und der 184-Sekunden-PR orcarouter.ai
- MiniMax: Why did M2 end up as a full attention model? minimax.io
- Hugging Face Blog (AtlasCloud): MiniMax Goes Sparse huggingface.co
- MiniMax: M3-Blogpost minimax.io
- arXiv: MiniMax Sparse Attention (2606.13392) arxiv.org
- arXiv: Kimi Linear (2510.26692) arxiv.org
- Sebastian Raschka: LLM Architecture Gallery – Hybrid Attention sebastianraschka.com
- arXiv: Kronecker Delta Rule (2610.26834) arxiv.org
- arXiv: GateSight (2610.14754) arxiv.org
- arXiv: Cross-Model State Handoff (2611.08133) arxiv.org
- arXiv: Gated DeltaNet-2 (2605.22791) arxiv.org
- arXiv: A Systematic Analysis of Hybrid Linear Attention (2507.06457) arxiv.org
- arXiv: Provable Expressiveness Hierarchy (2602.01763) arxiv.org
- arXiv: LeapQuant (2609.38166) arxiv.org
- arXiv: Quantizing Recurrent Language Models Is Easier Than You Think (2611.01864) arxiv.org
- arXiv: Qwen3.8-Next-Architektur (2608.30320) arxiv.org
- Context Arena (ältere Momentaufnahme) old.contextarena.ai
- GitHub: llama.cpp Issue #18497 github.com
- GitHub: llama.cpp Issue #22384 github.com
- GitHub: llama.cpp Issue #24714 github.com
- GitHub: vLLM Issue #40696 github.com
- GitHub: qwen-code Issue #5760 github.com
- zenn.dev: llama.cpp-Promptcache mit Qwen3.5 zenn.dev
- PyTorch Blog: Hybrid Models as First-Class Citizens in vLLM pytorch.org
- Hugging Face: Qwen3.6-35B-A3B config.json huggingface.co
- Hugging Face: Qwen3-30B-A3B config.json huggingface.co
- Hugging Face: Qwen3-30B-A3B-GGUF huggingface.co
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.