Skip to content

    Grouped-Query Attention (GQA)

    AI fundamentals & modelsGQAGrouped Query Attention
    Reading time: 2 min.Editorially reviewed on:

    Definition

    GQA splits multiple query heads into fewer common key value heads.

    The architecture lies between Multi-Head Attention with separate K/V heads and Multi-Query Attention with only one K/V head. The goal is faster decoder inference at lower KV cache.

    Simply explained

    Multiple interrogator heads share smaller groups of common memory information.

    Why it matters in practice

    GQA can reduce memory and inference costs without guaranteeing equal quality gains for each model.

    Example from business

    Hypothetical example: An LLM serving team compares GQA and MHA models for quality, latency and CV cache.

    Limits and pitfalls

    • Confuse with Graph Question Answering; misconfigure head counts; compare throughput without batch and context specifications.

    Origin & history

    Ainslie et al. introduced the term 2023 as a generalization of Multi-Query Attention.

    Use in mid-sized companies

    • Compare models with the same context, the same batch size and suitable quality criteria.

    Frequently asked questions

    How many K/V heads does GQA use in the narrower sense?

    More than one and fewer than query heads. What edge cases exist? One K/V head corresponds to MQA; one K/V head per query head corresponds to MHA.

    Sources

    Source verification: 10.10.2026. Definition and documented classification verified; examples describe possible applications.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice