mlprep
Hard18 min·2 rounds·Decoding & Parallelism

When do you use tensor parallelism vs. pipeline parallelism vs. data parallelism for LLM inference?

Written by the mlprep team · Updated

Interviewer Mode
Interviewer

You need to serve a 70B parameter model (FP16 ≈ 140 GB of weights) on a cluster of 80 GB GPUs. Walk me through how you choose between Data Parallelism, Tensor Parallelism, and Pipeline Parallelism — and how each one affects latency, throughput, and interconnect requirements.

Ready to compare your reasoning?
Interviewer

What changes when you serve a massive Mixture-of-Experts (MoE) model like DeepSeek-V3 or Mixtral? Why does Expert Parallelism enter the picture?

Ready to compare your reasoning?

The key takeaway unlocks after you reveal an expert answer.

Follow-up Questions to Test Yourself

Interviewers often pivot here once you cover the core concept.

  • Why does GQA with 8 KV heads create a natural ceiling for Tensor Parallelism at TP=8?
  • When serving a 70B model on an 8×H100 node, how would you decide between TP=8, DP=1 vs. TP=4, DP=2?
  • How does AllToAll communication in Expert Parallelism behave at small batch sizes vs. large batch sizes?

How confident do you feel explaining this?

Track your understanding or flag it to revisit before your next loop.

Related Questions