prefill
Inference interview questions tagged prefill, across every topic.
11 questions · 3 unlocked for you
Concepts behind "prefill"
Concept pages for the mechanisms these questions lean on.
Foundational
The Roofline Model for LLM InferenceThe roofline model bounds a kernel's speed by the smaller of peak compute and bandwidth times arithmetic intensity. For LLM serving it decides whether a step is priced in bytes or in FLOPs: batch-1 decode sits near 1 FLOP/byte against an H100 ridge of 295, prefill sits far above it.⚛️ Inference Physics
Foundational
Capacity Planning in Tokens per SecondHow to size an LLM serving fleet: convert requests into prompt and output tokens per second, price prefill by FLOPs and decode by bytes, cap utilization for tail latency, check KV residency and TPOT, then turn replicas into a cost per million tokens.🏛️ Inference System Design
Advanced
Prefill Versus Decode: Two Workloads on One GPUEvery LLM request runs two different workloads: prefill processes the whole prompt in one compute-bound pass, then decode generates one token per step and is bound by weight and KV reads. Which one dominates a request decides the metric you tune, the batching policy and whether the two phases belong on the same GPU.⚛️ Inference Physics🔒 Premium
Advanced
Prefill and Decode DisaggregationDisaggregated serving runs prefill and decode on separate GPU pools and ships each request's KV cache between them. This page prices the interference it removes, the transfer it adds (2.5 GiB for an 8K-token Llama 3.3 70B prompt), how to size the prefill-to-decode ratio, and when the extra hop is not worth it.🕸️ Distributed Inference🔒 Premium