Tuning and serving

KV-Aware Serving interview questions

The kv-aware serving questions that keep coming up in AI engineer interviews. The first 3 come with full answers.

Updated 2026-09-05

01

How does the KV cache shape production serving, and what two generation phases does it split into?

The KV cache is the model's running memory of everything it has read — one entry per token — and it dominates serving because it grows with context and eats GPU memory. Generation splits into two phases around it: prefill reads the whole prompt in one pass to build the initial cache (compute-bound), then decode emits tokens one at a time, each re-reading the growing cache (memory-bandwidth-bound). Because they bottleneck on different resources, the whole serving stack is organized around them.
02

How do prefill and decode differ in what they bottleneck on, and why does mixing them on one GPU cause problems?

Prefill is one big matrix-heavy burst over every prompt token, so it saturates compute. Decode does tiny per-step math but drags the whole growing KV cache in and out, so it's limited by memory bandwidth. On a single shared GPU they collide: a user with a 100k-token prompt hogs the compute during prefill and creates head-of-line blocking, stalling everyone else's streaming decode. You get poor utilization and jittery latency because one workload starves the other.
03

What problem does disaggregation solve by running prefill and decode on separate GPU pools linked by a fast connection?

Disaggregation puts prefill on one GPU pool and decode on another, shipping the KV cache between them over a fast interconnect (RDMA/NVLink). That fixes the collision: a giant prompt keeps its prefill on pool A without stalling the token streaming on pool B, so you kill head-of-line blocking. It also lets you tune each pool for its bottleneck — compute-heavy hardware for prefill, memory-bandwidth-heavy for decode — and scale them independently. NVIDIA Dynamo and the CNCF's llm-d orchestrate exactly this at cluster scale over engines like vLLM and SGLang.

Also asked in interviews

These 3 run inside the bootcamp as recall drills and voice mock interviews. You answer, the AI grades.

Knowing an answer and saying it under pressure are two different days. Inside Skillumen you answer these out loud and get graded on the spot. Foundations is free.

Try it free →

The open-source companion list, Awesome AI Engineer Interview Questions, curates 105 of these on GitHub.