mqa-shares-single-kv-across-all-heads

IN premiseentries/2026/06/21/wiki-Transformer_deep_learning_architecture-chunk-4.md

Created 2026-06-21T09:50:11+00:00

Multi-Query Attention (MQA) shares a single set of key/value projections across all attention heads; Grouped-Query Attention (GQA) generalizes this to groups of heads sharing KV projections.

Summary

In standard attention, every head computes its own keys and values, which is memory-heavy. MQA and GQA cut that cost by letting multiple heads reuse the same key and value computations, trading a small amount of expressiveness for much lower memory use during inference — a key trade-off for deploying large models efficiently.

Dependents

These beliefs depend on this one: