AI Infra Interviews logo

Distributed Training & Parallelism

32 questions
0 of 32 done · 10 unlocked for you
DONEUNLOCKEDLOCKED

Distributed Training Interview Questions

DDP, ZeRO and FSDP, tensor, pipeline, context and expert parallelism, collectives and their cost, MFU, activation checkpointing, elastic and fault-tolerant training, checkpoint economics and the RL post-training stack. Owning the training run at cluster scale.

Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.

You have 10 free answers unlocked here.Sign in free for 10 more · 12 are premium.
01–13Foundationsthe vocabulary every loop assumes you already have0/13 done
14–25Core loopsthe questions every loop actually asks0/12 done
26–32Field scenariosthe messy, half-specified problems from real deployments0/7 done
PRACTICE TESTStudied this track? Prove it: a timed Distributed Training & Parallelism test.rotating questions · every answer explained · free with an accountStart →

The concepts behind Distributed Training & Parallelism

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.

Foundational
Data Parallelism and DDPData parallelism gives every GPU a full copy of the model, feeds each a different slice of the batch, and averages the gradients with an all-reduce so every replica takes the same optimizer step. It is the first parallelism every training job uses, and the tokens-per-GPU arithmetic behind it decides whether the communication hides behind the backward pass or dominates the step.
Core
Sign in
ZeRO and FSDPZeRO and FSDP keep data parallelism's simple programming model but shard the optimizer state, gradients and parameters across ranks, cutting per-GPU memory from 16 bytes per parameter toward 16/N. The price is 1.5x DDP's communication and a dependence on tokens per GPU that decides when sharding stops paying and tensor parallelism takes over.
Advanced
🔒 Premium
Tensor ParallelismTensor parallelism splits individual weight matrices across GPUs so each rank computes a slice of every layer, which is how a model whose single layer does not fit one GPU gets trained at all. It costs four all-reduces per transformer block on the critical path, which is why it stays inside the NVLink domain and rarely exceeds 8 ranks.
Advanced
🔒 Premium
Pipeline Parallelism and the BubblePipeline parallelism puts consecutive groups of layers on different GPUs and streams micro-batches through them, which is the only parallelism whose traffic is small enough to cross a slow fabric comfortably. Its cost is the bubble, the idle time while the pipeline fills and drains, and the schedule you pick (GPipe, 1F1B, interleaved, zero-bubble) decides how much of each step is wasted.
Advanced
🔒 Premium
Context and Sequence ParallelismContext parallelism splits a single long sequence across GPUs so that attention over 128k tokens fits in memory that would otherwise need terabytes of activations per layer. Ring attention rotates key-value blocks around the ranks while queries stay put, and grouped-query attention is what makes that rotation cheap enough to hide behind the attention math.
Advanced
🔒 Premium
Expert Parallelism for MoEA mixture-of-experts layer runs only a few of its experts per token, so the experts can be spread across GPUs and each token shipped to the ranks that hold its chosen experts. That shipping is an all-to-all in each direction, twice per layer per pass, and its cost plus the load imbalance between experts is what expert parallelism is really about.
Foundational
Collective Communication PrimitivesAll-reduce, all-gather, reduce-scatter, all-to-all and broadcast are the five operations every parallelism strategy is built from, and each has a fixed per-rank traffic cost you can compute before a job runs. Knowing those volumes for a named model is how you decide whether a layout is compute-bound or waiting on the network.
Advanced
🔒 Premium
Ring vs Tree All-ReduceA ring all-reduce moves the minimum possible bytes per rank but takes 2(N-1) steps, so its latency grows with the number of GPUs; a tree finishes in a logarithmic number of steps but is harder to keep bandwidth-optimal. NCCL keeps both, chooses per message size and rank count, and reading its choice is how you diagnose a collective that is slower than the fabric allows.
Unlock all 32 answers · ₹2,000 / $25