AI Infra Interviews logo

serving

AI infra interview questions tagged serving, across every topic.

45 questions · 8 unlocked for you

Concepts behind "serving"

The curriculum that explains the ideas these questions test.

Foundational
🚀 Inference & Serving
Prefill vs DecodeAn LLM request runs in two phases with opposite hardware profiles: prefill reads the whole prompt in one compute-bound pass and decides time to first token, decode emits one token per forward pass and is bound by memory bandwidth. Every serving decision, from batch size to which GPU to buy to whether to split the two phases across machines, follows from that split.
Foundational
🚀 Inference & Serving
The KV CacheThe KV cache stores each token's attention keys and values so decode never recomputes them, turning a quadratic cost into a linear one at the price of memory that grows with every token in every concurrent sequence. Its size, 128 KB per token for Llama 3.1 8B and 320 KB for 70B in bf16, is what caps concurrency and context on a given GPU, so it decides batch size, replica count and whether a model fits at all.
Foundational
🧮 Open Weights & Serving Engines
Open-Weights Models of 2026The open-weights frontier moved from dense models of tens of billions of parameters to sparse mixtures of experts measured in trillions, and the serving problem changed with it. As of September 2026 the releases an infrastructure engineer is asked about are Z.ai's GLM-5.3 at 753B, Moonshot's Kimi K3 at 2.8T, and DeepSeek's V4 family. What matters for deployment is not the headline count but three other numbers: active parameters per token, the attention design, and the format the weights actually shipped in.
Foundational
🧮 Open Weights & Serving Engines
Reading config.json to Size a Model You Have Never RunEvery Hugging Face model ships a config.json, and it contains enough to compute the weight footprint, the KV cache per token, the parallel degrees that divide cleanly and the minimum GPU count, before downloading a byte. Doing that derivation is a standard whiteboard exercise in serving interviews because it is exactly what an engineer does on the morning a new model lands, and the fields that matter are the same across every recent architecture.
Foundational
🧮 Open Weights & Serving Engines
vLLM Server Arguments That MatterA vLLM deployment is mostly decided by a dozen flags, and the ones that matter fall into four groups: how the model is split across GPUs, how memory is divided between weights and cache, how requests are batched, and which specialized backends the model needs. Getting the first two wrong produces an engine that will not start or that runs out of memory under load. Getting the third wrong produces an engine that starts, serves, and misses its latency target by a wide margin.
Advanced
🚀 Inference & Serving🔒 Premium
PagedAttentionPagedAttention stores the KV cache in fixed-size blocks scattered across HBM and maps each sequence's logical positions to physical blocks through a block table, the same trick an operating system uses for virtual memory. It removes the reservation and fragmentation waste of contiguous allocation, lets blocks be shared between sequences, and is why an engine can decide admission by counting free blocks.