Equation 1 · Part 2 · Serving a Frontier Model: The KV Cache, Batching, and What a Token Actually Costs
Symbol L
What this part means
the number of layers.
Its job in the formula
L is an input to the expression that computes the quantity on the left.
Full expression→Symbol L→Article meaning
Where the article explains it
for L layers, key–value heads, head dimension , sequence length s , batch size b , and p bytes per element.
The passage around this formula
A transformer decoder generates autoregressively: each new token attends over all previous positions [ 1 ] . To avoid recomputing the whole prefix at every step, implementations retain the per-layer key and value tensors for every past position. That is the key–value cache, and its size grows linearly with sequence length: . for L layers, key–value heads, head dimension , sequence length s , batch size b , and p bytes per element. The factor of two counts keys and values.
Learn the underlying idea
A variable is a named place for a value. Its letter is a local label: x can mean position in one formula and a data point in another.
Open the illustrated variables: a letter stands for a value guide →
See this notation across published equations →
Sources cited in the surrounding passage
These citations provide research context; check each source for the exact claim it supports.