AI Infra Interviews logo

decode

AI infra interview questions tagged decode, across every topic.

20 questions · 6 unlocked for you

Concepts behind "decode"

Review the concepts used in these questions.

Foundational
🚀 Inference & Serving
Prefill vs DecodeFollow one prompt through its first prediction and later decode steps, then separate GPU work from the wait a user sees. Learn why batch size and context change the likely bottleneck.
Core
🧮 Napkin Math & CapacitySign in
Arithmetic Intensity by OperationCount the FLOPs and memory transfers of a projection, attention and a residual add. Learn where the batch-size shortcut works, where it breaks, and which hardware roof applies.
Advanced
🧩 GPU & Accelerator Architecture🔒 Premium
Memory-Bound vs Compute-Bound KernelsUse a worked timing example to distinguish a bandwidth ceiling from a measured bottleneck. Learn which profiler evidence to inspect and why decode, prefill and a whole serving step need separate diagnoses.
Advanced
⚡ Kernels & Compilers🔒 Premium
torch.compile and CUDA Graphstorch.compile optimizes captured computation, while CUDA graphs reduce repeated launch overhead. Both need validation against the model’s shapes, control flow and memory behavior.
Advanced
🚀 Inference & Serving🔒 Premium
Speculative DecodingA draft proposes tokens; the target checks them with a sampling rule that preserves its distribution. Work through the correction after rejection, count accepted drafts separately from emitted tokens, and decide whether the measured round cost earns a speedup.
Advanced
🚀 Inference & Serving🔒 Premium
Disaggregated Prefill and DecodeSeparate prefill and decode to control phase interference, then budget the KV handoff. A short isolated transfer can still overload a shared path; cancellation stops generation before it necessarily releases transfer buffers.