KV Cache: The Top Memory Hog for Large Contexts

The Key-Value (KV) cache, which stores intermediate attention states, grows linearly with context length, consuming vast amounts of GPU High-Bandwidth Memory (HBM); a 128K-token context for a 70B model can exceed a single A100 GPU's 40GB HBM capacity.

Open the full topic