Your question is KV-Cache and PagedAttention. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
What is the KV-cache, why is it critical for optimizing LLM generation speed, and how does PagedAttention solve KV-cache fragmentation on AMD GPUs?
Explain the cache lifecycle during prefill and autoregressive decoding, its memory layout and scaling pressure, and how PagedAttention enables efficient continuous batching. Include the practical trade-offs and distinguish GPU memory fragmentation from attention-computation cost.
Scope: transformer inference using ROCm-compatible systems such as vLLM on AMD GPUs.