Equation 12 · How AI Memory Systems and the Bandwidth Wall Actually Work
What does this equation mean?
Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.
This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.
Read it piece by piece
Symbol M_KV
V is part of the quantity the equation computes from the expression on the right.
Symbol h
h is an input to the expression that computes the quantity on the left.
Symbol d
d is an input to the expression that computes the quantity on the left.
Symbol b
b is an input to the expression that computes the quantity on the left.
Symbol l
l is an input to the expression that computes the quantity on the left.
=
The expressions on both sides represent the same quantity under the stated assumptions.
See an illustrated explanation →subscript
The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.
How to interpret it
Read it with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
Hooper and colleagues, working on KV cache compression for very long contexts, state the resulting footprint precisely: for a model with n layers and h attention heads of dimension d , stored using e bytes per element, the KV cache size for batch size b and sequence length l is . which grows linearly in both batch size and sequence length, with the leading factor of two accounting for storing both keys and values [ 9 ] . That single equation is the whole mechanism: nothing about it is a design choice an inference engineer can simply decline. Extend the conversation, and l grows; serve more requests at once, and b grows; either way grows with it, and Hooper…
Read the full surrounding passage
Hooper and colleagues, working on KV cache compression for very long contexts, state the resulting footprint precisely: for a model with n layers and h attention heads of dimension d , stored using e bytes per element, the KV cache size for batch size b and sequence length l is . which grows linearly in both batch size and sequence length, with the leading factor of two accounting for storing both keys and values [ 9 ] . That single equation is the whole mechanism: nothing about it is a design choice an inference engineer can simply decline. Extend the conversation, and l grows; serve more requests at once, and b grows; either way grows with it, and Hooper and colleagues note that at sufficiently long context lengths the KV cache — not the model’s weights — becomes the dominant consumer of memory during inference [ 9 ] .
Sources cited in the surrounding passage
These citations give research context. Read each source to check which claims it supports.
Return to How AI Memory Systems and the Bandwidth Wall Actually Work