gpu
AI, ML & GenAI interview questions tagged gpu, across every topic.
18 questions · 2 unlocked for you
Concepts behind "gpu"
The curriculum that explains the ideas these questions test.
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.🖥️ ML Infrastructure & Serving
Core
Reproducible and Deterministic PipelinesA reproducible pipeline yields the same model and metrics from the same inputs, achieved by pinning seeds, dependencies, data versions, and code together. Determinism on GPU is a separate, harder problem because many CUDA kernels run nondeterministically by default. Interviews probe this because without it you cannot debug a regression, pass an audit, or trust an A/B result.🔁 MLOps & LifecycleSign in
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.🖥️ ML Infrastructure & ServingSign 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.🖥️ ML Infrastructure & ServingSign 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.🖥️ ML Infrastructure & ServingSign 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).🖥️ ML Infrastructure & ServingSign in
