KV cache stores past keys and values for attention reuse. Size scales linearly with context length and batch size. For long-context serving, KV cache often exceeds the model weights.
GQA (Llama 2/3): fewer K/V heads than Q heads — smaller cache. MQA: one K/V head — smallest. Quantizing KV to FP8 or INT4 is the biggest production win for long-context throughput.