You must serve a DeepSeek-style mixture-of-experts model (hundreds of billions of parameters, 256 routed experts, MLA attention) for an agentic coding product. Explain why the large public deployments since 2025 use disaggregated prefill and decode with wide expert parallelism and data-parallel attention rather than tensor parallelism, and what new failure modes this design introduces.
Answer
Model answer, written in a candidate's voice
In short
- Sparse activation: each token touches only a few of 256 experts, so wide expert parallelism aggregates enough tokens per expert to keep matmuls efficient.
- MLA attention: tensor parallelism would replicate or repeatedly move compressed KV across shards; data-parallel attention keeps KV local per rank and frees memory for larger batches.
- Prefill and decode have different SLOs and communication needs: throughput-oriented all-to-all for prefill, low-latency CUDA-graph-friendly kernels for decode, so separate pools let each be tuned.
- KV cache must move between prefill and decode pools over RDMA or NVLink, for example with NIXL or Mooncake.
- Hot experts are replicated with EPLB and two-batch overlap hides communication behind compute.
- New failure modes: KV-transfer stalls, data-parallel stragglers and imbalance, a slow rank holding up all-to-all, prefill:decode ratio mismatch as traffic shifts, and a larger blast radius per deployment unit.
In full
The core reason is that the model is sparse and attention-heavy, so the parallelism should follow the data path rather than split every layer uniformly. With 256 routed experts, each token activates only a small subset, so a wide expert-parallel layout is needed to gather enough tokens per expert to make the matmuls efficient; tensor parallelism would instead shard every layer and add frequent cross-rank communication without fixing the per-expert batch problem. MLA makes the KV cache smaller than a naive cache, but it is still large enough that replicating it across tensor-parallel shards wastes memory, whereas data-parallel attention keeps KV local to each rank and leaves room for a larger batch. Prefill is throughput-oriented and benefits from all-to-all-style expert exchange, while decode is latency-sensitive and wants tight, CUDA-graph-friendly kernels, so separating the pools lets each side be tuned to its own SLO; the cost is that KV has to move between pools over RDMA or NVLink, for example with NIXL or Mooncake. Load imbalance is handled by replicating hot experts with EPLB and by two-batch overlap that hides communication behind compute. The new failure modes are KV-transfer stalls, data-parallel stragglers and imbalance, one slow rank holding up an all-to-all, prefill:decode ratio mismatch as traffic shifts, and a larger blast radius per deployment unit because correctness now depends on the handoff between pools as well as on the kernels themselves.
What a strong answer covers
- Sparse activation means each expert sees a small slice of the batch, so expert parallelism across many GPUs is needed to build large per-expert batches and use the matmul units well.
- Tensor parallelism would replicate the compressed MLA KV on every shard; data-parallel attention keeps KV per rank and frees memory for a larger batch.
- Prefill and decode want different communication modes and SLOs (throughput-oriented all-to-all for prefill, low-latency CUDA-graph-friendly kernels for decode), so separating them lets each be tuned; the KV cache then has to move between pools over RDMA or NVLink (for example NIXL or Mooncake).
- Expert load imbalance is handled by replicating hot experts (EPLB) and two-batch overlap hides communication behind compute.
- New failure modes: KV-transfer stalls, data-parallel stragglers and imbalance, a slow rank holding up an all-to-all, prefill:decode ratio mismatch as traffic shifts, and a larger blast radius per deployment unit.
Common mistakes
- Sizing memory from active parameters instead of total parameters.
- Assuming disaggregation always helps, even for small deployments where KV transfer and operational cost dominate.
Follow-ups
- How would you choose and adapt the ratio of prefill to decode GPUs?
- What do you monitor to catch one slow expert-parallel rank?