Pidoku
14Distributed Inference
On this page

Distributed Inference

Module 1413 lessons~16h 30m

Lessons, in order

14.a Why Distribute (and When Not To)Distributed inference means using more than one GPU for one replica of a model. There are exactly three good reasons to do it, and one very common bad one: 1h 14.b Data ParallelismRun N complete copies of the model on N GPUs (or N groups of GPUs). Each request goes to one replica. Replicas never talk to each other. 45 min 14.c Tensor ParallelismThe most common way to split a dense model across GPUs. Understand the layout and you understand why it needs NVLink. 2h 14.d Pipeline ParallelismPipeline parallelism (PP) splits a model by layers. GPU 0 holds layers 0–19, GPU 1 holds 20–39, and so on. Each token's activations flow from one stage to the next, like a car down an … 1h 15m 14.e Expert ParallelismThis lesson is about the distributed-systems problem that mixture-of-experts models create: where the experts live and how tokens reach them. The model itself is 14.g; the kernels, load … 1h 15m 14.f Sequence and Context ParallelismTensor parallelism splits the weights. Context parallelism splits the tokens of one sequence. 1h 14.g Mixture of ExpertsThis lesson is about MoE as a model: what the router does, how 2026 models are built, and what that means for memory and bandwidth. Moving tokens between GPUs is 14.e; the kernels, load … 1h 30m 14.h MoE Serving and Expert Parallelism14.e explained how tokens travel between GPUs; 14.g explained the model. This lesson is the serving engineering on top: the kernels, overlap, load balancing and engine settings that decide … 1h 15m 14.i Long-Context Inference12.h owns the four costs of long context and how they scale; 12.g owns the attention designs that shrink them; 13.i owns KV compression and eviction. This lesson is about serving 128k to … 1h 30m 14.j Disaggregated Prefill/Decode9.e owns how a KV cache moves (links, GPUDirect RDMA, NIXL, Mooncake) and the transfer-versus-recompute arithmetic; 19.b owns vLLM's KV connectors and flags; 21.j owns the frameworks … 1h 30m 14.k KV Offloading and Transfer9.e owns the links and transfer libraries (GPUDirect, NIXL, LMCache, Mooncake); 19.b owns vLLM's connector flags; 13.i places offloading among the other KV-saving techniques; 14.l covers … 1h 15m 14.l Distributed KV Cache14.k owns tiering inside one server (HBM, CPU, SSD) and the fetch-versus-recompute sum; 21.h owns prefix-aware routing; 9.e owns the transfer libraries. This lesson is about the KV cache … 1h 14.m When More GPUs Make Things WorseThe counterintuitive lesson of this module. Read it before your next capacity request. Each parallelism is taught in its own lesson (14.b–14.j); this one collects the ways each of them … 1h 15m

About this module

When one GPU is not enough: why to distribute, data, tensor, pipeline, expert and context parallelism, mixture-of-experts models and how they are served, long context, disaggregated prefill and decode, KV cache offloading and distributed KV caches, and when adding GPUs makes things worse.

Lessons#

#LessonTime
14.aWhy Distribute (and When Not To)60 min
14.bData Parallelism45 min
14.cTensor Parallelism120 min
14.dPipeline Parallelism75 min
14.eExpert Parallelism75 min
14.fSequence and Context Parallelism60 min
14.gMixture of Experts90 min
14.hMoE Serving and Expert Parallelism75 min
14.iLong-Context Inference90 min
14.jDisaggregated Prefill/Decode90 min
14.kKV Offloading and Transfer75 min
14.lDistributed KV Cache60 min
14.mWhen More GPUs Make Things Worse75 min

Previous: Optimization · Next: Inference Engines

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in