← Back to article

Equation 14 · Serving a Frontier Model: The KV Cache, Batching, and What a Token Actually Costs

What does this equation mean?

nkvn_{\mathrm{kv}}

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 mathematical expression combines the displayed quantities; its precise role follows from the surrounding article text. 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

nkvn_{\mathrm{kv}}

Symbol n_kv

nkn_kv is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.

Understand this part →

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 this expression with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

The other lever is nkvn_{\mathrm{kv}} . Standard multi-head attention gives every query head its own key and value heads. Shazeer observed that the key and value projections could be shared across all query heads, cutting the cache by the head count at some quality cost [ 4 ] . Grouped-query attention interpolates: query heads are divided into groups, each sharing one key–value head, and the paper shows the resulting models can be uptrained from existing multi-head checkpoints to reach quality close to the original at speed close to multi-query [ 5 ] .

Read the equation in its article →

Sources cited in the surrounding passage

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

Return to Serving a Frontier Model: The KV Cache, Batching, and What a Token Actually Costs

Browse the mathematical compendium →