Architectural evolution

Architectural techniques do not appear at random: they diffuse through the field one laboratory at a time. This page traces two curves — the evolution of attention itself, and the adoption timeline of the operators that make modern LLMs trainable and cheap to serve.

Attention: from MHA to hybrid linear

Multi-head attention (MHA) computes one key–value head per query head. Multi-query (MQA) shares a single KV head across all queries; grouped-query (GQA) generalises this to a few shared heads and became the default for dense models after Llama 2 70B. Multi-head latent attention (MLA), introduced with DeepSeek-V2, compresses keys and values into a low-rank latent vector instead. Most recently, hybrid designs interleave linear-attention layers with a minority of full-attention layers.

multi-head attention (MHA) · 10

The original formulation: one key–value head per query head. Standard from GPT-2 through most pre-2023 dense models.

GPT-2 GPT-3 175B (paper) LLaMA 1 7B DeepSeek-Coder 6.7B DeepSeek LLM 7B DeepSeekMoE 16B Qwen1.5 7B Step-3 Step-3.5-Flash Step-3.7-Flash

Q K·V Q1 KV1 Q2 KV2 Q3 KV3 Q4 KV4 4 : 4

multi-query attention (MQA) · 3

A single shared KV head serves all query heads — aggressive KV-cache savings at some quality cost; rare in frontier open models.

DeepSeek-V4-Flash DeepSeek-V4-Flash Base DeepSeek-V4-Pro

Q K·V Q1 Q2 Q3 Q4 KV 4 : 1

multi-head latent attention (MLA) · 21

Keys and values are compressed into a low-rank latent vector, shrinking the KV cache dramatically; introduced with DeepSeek-V2.

DeepSeek-V2 DeepSeek-V2 Lite DeepSeek-V3 DeepSeek-V3 Base DeepSeek-R1 Moonlight 16B Kimi K2 Base DeepSeek-V3.1 DeepSeek-V3.2 Kimi K2 0905 Kimi Linear 48B A3B GLM-4.7-Flash GLM-5 Kimi K2.5 GLM-5.1 Kimi K2.6 GLM-5.2 Kimi K3 GLM-5.3 GLM-5.3-Flash Hunyuan 4 Preview

Q K·V Q1 Q2 Q3 Q4 c_KV low-rank KV KV KV kv_lora_rank ≪ d_model

hybrid linear attention · 0

A minority of full-attention layers interleaved with linear-attention layers, trading long-context cost for near-constant memory.

Q K·V L L L L F L L L L L L L F L L L L F L = linear F = full linear-attention layers interleaved with a few full-attention layers

Operator adoption

Each row is a technique; the year shown is when the earliest model in this corpus first shipped it in an open-weight release.

Attention / TopicModelFirst open-weight adopter
MHA 10 GPT-2 (2019-02)
GQA 46 Llama 2 70B (2023-07)
MLA 21 DeepSeek-V2 (2024-05)
MQA 3 DeepSeek-V4-Flash (2026-04)
SWA 12 Mistral 7B (2023-09)
Linear attention (hybrid) 0
MoE 55 DeepSeekMoE 16B (2024-01)
RoPE 58 Mistral 7B (2023-09)
YaRN long-context 0
RMSNorm 73 LLaMA 1 7B (2023-02)
SwiGLU / SiLU 70 LLaMA 1 7B (2023-02)
Multi-Token Prediction 39 DeepSeek-V3 (2024-12)
FP8 training 18 DeepSeek-V3 (2024-12)