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 shares attention computation across groups of queries. It is used in StarCoder2 to speed inference while reducing computational overhead. section 7.2.4

In a GPU benchmark, StarCoder2’s implementation is associated with better throughput and latency than CodeGen 350M and 2B mono models. The comparison does not isolate the attention mechanism from other model differences. section 7.2.4

How Domain-Specific Small Language Models covers it

How deep it goes
States its inference benefits but does not detail the attention computation.
Examples
Uses a GPU benchmark comparing StarCoder2 throughput and latency with CodeGen 350M and 2B mono models.
What you can do after
Evaluate inference performance by comparing StarCoder2 throughput and latency against CodeGen models on a GPU.
How it connects
Connects grouped-query attention with StarCoder2, inference, and code generation.

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.