liveBook · Manning

Grouped-query attention

As explained in Domain-Specific Small Language Models

An attention variant that speeds inference by sharing attention computation across groups of queries.

Grouped-query attention is an inference-oriented attention variant that shares attention computation across query groups, reducing computational overhead and improving generation speed. section 7.2.4 section 7.4

Operational implications include:

  • Improves throughput and latency for StarCoder2 during GPU inference. section 7.2.4
  • Supports deployment comparisons alongside BF16 and quantized inference configurations. section 7.2.4

StarCoder2 inference

StarCoder2 3B uses grouped-query attention with a 16,384-token context window and 4,096-token sliding-window attention; GPU benchmarks report better throughput and latency than CodeGen models. section 7.2.4

How Domain-Specific Small Language Models covers it

How deep it goes
Characterizes the performance role but does not explain the internal attention computation.
Examples
Uses StarCoder2 3B and GPU throughput and latency benchmarks as concrete examples.
What you can do after
Evaluate inference throughput and latency when comparing attention and deployment configurations.
How it connects
Connects grouped-query attention with inference, sliding-window attention, context windows, and quantization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Domain-Specific Small Language Models. The section links point to the parts of the book it draws on.