Distributed and Disaggregated Inference

Multiple devices add communication, placement, queue and failure boundaries. A topology is justified only when its added capacity or phase isolation exceeds collective and KV-transfer costs for the declared workload.

Section 7 of 9 · 11 units · about 50 hours

0/11

By the end you can Defend single-node, replica, TP, PP, EP or disaggregated choices with a quantitative topology model, preserve request and KV lifecycle through cancellation or failure, and label every result as analytical, simulated, local-process or measured multi-device evidence.

Units

Build it

Mini project · about 12 to 16 hours

Disaggregated serving with owned handoffs and evidence labels

Extend sim/ with sharded, disaggregated and topology-aware serving plans and prove their handoffs preserve identity under faults. The evidence-labeled comparison ranks colocated against phase-separated serving and feeds gateway and capacity work.

  1. 1Extend sim/ with replica and tensor-parallel shard plans plus a per-rank ownership ledger, and check sharded forwards against an unsharded reference with own tests. Keep the ledger with replicated-head and over-budget rejection cases.
  2. 2Reproduce the Day 17 pipeline bubble timeline on CPU and extend it with expert skew and position-shard accounting, checking boundaries against the notebook experiment. Keep timelines and a case where skew outweighs byte counts.
  3. 3Build a per-layer communication ledger with a shared-link contention model, then sweep small-batch latency against memory capacity to surface a feasible plan that loses after startup. Keep the ledger and the losing plan.
  4. 4Implement deterministic cache-aware routing in sim/ with stated tie-breaks and compare it against load-only and predicted-waiting policies under skew and stale information, passing the TensorTonic routing problem. Keep traces and a hot-prefix loss.
  5. 5Add separate phase queues with a fixed-budget pool sweep and first-token against KV-ready traces, plus serialized and overlapped handoff timelines with bounded credits, slow-receiver backpressure, tier-restore comparison, heterogeneous service and reserve-aware resize. Keep traces and the break-even decision.
  6. 6Implement a versioned KV envelope with a mapping oracle and checksum plus incompatible-identity rejection, then replay cancellation, rank, transfer and duplicate faults with fencing and bounded retirement through a saturation-tested equal-budget comparison with ablations against hand ledgers. Keep fault traces and a negative regime.
What you hand in
  • Shard, ownership and communication ledgers with differential checks and the losing latency plan.
  • Routing, phase-pool and handoff evidence in sim/ with traces, break-even decision and fault cases.
  • Evidence-labeled comparison in reports/ with equal-budget goodput, utilization, traffic and cost plus tests.
How to check it
How it's graded

Shard and communication

Pass: Ownership and communication ledgers reconcile, sharded forwards match the unsharded reference, and the losing latency plan is kept.

Great: A second sharding or topology case is checked, and startup versus bandwidth terms are separated.

Routing and disaggregation

Pass: The router passes public cases plus own tie tests, and phase-pool traces show queueing, transfer and reserve costs.

Great: A hot-prefix counterexample explains the loss, and resize keeps only ready workers counted.

Handoff and evidence

Pass: Envelope, fencing and retirement tests pass, and the equal-budget comparison keeps saturation traces and a negative regime.

Great: Hand-ledger replay matches, and goodput, utilization, traffic and cost are labeled by evidence tier.

Resources