Storing the Gemma 4 K=V Cache Once: Exact Global-KV Memory Savings in a Paged Serving Engine with Unchanged Attention Kernels
TL;DR - This paper compresses Gemma 4 31B’s global KV cache by storing one 640-value row per head and token instead of separate full keys and values, without changing paged-attention kernels. The prototype cuts per-request decode KV memory and improves capacity-bound throughput while preserving equivalent arithmetic.
- Uses overlapping strided views to reconstruct key and value caches from one stored row.
- Reduces steady-state decode KV memory by 1.34–1.40× at 32K–64K tokens.
- Improves decode tokens per step by 1.38Ă— for 16K prompts and 1.24Ă— for 8K prompts on two A100 GPUs.
- Adds 4–9% eager-step overhead at equal batch and does not yet combine with default-scale 8-bit KV caching.