Attention

Linear attention (gated DeltaNet)

Replaces the attention matrix with a fixed-size recurrent state. Cost stays constant per token, no KV cache growth.

First page of Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionIntroduced inJun 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionKatharopoulos et al. · arXiv 2006.16236 ↗
Attentionthe KV cache grows with every tokenGated recurrent stateevery token rewrites one fixed SσScost per token growscost stays constant

Linear attention keeps a compact running state that is updated once per token (here with the gated delta rule: the state is selectively decayed and rewritten), so generation cost does not grow with context length and there is no per-token KV cache. Qwen3.5-style hybrids use linear attention in most layers and keep periodic full-attention layers for precise long-range recall. The best of both worlds for long contexts.

Adoption over time

Share of new models that have included linear attention over time.

26%2022202320242025202626%20222023202420252026

See it in real models

Open any of these on hfviewer to find this block in the interactive architecture graph.

Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 13.9M · ♡ 2kOpen in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 11.7M · ♡ 553Open in visualizer Qwen/Qwen3.6-35B-A3B-FP8 architecture graphQwen/Qwen3.6-35B-A3B-FP8image-text-to-text · ↓ 11.1M · ♡ 351Open in visualizer Qwen/Qwen3.6-27B-FP8 architecture graphQwen/Qwen3.6-27B-FP8image-text-to-text · ↓ 9.0M · ♡ 346Open in visualizer Qwen/Qwen3.5-4B architecture graphQwen/Qwen3.5-4Bimage-text-to-text · ↓ 7.5M · ♡ 812Open in visualizer Qwen/Qwen3.6-27B architecture graphQwen/Qwen3.6-27Bimage-text-to-text · ↓ 6.9M · ♡ 2kOpen in visualizer Qwen/Qwen3.6-35B-A3B architecture graphQwen/Qwen3.6-35B-A3Bimage-text-to-text · ↓ 5.8M · ♡ 3kOpen in visualizer unsloth/Qwen3.6-27B-NVFP4 architecture graphunsloth/Qwen3.6-27B-NVFP4image-text-to-text · ↓ 4.1M · ♡ 273Open in visualizer ornith-ai/Ornith-1.0-35B architecture graphornith-ai/Ornith-1.0-35Btext-generation · ↓ 3.0M · ♡ 493Open in visualizer deepreinforce-ai/Ornith-1.0-35B architecture graphdeepreinforce-ai/Ornith-1.0-35Btext-generation · ↓ 3.0M · ♡ 493Open in visualizer Qwen/Qwen3.5-2B architecture graphQwen/Qwen3.5-2Bimage-text-to-text · ↓ 3.0M · ♡ 359Open in visualizer Qwen/Qwen3.5-0.8B architecture graphQwen/Qwen3.5-0.8Bimage-text-to-text · ↓ 2.9M · ♡ 664Open in visualizer

Browse all 414 models with this in the catalog →

Related concepts

hfviewer renders the full architecture of 3,500+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →