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.

23%2022202320242025202623%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 · ↓ 12.4M · ♡ 2kOpen in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 11.3M · ♡ 534Open in visualizer Qwen/Qwen3.6-35B-A3B-FP8 architecture graphQwen/Qwen3.6-35B-A3B-FP8image-text-to-text · ↓ 8.9M · ♡ 341Open in visualizer Qwen/Qwen3.6-27B-FP8 architecture graphQwen/Qwen3.6-27B-FP8image-text-to-text · ↓ 7.8M · ♡ 340Open in visualizer Qwen/Qwen3.6-27B architecture graphQwen/Qwen3.6-27Bimage-text-to-text · ↓ 7.0M · ♡ 2kOpen in visualizer Qwen/Qwen3.5-4B architecture graphQwen/Qwen3.5-4Bimage-text-to-text · ↓ 6.7M · ♡ 785Open in visualizer Qwen/Qwen3.6-35B-A3B architecture graphQwen/Qwen3.6-35B-A3Bimage-text-to-text · ↓ 5.9M · ♡ 3kOpen in visualizer unsloth/Qwen3.6-27B-NVFP4 architecture graphunsloth/Qwen3.6-27B-NVFP4image-text-to-text · ↓ 3.4M · ♡ 265Open in visualizer datalab-to/chandra-ocr-2 architecture graphdatalab-to/chandra-ocr-2image-text-to-text · ↓ 3.2M · ♡ 466Open in visualizer Qwen/Qwen3.5-0.8B architecture graphQwen/Qwen3.5-0.8Bimage-text-to-text · ↓ 3.1M · ♡ 650Open in visualizer deepreinforce-ai/Ornith-1.0-35B architecture graphdeepreinforce-ai/Ornith-1.0-35Btext-generation · ↓ 2.8M · ♡ 467Open in visualizer Qwen/Qwen3.5-27B architecture graphQwen/Qwen3.5-27Bimage-text-to-text · ↓ 2.7M · ♡ 1kOpen in visualizer

Browse all 313 models with this in the catalog →

Related concepts

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

Browse all model graphs →