LLM Decoding and KV Cache: The Memory Bandwidth Choke Points

The auto-regressive 'decode phase' of LLM inference, generating tokens one-by-one, is heavily memory-bound as it repeatedly accesses model weights and the growing Key-Value (KV) cache, which can exceed model size with long contexts. This contrasts with the often compute-bound 'prefill phase'.

Sources

Open the full topic