Skip to content

    Grouped-Query Attention (GQA)

    AI fundamentals & modelsGQAGrouped Query Attention
    Editorially reviewed on: 1 source
    Your reading view

    The short answer · 11 words

    In short

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

    Flow-alerta.cab (2026): Grouped-Query Attention (GQA). https://flow-alerta.cab/en/glossar/grouped-query-attention-gqa. Editorially reviewed on: 10 October 2026.

    How much detail would you like?

    Practical

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

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

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

    At a glance

    Core
    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.
    Use
    GQA can reduce memory and inference costs without guaranteeing equal quality gains for each model.
    Example
    Hypothetical example: An LLM serving team compares GQA and MHA models for quality, latency and CV cache.
    Limits
    Confuse with Graph Question Answering; misconfigure head counts; compare throughput without batch and context specifications.

    Questions about this term

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

    More than one and less than query heads.

    What are the borderline cases?

    One K/V head corresponds to MQA; one K/V head per query head corresponds to MHA.

    All details and background

    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.

    ELI5 – Explained simply

    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

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

    Pitfalls and limits

    • 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.

    Sources

    Quellenprüfung: 10.10.2026. Definition und dokumentierte Einordnung abgeglichen; Beispiele beschreiben mögliche Anwendungen.

    Editorially reviewed on:

    Next step

    Put knowledge into practice