AppliedAIPrep logoAppliedAI/Prep

gpu

Applied AI 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
🖥️ ML Infrastructure & Serving
GPU Memory and the Serving StackServing an LLM is mostly a memory problem: the GPU must hold the model weights plus a KV cache that grows with sequence length and batch size, and inference splits into a compute-bound prefill and a memory-bandwidth-bound decode. Knowing the memory math (weights plus KV cache), why decode is bandwidth-bound, and the levers (quantization, batching, paged attention) is the foundation of LLM serving. Applied-AI interviews probe it because 'will this model fit and how fast will it run?' is a constant production question.
Core
🔁 MLOps & LifecycleSign in
Reproducible and Deterministic PipelinesA reproducible pipeline produces 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 are nondeterministic by default. Interviews probe this because without it you cannot debug a regression, pass an audit, or trust an A/B result.
Core
🖥️ ML Infrastructure & ServingSign in
Quantization and Low PrecisionQuantization stores and computes model weights (and activations) in fewer bits, FP16/BF16, FP8, INT8, INT4, instead of FP32, cutting memory and speeding inference at some accuracy cost. It is the main lever to fit a large model on a given GPU and to serve it cheaply, and it underlies QLoRA fine-tuning and KV-cache compression. Applied-AI interviews probe it because 'how do you serve a 70B model affordably?' usually starts with quantization, and knowing the precision ladder and its trade-offs is essential.
Core
🖥️ ML Infrastructure & ServingSign in
Continuous BatchingGPUs are efficient on batches, but LLM requests arrive at different times and finish after different numbers of tokens, so static batching wastes the GPU waiting for the slowest request. Continuous (in-flight) batching adds and removes requests from the running batch at each decoding step, keeping the GPU full and dramatically raising throughput. Applied-AI interviews probe it because it is the single biggest throughput lever in LLM serving and explains why one replica can serve many concurrent users.
Core
🖥️ ML Infrastructure & ServingSign in
FlashAttention and IO-Aware KernelsNaive attention is slow not because of the matmuls but because it writes the full N-by-N attention matrix to GPU high-bandwidth memory and reads it back, which is memory-bandwidth bound. FlashAttention fuses the whole attention computation into one kernel that tiles the inputs in fast on-chip SRAM and never materializes the full matrix, using an online-softmax trick to stay exact. Applied-AI interviews probe it because it is why long-context training and serving became affordable and a clean test of GPU memory-hierarchy reasoning.
Core
🖥️ ML Infrastructure & ServingSign in
PagedAttentionThe KV cache is the memory bottleneck in LLM serving, and naively reserving a contiguous block per request (sized for the maximum length) wastes most of it to fragmentation and over-allocation. PagedAttention borrows virtual-memory paging: store the KV cache in fixed-size non-contiguous pages allocated on demand, so memory is used only as tokens are generated. This packs far more concurrent requests onto a GPU, raising throughput. Applied-AI interviews probe it because it is the key memory innovation behind modern serving (vLLM).