KV Cache Memory › Memory Visualization Across Models
Language AI HandbookAll chapters KV Cache Memory › Memory Visualization Across ModelsOne section · Sections in this chapter9 / 14 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Let us visualize how memory allocation differs across model sizes and architectures to build intuition for the relative importance of cache versus weights at different scales.

Without GQA, LLaMA 2 70B would require 8 times more KV cache memory, making long-context inference impractical on most hardware. The visualization clearly demonstrates how Grouped Query Attention keeps cache proportions manageable at the 70B scale, with the cache remaining a smaller fraction of total memory compared to what standard MHA would require. The architectural innovation of GQA is visible in the numbers: the 70B models with 8 KV heads have smaller caches than LLaMA 7B with 32 KV heads, despite being an order of magnitude larger in parameter count.