Grouped-Query Attention (GQA) and Multi-Query Attention (MQA): Mathematical Foundations, KV-Cache Bandwidth Reduction, Uptraining Recipes, and Tensor Parallelism Implications
Grouped-Query Attention (GQA) and Multi-Query Attention (MQA): Mathematical Foundations, KV-Cache Bandwidth Reduction, Uptraining Recipes, and Tensor Parallelism Implications The KV-Cache Bandwidth Wall Autoregressive decoder inference is bottlenecked by memory bandwidth, not compute. At each decoding step, the model must reload the entire key-value (KV) cache from high-bandwidth memory (HBM) into the compute units. For a model with $H$ attention heads, sequence length $n$, head dimension $d_










