llama3-8-kv-heads-32-attention-heads-gqa

IN premiseentries/2026/06/21/wiki-LLaMA.md

Created 2026-06-21T09:50:09+00:00

Llama 3 8B uses grouped-query attention with 8 key/value heads and 32 attention heads.

Summary

This records that the model shares key and value computations across groups of four query heads rather than computing them separately for all 32 heads, a design choice that shrinks the memory footprint during inference. The practical upshot is that the model runs faster and fits in less RAM than a full multi-head design with the same query capacity, which is part of why an 8B-parameter model is viable on consumer hardware.

Dependents

These beliefs depend on this one: