LLM Architectures Explained

LLM Architectures Explained

How language-model architectures differ, model by model.

An interactive guide built from the recorded design choices of 160 models, every value traced to its source, with a tested cost model.

KV cache per token at a 32K context, 142 models

KV cache per token at a 32K context for 142 models, by release month: multi-head attention models at the top, grouped-query attention in the middle, and MLA, sliding-window and linear or hybrid models lower, mostly since 2024.1 KiB16 KiB256 KiB4.0 MiB201820222026Antares 1B: 80 KiB per token (GQA)BERT-Large: 96 KiB per token (MHA)BLOOM: 3.8 MiB per token (MHA)BTL-3: 66 KiB per token (linear or hybrid)Chinchilla 70B: 2.5 MiB per token (MHA)Command A+: 44 KiB per token (sliding window)DeepSeekMoE 16B: 224 KiB per token (MHA)DeepSeek-R1: 69 KiB per token (MLA)DeepSeek-V2: 68 KiB per token (MLA)DeepSeek-V3: 69 KiB per token (MLA)DeepSeek-V3.2: 84 KiB per token (MLA)DeepSeek-V4-Flash: 7 KiB per token (MLA)DeepSeek-V4-Pro: 10 KiB per token (MLA)DeepSeek-V4.1-Flash: 3 KiB per token (MLA)Ember-1: 34 KiB per token (linear or hybrid)Falcon-40B: 120 KiB per token (GQA)Falcon-7B: 8 KiB per token (MQA)Gemma 2 27B: 207 KiB per token (sliding window)Gemma 3 270M: 3 KiB per token (sliding window)Gemma 3 27B: 93 KiB per token (sliding window)Gemma 4 12B: 18 KiB per token (sliding window)Gemma 4 26B-A4B: 16 KiB per token (sliding window)Gemma 4 31B: 65 KiB per token (sliding window)Gemma 4 E2B: 6 KiB per token (sliding window)Gemma 4 E4B: 17 KiB per token (sliding window)GLaM (64B/64E): 4.0 MiB per token (MHA)GLM-4.5: 368 KiB per token (GQA)GLM-4.5-Air: 184 KiB per token (GQA)GLM-4.7: 368 KiB per token (GQA)GLM-5: 107 KiB per token (MLA)GLM-5.1: 107 KiB per token (MLA)GLM-5.2: 93 KiB per token (MLA)GLM-5.3-Flash: 16 KiB per token (linear or hybrid)GPT-2 XL: 300 KiB per token (MHA)GPT-3 175B: 4.5 MiB per token (MHA)GPT-J 6B: 448 KiB per token (MHA)GPT-NeoX-20B: 1.0 MiB per token (MHA)gpt-oss-120b: 36 KiB per token (sliding window)gpt-oss-20b: 24 KiB per token (sliding window)Granite 4.1 30B: 256 KiB per token (GQA)Grok-1: 256 KiB per token (GQA)Grok 2.5: 256 KiB per token (GQA)Hy3 preview: 320 KiB per token (GQA)Hy4 preview: 93 KiB per token (MLA)Inkling: 51 KiB per token (sliding window)INTELLECT-3: 184 KiB per token (GQA)Jamba v0.1: 16 KiB per token (linear or hybrid)Kimi K2: 69 KiB per token (MLA)Kimi K2.5: 69 KiB per token (MLA)Kimi K2.6: 69 KiB per token (MLA)Kimi K2.7 Code: 69 KiB per token (MLA)Kimi K3: 34 KiB per token (linear or hybrid)Kimi Linear 48B-A3B: 9 KiB per token (linear or hybrid)Kolibri-1: 21 KiB per token (sliding window)Laguna S 2.1: 50 KiB per token (sliding window)Laguna XS 2.1: 42 KiB per token (sliding window)Laguna XS.2: 42 KiB per token (sliding window)LFM2.5 1.2B: 12 KiB per token (linear or hybrid)LFM2.5 350M: 12 KiB per token (linear or hybrid)LFM2.5 8B-A1B: 12 KiB per token (linear or hybrid)Ling 2.5 1T: 16 KiB per token (linear or hybrid)Ling 2.6 1T: 16 KiB per token (linear or hybrid)Ling 3.0 Flash: 9 KiB per token (linear or hybrid)Llama 2 70B: 320 KiB per token (GQA)Llama 3 8B: 128 KiB per token (GQA)Llama 3.1 405B: 504 KiB per token (GQA)Llama 3.2 1B: 32 KiB per token (GQA)Llama 3.2 3B: 112 KiB per token (GQA)Llama 4 Maverick: 84 KiB per token (sliding window)LLaMA 65B: 2.5 MiB per token (MHA)LongCat-Flash-Lite: 32 KiB per token (MLA)Mamba 2.8B: 380 B per token (linear or hybrid)Mamba-2 2.7B: 3 KiB per token (linear or hybrid)Mellum2 12B-A2.5B Thinking: 15 KiB per token (sliding window)MiMo-V2-Flash: 23 KiB per token (sliding window)MiMo-V2.5: 23 KiB per token (sliding window)MiMo-V2.5-Pro: 51 KiB per token (sliding window)MiMo-V2.6-Flash-RL: 23 KiB per token (sliding window)MiMo-V2.6-Pro-RL: 51 KiB per token (sliding window)MiniMax-M2: 248 KiB per token (GQA)MiniMax-M2.5: 248 KiB per token (GQA)MiniMax-M2.7: 248 KiB per token (GQA)MiniMax-M3: 134 KiB per token (GQA)MiniMax-Text-01: 44 KiB per token (linear or hybrid)Mistral 7B: 16 KiB per token (sliding window)Mistral Large 3: 69 KiB per token (MLA)Mistral Small 3.1: 160 KiB per token (GQA)Mistral Small 4: 23 KiB per token (MLA)Mixtral 8x22B: 224 KiB per token (GQA)Mixtral 8x7B: 128 KiB per token (GQA)Motif 3 Beta: 15 KiB per token (MLA)Muse Glimmer 30B: 15 KiB per token (sliding window)Naive-N0.5-Flash: 23 KiB per token (sliding window)Nanbeige4.1 3B: 64 KiB per token (GQA)Nanbeige4.2 3B: 88 KiB per token (GQA)Nemotron 3 Nano 30B-A3B: 7 KiB per token (linear or hybrid)Nemotron 3 Nano 4B: 17 KiB per token (linear or hybrid)Nemotron 3 Super: 11 KiB per token (linear or hybrid)Nemotron 3 Ultra: 18 KiB per token (linear or hybrid)Nemotron 3.5 Lightning: 7 KiB per token (linear or hybrid)North Mini Code 1.0: 35 KiB per token (sliding window)OLMo 2 7B: 512 KiB per token (MHA)Olmo 3 32B: 88 KiB per token (sliding window)Olmo 3 7B: 176 KiB per token (sliding window)OLMoE-1B-7B: 128 KiB per token (MHA)OPT-66B: 2.3 MiB per token (MHA)Ornith 1.5 35B-A3B: 21 KiB per token (linear or hybrid)Ouro 2.6B Thinking: 384 KiB per token (MHA)PaLM 540B: 118 KiB per token (MQA)Phi-3-mini: 384 KiB per token (MHA)Phi-4: 200 KiB per token (GQA)Qwen1.5-MoE-A2.7B: 192 KiB per token (MHA)Qwen2.5 72B: 320 KiB per token (GQA)Qwen3 0.6B: 112 KiB per token (GQA)Qwen3 235B-A22B: 188 KiB per token (GQA)Qwen3 30B-A3B: 96 KiB per token (GQA)Qwen3 32B: 256 KiB per token (GQA)Qwen3 4B: 144 KiB per token (GQA)Qwen3 8B: 144 KiB per token (GQA)Qwen3-Coder 30B-A3B: 96 KiB per token (GQA)Qwen3-Next 80B-A3B: 25 KiB per token (linear or hybrid)Qwen3.5 397B-A17B: 33 KiB per token (linear or hybrid)Qwen3.6 27B: 66 KiB per token (linear or hybrid)Qwen3.6 35B-A3B: 21 KiB per token (linear or hybrid)Qwen3.8 27B: 66 KiB per token (linear or hybrid)Qwen3.8-Flash-Next: 26 KiB per token (linear or hybrid)RWKV-4 14B: 63 KiB per token (linear or hybrid)RWKV-6 Finch 14B: 1007 B per token (linear or hybrid)Sarvam 105B: 36 KiB per token (MLA)Sarvam 30B: 19 KiB per token (GQA)SmolLM3 3B: 72 KiB per token (GQA)Solar Open 2: 50 KiB per token (linear or hybrid)Soofi S: 7 KiB per token (linear or hybrid)Step 3.5 Flash: 50 KiB per token (sliding window)Switch-C: 240 KiB per token (MHA)T5 11B: 3.0 MiB per token (MHA)Tiny Aya: 25 KiB per token (sliding window)Transformer (base): 24 KiB per token (MHA)Trinity Large: 83 KiB per token (sliding window)VibeThinker-3B: 36 KiB per token (GQA)xLSTM 7B: 2 KiB per token (linear or hybrid)ZAYA1-8B: 40 KiB per token (GQA)DeepSeek-V3 (MLA)GPT-2 XLMHAGQAMQAsliding windowMLAlinear or hybrid
Each dot is a model, placed by its release month and what one token of its context costs to cache in BF16, computed from its recorded configuration by the site’s cost model. Grouped-query attention cut it several-fold; MLA, sliding windows and linear-attention hybrids cut it again. Why, chapter 1

Original result. A causal encoder-decoder, whose prompt tokens touch about half the parameters, serves 1.52× to 2.18×the load of the same-sized decoder-only model at the same SLOs, in this site’s run of a disaggregated-serving simulator’s capacity search (four prompt-to-output mixes, six 4×H100 instances). Chapter 9 reruns the search in your browser.

How this is checkedEvery value links to its source, and the modelled parameter count of 80 of the 86 open models whose published weights can be counted is within 0.5% of those weights at a pinned commit. How it is tested →

What you'll learn

Every large language model is a stack of the same few parts, chosen differently: how attention shares its keys and values, how positions are encoded, where the norms sit, whether the feed-forward block is one network or many experts, how deep and how wide. This site records those choices for 160 models, each value traced to the model’s own configuration, paper or announcement, and computes what they cost.

New to the Inference track? Start here: the four sites in reading order, what you need first, and a glossary of the terms they define.

Part of a family of sixteen companion sites in four tracks, all in the site menu above: Foundations (Decoder, Training), Hardware (Kernels, Systolic, Accelerators, Racks), Inference (Serving, Architectures, Numerics, Trade-offs) and Agents (Harnesses, Protocols, Context, Orchestration, Evals, Security). This one is about how the models differ. How this site was built, and how to check its data: about.