← Back to article

Equation 13 · AI Memory Systems and the Bandwidth Wall in 2035: Scenarios, Signals, and Falsifiable Predictions

What does this equation mean?

MKV=2 L Hkv dh S B pM_{\mathrm{KV}} = 2 \, L \, H_{\mathrm{kv}} \, d_h \, S \, B \, p

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.

Inputs and operations2 L H_kv d_h S B p
Result or conditionM_KV
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

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

MKVM_{\mathrm{KV}}

Symbol M_KV

MKM_KV is part of the quantity the equation computes from the expression on the right.

Understand this part →

LL

Symbol L

the number of layers.

Understand this part →

HkvH_{\mathrm{kv}}

Symbol H_kv

HkH_kv is an input to the expression that computes the quantity on the left.

Understand this part →

dhd_h

Symbol d_h

the head dimension.

Understand this part →

SS

Symbol S

the sequence length.

Understand this part →

BB

Symbol B

the batch size.

Understand this part →

pp

Symbol p

the number of bytes.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
subscript

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.

Understand this part →

How to interpret it

Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

Fact. The memory a transformer must hold for one in-flight generation — its key-value cache — grows linearly in exactly the variables that make serving expensive: sequence length and batch size. For a model with L layers, HkvH_{\mathrm{kv}} key-value heads, head dimension dhd_h , sequence length S , batch size B , and p bytes stored per element, the cache occupies approximately MKV=2 L Hkv dh S B pM_{\mathrm{KV}} = 2 \, L \, H_{\mathrm{kv}} \, d_h \, S \, B \, p. bytes, the leading factor of two accounting for keys and values together. That equation is worth writing out because it exposes the one real lever every mitigation below actually pulls: none of them escapes linear growth in S and B . Each instead shrinks one of the other factors — most consequentially…
Read the full surrounding passage
Fact. The memory a transformer must hold for one in-flight generation — its key-value cache — grows linearly in exactly the variables that make serving expensive: sequence length and batch size. For a model with L layers, HkvH_{\mathrm{kv}} key-value heads, head dimension dhd_h , sequence length S , batch size B , and p bytes stored per element, the cache occupies approximately MKV=2 L Hkv dh S B pM_{\mathrm{KV}} = 2 \, L \, H_{\mathrm{kv}} \, d_h \, S \, B \, p. bytes, the leading factor of two accounting for keys and values together. That equation is worth writing out because it exposes the one real lever every mitigation below actually pulls: none of them escapes linear growth in S and B . Each instead shrinks one of the other factors — most consequentially HkvH_{\mathrm{kv}} , the number of key-value heads actually stored.

Read the equation in its article →

Sources cited in the article section

These citations give research context. Read each source to check which claims it supports.

Return to AI Memory Systems and the Bandwidth Wall in 2035: Scenarios, Signals, and Falsifiable Predictions

See this formula across 1 published context →

Browse the mathematical compendium →