ML Infrastructure & GPUs
70 questionsDONEUNLOCKEDLOCKED
GPU/TPU memory, distributed training and parallelism, quantization, inference serving (vLLM, batching, KV cache), and scaling API gateways: the infra depth the labs and NVIDIA probe.
Grounded in real GenAI, LLM, and AI/ML engineering interview loops and written to a senior-engineer editorial bar.
You have 10 free answers unlocked here.Sign in free for 10 more · 50 are premium.
01–28Foundationsthe vocabulary every loop assumes you already have0/28 done
29–53Core loopsthe questions every loop actually asks0/25 done
54–70Field scenariosthe messy, half-specified problems from real deployments0/17 done
The concepts behind ML Infrastructure & GPUs
The vocabulary and mental models these questions assume, from our curriculum. Start with the foundations free; the deeper, interview-defining ideas are part of premium.
Core
Quantization and Low PrecisionQuantization holds and runs model weights (and activations) at fewer bits, FP16/BF16, FP8, INT8, INT4, rather than FP32, shrinking memory and accelerating inference for some accuracy cost. It is the primary way to fit a large model onto a given GPU and serve it cheaply, and it sits behind QLoRA fine-tuning and KV-cache compression. AI, ML, and GenAI engineer interviews probe it because 'how do you serve a 70B model affordably?' typically opens with quantization, so the precision ladder and its trade-offs are must-know material.Sign in
Foundational
GPU Memory and the Serving StackServing an LLM is largely a memory problem: the GPU has to hold the model weights along with a KV cache that scales with sequence length and batch size, and inference divides into a compute-bound prefill and a memory-bandwidth-bound decode. Understanding the memory math (weights plus KV cache), why decode is bandwidth-bound, and the levers (quantization, batching, paged attention) is the bedrock of LLM serving. AI, ML, and GenAI engineer interviews probe it because 'will this model fit and how fast will it run?' is a recurring production question.Core
Knowledge DistillationKnowledge distillation trains a small student model to copy a larger teacher, treating the teacher's soft probability distribution (or internal features) as a richer training signal than hard labels. A student trained this way usually outperforms an identical model trained from scratch on the same data, because the soft targets carry the teacher's learned similarity structure. AI, ML, and GenAI engineer interviews probe it because it is the main lever for compressing a capable model into something cheap to serve, and because reasoning distillation and the legal terms around teacher outputs are live issues in 2026.Sign in
Core
Continuous BatchingGPUs run efficiently on batches, but LLM requests show up at different times and complete after different numbers of tokens, so static batching wastes the GPU while it waits on the slowest request. Continuous (in-flight) batching inserts and evicts requests from the running batch at each decoding step, holding the GPU full and sharply lifting throughput. AI, ML, and GenAI engineer interviews probe it because it is the single biggest throughput lever in LLM serving and explains why one replica can serve many concurrent users.Sign in
Core
FlashAttention and IO-Aware KernelsNaive attention is slow not because of the matmuls but because it writes the full N-by-N attention matrix out to GPU high-bandwidth memory and reads it back, making it memory-bandwidth bound. FlashAttention merges the entire attention computation into one kernel that tiles the inputs in fast on-chip SRAM and never materializes the full matrix, relying on an online-softmax trick to remain exact. AI, ML, and GenAI engineer interviews probe it because it is what made long-context training and serving affordable and a clean test of GPU memory-hierarchy reasoning.Sign in
Core
PagedAttentionThe KV cache is the memory bottleneck in LLM serving, and naively reserving a contiguous block per request (sized for the maximum length) loses most of it to fragmentation and over-allocation. PagedAttention adapts virtual-memory paging: keep the KV cache in fixed-size non-contiguous pages allocated on demand, so memory is consumed only as tokens are generated. This fits far more concurrent requests onto a GPU, raising throughput. AI, ML, and GenAI engineer interviews probe it because it is the key memory innovation behind modern serving (vLLM).Sign in
Advanced
Disaggregated Prefill/Decode and Prefix CachingLLM inference has two phases with opposite hardware profiles: prefill is compute-bound (it works through the whole prompt in parallel) while decode is memory-bandwidth bound (one token at a time). Running both on the same GPU pool makes them compete, so long prefills stall ongoing decodes and you miss either the time-to-first-token or the time-per-output-token SLO. Disaggregation places them on separate GPU pools and moves the KV cache between them, and prefix caching reuses KV for shared prompt prefixes. AI, ML, and GenAI engineer interviews probe it because it is the current frontier of serving architecture and a real latency-SLO tradeoff.🔒 Premium
Core
Speculative DecodingDecoding is sequential and memory-bound, so producing each token one at a time leaves the GPU underused. Speculative decoding runs a small, fast draft model to propose several tokens ahead, then the large model checks them all in a single parallel pass, keeping the longest correct prefix. It accelerates generation without altering output quality, since the big model still validates every token. AI, ML, and GenAI engineer interviews probe it because it is a clever, widely-used latency optimization that exploits the memory-bound nature of decode.Sign in
