roofline
Inference interview questions tagged roofline, across every topic.
15 questions · 7 unlocked for you
Concepts behind "roofline"
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
Speculative Decoding: The Algebra and the ProofDerive expected tokens per verification pass, include the cost of drafting and verification, and prove the rejection sampler preserves the target distribution. Then distinguish the linear-layer roofline crossover from the actual speedup boundary.🌳 Decoding Algorithms
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
Model Bandwidth Utilization (MBU)MBU divides the bytes a decode step must read (weights plus KV cache) by the measured step time and the chip's peak bandwidth. It is the decode-side twin of MFU, and it decides whether a slow server has a software problem to fix or has already hit the hardware floor.⚛️ Inference Physics🔒 Premium