In the latest episode of Generative AI Podcast, hosts Arjun and Diya tackle a critical scaling challenge: what happens when the KV cache no longer fits in GPU memory? The answer isn't to drop user conversations—it's to tier the cache across a memory hierarchy.
"That's the fear, and the answer is no — you tier it."
They break down the real mechanism using vivid analogies and highlight edge cases that catch engineers in production. A concrete example: a 7-billion-parameter model running on vLLM might allocate about 5,500 cache blocks of 16 tokens each, providing room for roughly 90,000 tokens of cached conversation.
The Four-Tier Memory Hierarchy
The episode outlines four tiers, each balancing bandwidth against capacity:
- GPU HBM: Fastest, but smallest capacity.
- CPU DRAM: Slower, larger.
- Local SSD: Around 5 GB/s bandwidth, enormous capacity—ideal for long-idle sessions.
- Network Storage: The gotcha: never decode live from network storage. That's the one unbreakable rule.
"You just stated the entire rule of thumb."
The hosts answer a key question: When the KV cache lives in GPU memory and runs out of room, you don't drop conversations—you tier the data. The cache isn't an archive you occasionally dip into; it's working memory you constantly touch on every token.
Episode 23 of the Gen AI series. Full written lesson available at datarekha.com.