Contents
  1. I — Work and state
    1. What additional devices buy
    2. The numerical state that must fit
    3. Workers and ownership
    4. Turning points in distributed execution
  2. II — Communication
    1. Collectives preserve numerical meaning
    2. Communication on the critical path
  3. III — Training
    1. Different examples, matching updates
    2. Preserve the intended update
    3. Shard state, materialize for use
    4. Partition a layer's arithmetic
    5. Pipeline layers and microbatches
  4. IV — Placement and composition
    1. Physical links change the partition
    2. Compose an executable training job
    3. Partition sequence-dependent work
    4. Place experts under uneven demand
  5. V — Serving
    1. Replicas and cooperating serving groups
    2. Move cache between serving phases
  6. VI — Failure and recovery
    1. Detect missing execution progress
    2. Restore a coherent training state
    3. Restore capacity without inventing continuity
  7. VII — Measurement
    1. Find the useful scaling limit
  8. Check understanding
  9. Open questions
  10. Selected talks
  11. References
  12. Talk library
← All topics

Distributed Training and Inference

Distributed execution lets several devices train or serve a model together. The central design problem is deciding what each device owns, what it computes locally, and what it must obtain from others. A useful partition can make an otherwise impossible workload fit in memory, but every new dependency can also introduce communication, waiting, and coordinated recovery. Understanding those dependencies is how you distinguish a larger system from a faster or more dependable one.

I — Work and state

What additional devices buy

Start with the outcome you need: enough memory to execute the workload, less time to complete training, or more serving requests completed within their latency requirements. These goals are related but not interchangeable. Replicating a server can increase aggregate throughput without reducing the execution time of one request; partitioning a model can make it fit while adding communication to that request.

A device here is a numerical accelerator, usually a graphics processing unit, or GPU. A node is a machine containing one or more devices. Their combined memory is not automatically one equally accessible address space: workers must arrange access to remotely held values. Scale-up usually means enlarging resources within a machine or tightly connected system; scale-out adds machines. State the boundary explicitly, because those labels alone say little about communication cost.

A November 2025 multi-node inference study illustrates the distinction. For its fixed Llama 3.1 70B workloads, vLLM latency improved from four to eight GPUs, then generally flattened or increased. The system had four A100 GPUs per node, NVLink within nodes, and Slingshot-11 between nodes. This measured batch completion, not online tail latency. More arithmetic capacity did not reliably shorten the complete execution once communication became consequential.

The numerical state that must fit

A tensor is an indexed numerical array with a shape and element type. Model parameters are learned arrays. A forward pass applies them to inputs and produces intermediate activations. During training, a loss assigns a numerical penalty to the predictions. Backward computation produces gradients, derivatives describing how parameter changes affect that loss. An optimizer uses them to update parameters and may retain optimizer state, such as moving averages of earlier gradients. These arrays have different lifetimes and need not share the same device. From recorded text to parameter updates explains the learning process.

Serving keeps parameters fixed but introduces another growing allocation. Prefill processes the known input positions; decode advances the generated continuation. A key-value cache, or KV cache, retains attention representations derived from processed positions so they need not be recomputed. It is numerical request state, not the token text itself. See Prefill and decode and The KV cache for their mechanisms.

Ownership and lifetime identify which allocation a partition can reduce.
StateLogical ownerLifetime and growth
ParametersModelPersistent; grows with model size and representation width.
Optimizer stateTraining update processPersists across updates; depends on optimizer and parameter count.
GradientsCurrent updateRetained through aggregation or accumulation; storage depends on the execution policy.
ActivationsCurrent examples and operationsIntermediate results; retained for backward use or recomputed.
KV cacheRequests and compatible shared prefixesDepends on active sequences, retained positions, architecture, and cache format.
Workspaces and communication buffersRuntime operationsPersistent or temporary; can create peaks beyond the model's stored arrays.

Memory feasibility concerns the peak simultaneous allocation, not the sum of parameter shards alone. For example, vLLM profiles non-KV consumption before assigning remaining capacity to caches. Allocator-reserved memory also differs from live tensor storage; adding both can double-count bytes. Keep a ledger of actual allocations and transient peaks, using the distinctions in Where operands live.

Workers and ownership

A worker executes an assigned portion of the job, commonly as a process controlling a device. A process group identifies participants that communicate together. A worker's rank identifies it within that group; the group's size is its world size. A communicator supplies the communication context for those participants. Rank is not a permanent machine identity: membership changes can assign new ranks.

Replication keeps equivalent copies; sharding assigns portions to owners. Sharded storage need not imply partitioned arithmetic: execution may gather the parameter shards.

The main parallelism axes divide different things.
AxisWhat is dividedWhat connects workers
Data parallelismExamples processed by model replicasGradient contributions for corresponding parameters.
Tensor parallelismArithmetic inside a layerOperands, output pieces, or partial sums.
Pipeline parallelismThe ordered sequence of layersForward activations and backward gradients at stage boundaries.

These axes can coexist. A group may cooperate on each example through tensor and pipeline partitions while another group processes different examples. Before choosing a library setting, identify the owner of every required input and result. Missing local values explain the communication that the partition introduces.

Turning points in distributed execution

Distributed model execution combines two continuing lines of work: coordinating processors and arranging numerical work so that coordination is worthwhile. Earlier parallel-computing ideas supplied portable communication and whole-application reasoning. Deep-learning systems then developed partitions suited to large parameter arrays, repeated training updates, and stateful generation.

These developments addressed complementary constraints, not successive replacements for one universal design.

Complementary answers to distributed execution

  1. 1967AmdahlWhole-workload scaling limits: faster parallel arithmetic leaves other costs exposed.Sources & context

    Contributors: Gene Amdahl, IBM

    What changed: The paper includes sequential work, data management, irregular computation, and memory contention in the scaling question.

  2. June 1994MPI 1.0Portable communication contracts that implementations can optimize.Sources & context

    Contributors: Collaborating vendors, universities, laboratories, and industry

    What changed: Applications gained a common message-passing interface. The linked MPI 1.1 specification, dated June 1995, documents and clarifies the earlier standard.

  3. 2012DistBeliefPartitioned models and independently progressing replicas.Sources & context

    Contributors: Google

    What changed: Downpour SGD traded strict coordination for tolerance of variable worker progress. Gradients could use older parameters, and parameter-server shards could advance differently.

  4. November 2018 preprint; 2019 paperGPipeMicrobatch pipelines across layer partitions expand executable model capacity.Sources & context

    Contributors: Yanping Huang and colleagues, Google

    What changed: The NeurIPS paper combines computationally balanced stages, accumulated gradients, and rematerialization, with one update after the minibatch.

  5. September 2019 preprintMegatron-LMPaired within-layer partitions avoid unnecessary intermediate exchanges.Sources & context

    Contributors: Mohammad Shoeybi and colleagues, NVIDIA

    What changed: The linked March 2020 revision reports converged 8.3-billion-parameter models on 512 GPUs. Its scaling experiment enlarges the model rather than holding total work fixed.

  6. October 2019 preprintZeRORemove duplicated training state while retaining substantial local computation.Sources & context

    Contributors: Samyam Rajbhandari and colleagues

    What changed: Progressive state partitioning reduces persistent storage. Adding parameter sharding also requires parameter collection for forward and backward use.

  7. 2024Splitwise and DistServeSeparate serving phases, making KV movement and phase allocation explicit.Sources & context

    Contributors: Pratyush Patel and colleagues (Splitwise); Yinmin Zhong and colleagues (DistServe)

    What changed: Splitwise overlaps layerwise cache transfer with prompt computation. DistServe evaluates serving capacity against first-token and subsequent-token latency objectives.

Notice the shift from whole-workload limits and communication contracts to partitions of computation, training state, and serving phases. These approaches coexist; spacing is not to scale.

II — Communication

Collectives preserve numerical meaning

Point-to-point communication connects two participants. A collective operates across a group; a reduction combines corresponding values, for example by summing. The NVIDIA Collective Communications Library (NCCL) implements GPU collectives.

OperationResult ownership
All-reduceEvery rank receives the reduced array.
Reduce-scatterEach rank receives a portion of the reduced array.
All-gatherEvery rank receives the concatenated rank contributions.
BroadcastEvery rank receives the designated root's values.

Reduce-scatter then all-gather produces all-reduce. Gathering concatenates in rank order; it does not sum. NCCL requires matching counts and datatypes.

Synchronization enforces a progress or data-readiness dependency; it need not be a global barrier. The MPI nonblocking-collective contract separates initiation from local completion. Initiation returns a handle; completion establishes safe local buffer access. It generally does not establish that every other participant has finished. Participants must initiate collectives in the same order on a communicator. GPU frameworks have their own stream and completion rules, so apply their documented boundary before consuming or overwriting buffers. This extends the producer/consumer reasoning in Safe sharing and reuse.

Communication on the critical path

The interconnect carries values between devices or nodes. The critical path is the dependency chain that determines completion: shortening work outside it may leave elapsed time unchanged. Communication becomes exposed when a dependent operation is ready to run except for missing remote data. Issuing a transfer asynchronously creates an opportunity for overlap, not proof that useful work overlaps it.

Tmessageα+SBT_{\text{message}} \approx \alpha + \frac{S}{B} Here α\alpha is startup latency in seconds, SS is payload size in bytes, and BB is effective bandwidth in bytes per second. This simple uncontended model explains why many small transfers repeatedly pay startup cost, while large transfers emphasize bandwidth. It excludes producer delays and competing traffic.

Consider an example with a 2 ms producer operation, a 6 ms transfer, and 4 ms of independent computation. Serial execution takes 12 ms. Starting the transfer when its producer finishes, alongside the independent computation, takes 8 ms; 2 ms of transfer remains exposed after that computation ends. The transfer still consumes bandwidth for 6 ms. Overlap changes elapsed time without eliminating data movement.

The same transfer, a shorter execution

Example timings

Independent computation hides only part of the transfer.

Serialized execution012 msDuration 12 ms
Produce payload02 msDuration 2 msWithin Serialized execution
Transfer payload28 msDuration 6 msWithin Serialized execution
Independent computation812 msDuration 4 msWithin Serialized execution
Overlapped execution08 msDuration 8 ms
Produce payload02 msDuration 2 msWithin Overlapped execution
Transfer payload28 msDuration 6 msWithin Overlapped execution
Independent computation26 msDuration 4 msWithin Overlapped execution
Both schedules start transfer after its producer finishes at 2 ms. Overlap hides four of six transfer milliseconds, reducing completion from 12 to 8 ms. Parent spans measure elapsed execution; overlapping child spans must not be summed as elapsed time.
Read the diagram as text
  • Serialized execution. 0 to 12 ms; duration 12 ms.
  • Produce payload. 0 to 2 ms; duration 2 ms. Parent: Serialized execution.
  • Transfer payload. 2 to 8 ms; duration 6 ms. Parent: Serialized execution.
  • Independent computation. 8 to 12 ms; duration 4 ms. Parent: Serialized execution.
  • Overlapped execution. 0 to 8 ms; duration 8 ms.
  • Produce payload. 0 to 2 ms; duration 2 ms. Parent: Overlapped execution.
  • Transfer payload. Only its final two milliseconds remain uncovered. 2 to 8 ms; duration 6 ms. Parent: Overlapped execution.
  • Independent computation. 2 to 6 ms; duration 4 ms. Parent: Overlapped execution.

Strong scaling holds total work fixed while adding processors; weak scaling holds work per processor fixed. Amdahl's fixed-work argument exposes the work that remains unaccelerated. John Gustafson's 1988 Reevaluating Amdahl's Law instead considered a larger problem completed in approximately the same time. Its scaled-speedup expression, s+N(1s)s+N(1-s), uses processor count NN and serial fraction ss measured on the parallel machine. It changes the workload and denominator; it does not overturn the fixed-work limit.

Also distinguish bytes sent by one worker, aggregate traffic, and traffic crossing a limiting shared link. NCCL Tests reports algorithm bandwidth as operation data size divided by time. Its bus bandwidth applies a collective-specific normalization; for all-reduce on nn ranks, the factor is 2(n1)/n2(n-1)/n. That derived metric is not a counter of physical-link traffic.

III — Training

Different examples, matching updates

In synchronized data-parallel training, replicas process different examples from matching starting parameters. Workers average gradients for corresponding parameters, then apply matching optimizer updates. With matching optimizer state and settings, the replicas remain one logical model. PyTorch's DistributedDataParallel, or DDP, performs this gradient synchronization through all-reduce; it does not redistribute newly updated weights after every step.

Ordinary replication still stores complete parameters, gradients, and optimizer state on each worker. It distributes example processing, not that storage burden. A local batch contains the examples assigned to one replica; the global batch contains those contributing across replicas. Two workers processing four distinct examples each contribute eight examples to an update. Doubling workers while keeping the local batch fixed therefore changes the global batch.

Input coverage requires its own policy. PyTorch's DistributedSampler partitions indices by rank. For uneven dataset lengths, it can drop the tail or add indices to equalize partition lengths. Equal-length partitions thus need not mean exactly-once coverage. Shared shuffle seeds and calling set_epoch before each epoch's iterator are also part of its contract.

Gradient communication need not wait for every layer. DDP groups gradients into buckets and starts a reduction when a bucket is ready during backward computation. Larger buckets amortize startup; waiting for their last gradient can delay overlap. Reductions follow consistent bucket order across ranks, and required reductions finish before synchronized gradients reach the optimizer.

Horovod made communication and integration a joint concern. Alexander Sergeev and Mike Del Balso's February 2018 Uber paper wrapped gradient averaging in an optimizer interface and introduced Tensor Fusion to pack ready, same-type tensors into larger reductions. It built on existing ring-all-reduce work, rather than inventing the algorithm. Cross-worker timelines revealed why reducing many small arrays separately could squander otherwise parallel computation.

Preserve the intended update

A microbatch is a smaller scheduled portion of a batch. Gradient accumulation combines several microbatch contributions before an optimizer update. It can reduce activation residency and, when intermediate synchronization is suppressed, communication frequency. Preserving the intended update requires fixed parameters during accumulation, correct normalization, and accounting for batch-dependent operations. It is not enough merely to process the same number of examples.

L=rj=1nrr,jrnrL=\frac{\sum_r\sum_{j=1}^{n_r}\ell_{r,j}}{\sum_r n_r} For a token-mean objective, nrn_r counts scored, non-padding tokens on rank rr across the accumulation window, and r,j\ell_{r,j} is one token's loss. Framework gradient averaging and accumulation scaling must produce this denominator.

For example, two tokens with mean loss 1 and six with mean loss 3 produce a global mean of (2×1+6×3)/8=2.5(2\times1+6\times3)/8=2.5, not the unweighted mean 2. The shorter contribution must not receive equal weight merely because it occupied one worker or microbatch.

Bulk-synchronous parallel computation, proposed by Leslie Valiant in 1990, separates local computation, communication, and progress boundaries into supersteps. It provides a useful way to reason about waiting, without requiring every collective to be a barrier. Synchronous training pays for slow participants because the next update needs their contributions.

DistBelief's Downpour stochastic gradient descent used parameter servers: workers that held parameter shards and applied incoming gradient updates. Replicas independently fetched parameters and returned gradients, so others could continue when one failed. But those gradients could use older parameters, and server shards could advance differently. This staleness changes which contributions reach each update. It is a change to the learning process, not merely faster synchronized accumulation. Training schedules covers changes to the update policy.

Shard state, materialize for use

Replication wastes capacity when every worker holds state that only needs one owner during an update. Zero Redundancy Optimizer, or ZeRO, progressively removes that duplication. Workers still cooperate on the same logical parameters, but each retains and updates an assigned portion of training state.

ArrangementPersistently partitioned state
Replicated data parallelismNone of the principal model states.
ZeRO stage 1Optimizer state.
ZeRO stage 2Optimizer state and reduced gradients.
ZeRO stage 3Optimizer state, gradients, and parameters.

The original ZeRO analysis used Adam, an optimizer retaining two arrays of gradient statistics, with different numerical precisions for different state. Parameters and gradients used 2 bytes each per parameter; a higher-precision master parameter copy and the two optimizer arrays used 4 bytes each. That totals 16 bytes per parameter before activations and workspaces. Sharding removes redundant copies, but parameter shards must be collected for forward and again for backward computation. Adding parameter sharding increased the modeled communication from 2Ψ2\Psi to 3Ψ3\Psi elements per step, where Ψ\Psi is parameter count. More transferred elements do not imply the same proportional increase in latency.

Fully Sharded Data Parallel (FSDP) keeps parameters sharded between uses. The FSDP2 configuration gathers each layer for forward and backward, then reduce-scatters gradients for shard-local updates. Other layers remain sharded; prefetching the next layer can overlap communication but increases simultaneous residency.

Both panels retain the same sharded ownership. Prefetch overlaps full next-layer residency with the current layer on both ranks. Ownership maps are not additional counted buffers; the schematic does not measure an allocation ratio.

Yanli Zhao and colleagues' 2023 PyTorch FSDP paper explains why framework integration matters: initialization can fail before sharding is established, and allocator behavior controls transient peaks. That paper describes an earlier implementation, not every FSDP2 detail. Its broader contribution is showing that a memory ownership plan must survive initialization and scheduling as well as steady-state storage.

Other allocations need other remedies. Activation recomputation, often called activation checkpointing, discards selected intermediates and regenerates them during backward computation. Offloading moves retained values to host memory and brings them back before use. These exchange storage for computation or transfers; neither is a durable restart checkpoint. Long-context training often needs them even after parameter sharding has succeeded.

Partition a layer's arithmetic

Tensor parallelism keeps the arithmetic itself divided. For a linear layer, rows of XX represent input vectors and columns of WW select output features. Splitting output features creates complete, independent output pieces. Splitting the dimension summed over creates incomplete contributions that must be added.

XRb×h,WRh×f,Y=XWX\in\mathbb{R}^{b\times h},\quad W\in\mathbb{R}^{h\times f},\quad Y=XW Output-column split: W=[W0 W1]W=[W_0\ W_1], so Y=[XW0 XW1]Y=[XW_0\ XW_1]. Contracted-dimension split: X=[X0 X1]X=[X_0\ X_1], W=[W0;W1]W=[W_0;W_1], so Y=X0W0+X1W1Y=X_0W_0+X_1W_1. Here bb counts input vectors, hh input features, and ff output features.

An elementwise nonlinearity transforms each value separately and can process complete output pieces locally. It cannot generally precede an unfinished sum: ReLU replaces negative values with zero, so ReLU(−1+2)=1 but ReLU(−1)+ReLU(2)=2. Megatron's multilayer perceptron, or MLP, applies a first matrix, an elementwise function φ, then a second matrix. Pairing a column-split first matrix with a row-split second matrix keeps the intermediate features local; only the final partial outputs need summing.

Keep complete features local; sum partial outputs

Example

The nonlinearity precedes the second product, not its final reduction.

A two-way MLP partition with even f. Wᵢ has shape h×(f/2); Vᵢ is the second matrix’s row block, shape (f/2)×h. Each local feature is complete before φ, so no intermediate gather is needed. Sum the b×h partial outputs; the final node denotes a mathematical result, not a coordinator.
Read the diagram as text
  • X: b×h.
  • H₀ = φ(XW₀): b×(f/2).
  • H₁ = φ(XW₁): b×(f/2).
  • P₀ = H₀V₀: b×h.
  • P₁ = H₁V₁: b×h.
  • Y = P₀ + P₁.
  • X: b×hH₀ = φ(XW₀): b×(f/2): column block W₀.
  • X: b×hH₁ = φ(XW₁): b×(f/2): column block W₁.
  • H₀ = φ(XW₀): b×(f/2)P₀ = H₀V₀: b×h: row block V₀.
  • H₁ = φ(XW₁): b×(f/2)P₁ = H₁V₁: b×h: row block V₁.
  • P₀ = H₀V₀: b×hY = P₀ + P₁: partial sum.
  • P₁ = H₁V₁: b×hY = P₀ + P₁: partial sum.

Distributed linear algebra already treated ownership and operand movement together. Robert van de Geijn and Jerrell Watts' SUMMA, published in journal form in April 1997, arranged processors in a logical grid: workers retained output blocks while receiving input panels through row and column broadcasts. Blocking amortized repeated message startup. The same engineering tension remains: finer partitions reduce local arithmetic but can increase communication overhead. Equal partitions also require compatible dimensions; the chosen layout must specify how any remainder is handled.

Decode can make that tension acute because frequent exchanges accompany relatively small local operations. The multi-node study introduced earlier found that communication growth could offset reduced computation. Separately, changing reduction order can change floating-point results even when the algebra is equivalent. Compare against a defined numerical tolerance, following Specify the numerical result, rather than assuming either bitwise identity or that any discrepancy is acceptable.

Pipeline layers and microbatches

A pipeline stage owns consecutive layers. Forward activations move downstream; backward gradients return upstream. Microbatches overlap across stages. Pipeline bubbles are idle slots caused by dependencies, filling, draining, or imbalance.

GPipe updates once after all microbatches run forward then backward. Rematerialization rebuilds intermediates from boundary activations. Stages balance computation, not parameter counts. Batch normalization computes statistics per microbatch, so division can change the forward result.

Synchronous one-forward-one-backward (1F1B) alternates passes after warmup, retiring activations sooner while keeping parameters fixed until batch completion. In the Megatron paper's balanced-stage model, its fill/drain bubble matches GPipe's: (p1)/m(p-1)/m relative to ideal computation, not total elapsed time, for pp stages and mm microbatches. The schedule comparison show shorter activation lifetimes without earlier completion.

Earlier activation release, same completion time

F / B = forward / backward; subscript = microbatch. Each operation takes one slot, transfers are negligible, and parameters stay fixed until the update.

GPipe fill–drain0123456Stage AidleidleidleidleidleidleFFBBStage BidleidleidleidleidleidleFFBBA retained · peak 2012221B retained · peak 2001210Updateafter slot 6Synchronous 1F1B0123456Stage AidleidleidleidleidleidleFFBBStage BidleidleidleidleidleidleFBFBA retained · peak 2012211B retained · peak 1001010Updateafter slot 6

Counts are outstanding microbatches, not bytes: include an activation after its forward completes until its backward completes. All counts return to zero at slot 6.

Both schedules execute the same eight operations and update after slot 6. Stage B’s peak outstanding activation count falls from two to one; Stage A’s peak stays two. This unit-duration example illustrates lifetime, not measured speed or memory bytes.

PipeDream, published at SOSP in October 2019, pursued continuous overlap across minibatches. Its weight stashing retained versions so a stage's backward pass used its forward-pass weights. That did not ensure a common version across all stages, and even optional cross-stage version alignment left stale gradients. Original PipeDream therefore had different update semantics from synchronous 1F1B. Schedule names alone do not specify consistency.

IV — Placement and composition

Physical links change the partition

Topology is physical connectivity, including shared links; placement assigns logical workers to it. Multiple transfers may contend for one uplink even when every device has a fast local connection. Oversubscription means aggregate downstream demand can exceed upstream capacity. Bandwidth across a cut dividing the network constrains exchanges between its sides. Counting devices or summing their link ratings does not reveal that constraint.

Remote direct memory access, or RDMA, supports transfers into registered remote memory without ordinary application-level copying at the receiving endpoint. GPUDirect RDMA lets a network adapter exchange payloads directly with GPU memory over PCI Express, or PCIe. Software still registers memory, initiates work, and manages lifetimes. GPU–network-interface affinity means choosing devices with suitable connecting paths: traffic through PCIe switches, CPU I/O infrastructure, or links between CPU sockets has different costs and support constraints. This illustrates nonuniform memory access, or NUMA: equally sized resources need not be equally close.

Collective algorithms choose routes for the same numerical contract. NVIDIA's NCCL 2.4 account describes bandwidth-efficient rings whose latency grows with participant count, complementary trees with logarithmic latency, and hierarchical arrangements combining within-node and between-node operations. Message size and topology determine the useful choice; no route is universally fastest.

NCCL PXN supplies a concrete topology-aware example. NVIDIA's February 2022 account describes moving payloads over NVLink to an intermediate GPU, then through that GPU's network interface controller, or NIC. In a rail-optimized arrangement, corresponding NICs across servers share a leaf switch. Choosing the destination's rail can avoid higher-level spine switches. An extra local hop can therefore simplify the external path. The Crusoe networking talk applies this reasoning to multi-GPU training; the internal hop must not be omitted when describing its external one-leaf path.

Highlighted routes carry the same payload between the same endpoints. PXN uses an intermediate local GPU and its NIC to avoid the spine in this rail-optimized arrangement; unhighlighted connections are schematic.

Close placement improves communication opportunities but can concentrate failure exposure. A failure domain groups resources affected by a shared failure, such as one node or zone. Spread complete independent replicas across appropriate domains when availability requires it; spreading individual shards is not equivalent to preserving a complete surviving replica. Hard placement constraints can also leave work unscheduled.

Compose an executable training job

A device mesh is a logical arrangement whose dimensions identify cooperating groups. Fix all coordinates except one to identify a group along that dimension. PyTorch's DeviceMesh manages these memberships and communicators; the logical arrangement does not establish physical connectivity.

For an example mesh with two data replicas, two pipeline stages, and two tensor workers per stage, write coordinates as (data, pipeline, tensor). Each coordinate is 0 or 1.

With pp pipeline stages, tt tensor workers, dd data replicas, mm microbatches and bb examples per microbatch, device count is ptdptd, global batch bmdbmd. Only data replicas multiply examples. State sharding can reuse an existing mesh dimension.

Eight workers, two example subsets

Coordinates: (data, pipeline, tensor). Each outlined row is a tensor group working on the same examples.

Data replica 0 · example subset A

Pipeline stage 0
(0,0,0)(0,0,1)

↓ Forward activations · ↑ Backward gradients
Corresponding tensor partitions across stages

Pipeline stage 1
(0,1,0)(0,1,1)

Data replica 1 · example subset B

Pipeline stage 0
(1,0,0)(1,0,1)

↓ Forward activations · ↑ Backward gradients
Corresponding tensor partitions across stages

Pipeline stage 1
(1,1,0)(1,1,1)
Data groups combine gradients for matching parameter portions
Pipeline, tensorData replica 0Data replica 1
0, 0(0,0,0)(1,0,0)
0, 1(0,0,1)(1,0,1)
1, 0(0,1,0)(1,1,0)
1, 1(0,1,1)(1,1,1)

2 × 2 × 2 = 8 devices. Global batch = b × m × d = 2bm examples. Pipeline and tensor workers cooperate on each subset; they do not multiply it.

Logical group membership does not specify physical links. Each data group combines gradients for corresponding parameter portions; state sharding may reuse a mesh dimension.

One update follows those memberships: assign different example subsets to data replicas; carry each subset through tensor computations and pipeline stages; return backward contributions; combine corresponding gradients across data replicas; then update the owned parameters. Group initialization, matching model state, and compatible collective order are prerequisites, not consequences of having the right total device count.

Gang scheduling coordinates admission for processes that need to run together. Kueue distinguishes aggregate quota from physical fit: eight available GPUs across two four-GPU nodes cannot satisfy one Pod requiring eight GPUs on one node. A readiness timeout can requeue partially ready work, but does not prove that its model collectives execute. Admission, placement, initialization, and execution readiness are separate gates.

Operational inputs matter too. Krea described queue resource counts becoming stale as nodes entered maintenance; Snorkel described training waiting on shared-filesystem reads. These are different ways to starve an otherwise valid partition. Establish memory fit first, place frequent exchanges on suitable links, verify group execution, then measure whether input delivery sustains it.

Partition sequence-dependent work

Parameter sharding can leave long-context training limited by activations. The long-context training talk illustrates this shift: reducing model-state memory did not remove attention's allocations. The next partition must target sequence-dependent work rather than repeat the parameter-storage optimization.

Attention uses queries to match keys, then combines associated values; an attention head performs one such learned interaction. Matching and transmitted content supplies the model explanation. Dividing query positions does not make the required remote keys and values disappear, and their availability does not remove causal masks.

Some operations can run separately at each token position; attention also needs information from other positions. Megatron's terminology reflects that distinction. It calls partitioning selected activations in token-local operations, specifically Dropout and LayerNorm, sequence parallelism. Its context parallelism partitions inputs and activations across positions while exchanging the remote keys and values needed for attention. Other systems use sequence parallelism more broadly, so name the tensor axis and operation as well as the label.

DeepSpeed Ulysses (2023) uses all-to-all exchanges: each worker sends different slices to different peers. Position-partitioned queries, keys, and values become head-partitioned for full-sequence attention. A second exchange returns outputs to position ownership.

Ring Attention, introduced by Hao Liu, Matei Zaharia, and Pieter Abbeel in October 2023, instead retains local query blocks while circulating key/value blocks and accumulating attention contributions. Transfer can be hidden when block computation lasts at least as long as the corresponding communication. Faster arithmetic relative to the interconnect can therefore require larger blocks to maintain overlap. Increased executable sequence capacity still does not establish useful long-context behavior in a model.

Move head slices or circulate context

Ulysses · exchange position/head slices, then restore position ownership

SliceInput position ownerAfter all-to-all: attention ownerAfter all-to-all: output owner
A/H0U0U0 · A+B, H0U0
A/H1U0U1 · A+B, H1U0
B/H0U1U0 · A+B, H0U1
B/H1U1U1 · A+B, H1U1

Each attention owner has all positions for its head subset. It applies the mask locally; the second exchange returns outputs to their original position owner.

Ring Attention · one rotation of paired K and V blocks

Queries stay local as paired key/value blocks circulateR0 sends KV A to R1, R1 sends KV B to R2, and R2 sends KV C to R0. Queries A, B and C remain on R0, R1 and R2 respectively.R0Queries QA stay hereKVA before → KVC afterApply mask; accumulate attentionR1Queries QB stay hereKVB before → KVA afterApply mask; accumulate attentionR2Queries QC stay hereKVC before → KVB afterApply mask; accumulate attentionKV A →KV B →← KV C

Further rotations bring the remaining context. Partial attention results require normalization-aware accumulation, not an unweighted sum. Queries stay local; all context is not permanently gathered on every worker.

A/B/C are position blocks; H0/H1 are head subsets. Both methods preserve attention masks. Their different worker counts explain ownership, not relative performance.

Place experts under uneven demand

A mixture-of-experts, or MoE, layer contains several learned subnetworks called experts. A learned router selects a subset for each token position. Total parameter capacity can therefore exceed the parameters activated for one token. Experts need not have clean human-readable specialties, and sparse arithmetic does not guarantee low distributed latency.

With expert parallelism, experts live on different workers. Dispatch sends token representations to selected destinations; return traffic brings expert outputs back for weighted combination at their original positions. All-to-all is useful because each destination needs a different slice. Equal expert counts per worker do not imply equal load: many tokens may select the same few experts.

GShard, published as a June 2020 preprint, bounded expert buffers by limiting the tokens each expert could accept. Its top-two router selected at most two experts per token. If both destinations overflowed, the token followed the residual connection, the path carrying input around the expert computation, without receiving an expert contribution. This capacity policy changed which computation occurred; it is not a universal property of MoE.

FasterMoE addressed uneven demand differently. Jiaao He, Tiago Antunes, and Jidong Zhai's 2022 account describes expert shadowing: broadcast selected popular expert weights so other workers can execute that expert, trading extra weight movement and storage for less concentration of token work. A performance model guides the choice. Its topology-aware expert-selection proposal is a separate intervention because it changes which expert is chosen, not merely how unchanged results travel.

Bring expert weights to some of the work

Weight copy: W0’s E0 → W1’s shadow of E0
The original remains on W0; the shadow consumes additional weight storage on W1.

Token; fixed weightOriginal token → compute → outputWith shadow: token → compute → output
a; αaW1 → W0: E0(a) → W1:aW1 → W0: E0(a) → W1:a
b; αbW1 → W0: E0(b) → W1:bW1: E0(b) → W1:b (local)
c; αcW1 → W0: E0(c) → W1:cW1: E0(c) → W1:c (local)

Table arrows carry tokens and expert outputs; the separate arrow above copies weights. Every selected E0 contribution is computed once and combined at its original position with the same α. No router decision or overflow policy changes.

Three token positions select E0. Shadowing changes execution placement while preserving selection and combination weights. Added weight movement and storage do not imply a speedup or a complete training synchronization protocol.

Evaluate dispatch, expert computation, and return together under the actual token assignment. Faster transfers cannot compensate for arbitrarily concentrated expert work; replication cannot help without paying to make weights available. Token-to-expert routing is internal model execution, distinct from choosing a model endpoint or orchestrating several independent agents.

V — Serving

Replicas and cooperating serving groups

A serving replica is a complete executable model instance, potentially spanning several workers. Independent dense-model replicas can process different request batches without synchronizing training gradients. Within a tensor- or pipeline-parallel replica, however, workers cooperate on the same requests and must agree on the request positions and computation they are executing. The complete dependency group determines usable capacity.

For eight devices, these are alternative allocations only if both fit the model and leave sufficient request-state headroom.
AllocationRequest ownershipTradeoff
Four replicas of two devicesFour independently scheduled request groups and caches.More independent serving groups; each group has less aggregate memory.
Two replicas of four devicesTwo independently scheduled request groups and caches.Larger cooperating groups; different per-request arithmetic and communication costs.

Do not infer throughput from this count. Continuous batching determines how requests share execution, while KV capacity bounds their retained state. Decode repeatedly pays the communication pattern for successive tokens; pipeline concurrency across requests does not remove one sequence's dependencies. In some vLLM MoE arrangements, shared expert layers even couple otherwise separate data-parallel engines, requiring aligned forward passes and dummy work from idle participants.

Dispatch among equivalent replicas can consider both load and prefix locality: compatible cached state for the request's exact preceding tokens. NVIDIA Dynamo, a distributed-serving system, combines reusable prefix overlap with projected work. A less busy worker without that cached prefix can win over a cache-rich congested worker. Workers report cache creation and release to update the routing index; separate transfer mechanisms move state when needed. This chooses where an equivalent model executes, unlike model or provider selection.

The same boundary explains cross-datacenter reinforcement-learning rollouts. A rollout is a generated trajectory used for learning; a policy version identifies the generating model state, as introduced in Post-training. Nan Jiang's cross-datacenter design keeps tightly coupled training local while serving islands exchange versions and completed trajectories externally. Each island may still need fast internal links. Requests and responses name policy versions so independently advancing islands do not hide staleness.

Move cache between serving phases

Prefill–decode disaggregation assigns prompt processing and continuing generation to separately scheduled pools. The phase distinction matters because their resource demands differ: prompt work can delay ongoing decoding, while one allocation need not suit both phases. Separation removes some interference but introduces another queue and a transfer of the KV state needed to continue.

Splitwise's 2024 implementation overlaps layerwise cache transfers with later prompt computation; the destination waits on a completion semaphore. The study used BLOOM-176B and Llama2-70B with eight-way tensor parallelism. Figure 14 covered batched prompt sizes through 2048 tokens and reported roughly 8 ms of exposed transfer on A100 with 200-Gbps InfiniBand, and 5 ms on H100 with 400-Gbps InfiniBand. These are remaining delays after overlap, not total transfer durations or an isolated GPU-generation comparison; the figure does not separate model curves. DistServe additionally searched phase-specific parallelism and placement under memory, workload, and network constraints.

A handoff must preserve more than a model name. The documented NixlConnector compatibility checks include model dimensions, numerical types, attention backend, cache layout, software version, and protocol. Different tensor-parallel degrees or cache block sizes work only under supported conversion rules. Configuration compatibility is not proof that both sides loaded identical weight artifacts. The destination must establish that its required cache is complete and interpretable before dependent decode consumes it.

Source release is a separate obligation. vLLM 0.15.0 documents failure or recomputation after KV-load failure; recomputing introduces prompt work into the decode pool. It also documents temporary source-cache retention after some aborts until a timeout. Successful dispatch or receipt of cancellation therefore does not establish that both endpoints have released their allocations.

This snapshot separates numerical cache transfer from metadata and request scheduling. Decode waits for the required destination state; source buffers follow a backend-specific release condition. Layerwise overlap does not imply immediate cleanup or a universal speedup.

Disaggregation helps only when removed interference and improved allocation exceed transfer, conversion, buffering, and queueing costs. Short prompts can leave little interference to remove; an unsuitable pool ratio starves one phase or overloads the other. In the local heterogeneous-serving demonstration, unintended Wi-Fi routing made cache movement a bottleneck. The general lesson is to verify the path actually carrying the bytes, not merely the interfaces installed on the machines.

VI — Failure and recovery

Detect missing execution progress

A live process can be unable to complete useful model work. A straggler progresses unusually slowly; a watchdog monitors expected progress; a timeout reports that a completion expectation was missed. None alone identifies the cause. A participant may be delayed before entering communication, stuck on the GPU, executing an incompatible collective, or unable to reach peers.

PyTorch's March 2026 Flight Recorder account explains cross-rank diagnosis using group identity, collective sequence, type, shapes, datatypes, stacks, and scheduled/started/completed states. Align the same logical operation before comparing participants. The reporting rank can merely be the first to notice another participant's problem. Missing trace output remains unknown, not proof of a hardware fault.

These invented record patterns illustrate different next checks; neither is a complete incident diagnosis.
Aligned observationsDiscriminating next check
Rank 0 entered sequence 42; rank 1's latest available record is 41.Inspect rank 1's intervening execution and telemetry coverage.
Both entered sequence 42, but their tensor counts differ.Find the divergent shape or call path before blaming link speed.

Correlate logical records with physical placement. Krea reported cross-node InfiniBand and within-node NVLink telemetry revealing failures that ordinary GPU health views missed. MegaScale described stragglers that appeared normal in isolated matrix tests but slowed distributed execution. Shared node, link, and storage observations help explain why several ranks stall together. Use execution reconstruction to keep observations separate from inferred causes.

When communication cannot complete, NCCL supports detecting asynchronous errors and aborting the affected communicator. Recreating that communication context does not restore lost parameters, optimizer state, or request caches. Determine the recovery unit from the dependencies that can no longer proceed, then restore the corresponding application state.

Restore a coherent training state

A resumable checkpoint contains more than weights: optimizer, scheduler, random-generator, input-progress, and other state can determine the next update. A checkpoint is more than weights defines that inventory. Distribution adds a consistency requirement: all saved portions must describe corresponding progress. A completed-update boundary is a straightforward choice; saving mid-accumulation additionally requires preserving or deliberately discarding the unfinished contributions.

Asynchronous checkpointing separates copying a stable snapshot from writing it to storage. PyTorch's asynchronous example exposes staging and upload completion separately. It waits for staging before the next parameter mutation and for upload before another checkpoint or final cleanup. This permits overlap while protecting the copied state. Custom mutable buffers need equivalent protection, and staging consumes host memory and CPU resources.

In PyTorch Distributed Checkpoint, ranks write their assigned data and the coordinator finishes metadata after collecting write results. DCP’s coordinated exception handling prevents that finish when a participating operation reports failure. This establishes a reported-success gate, not independent shard-integrity verification or bounded detection of a process that disappears.

Publishing a checkpoint tells loaders that a save is available; crash durability concerns whether it survives a system failure. The DCP local filesystem writer, with its default file synchronization enabled, synchronizes data files, writes and synchronizes temporary metadata, then renames it to the final filename loaders open. A fresh incomplete directory without final metadata cannot be loaded through that path. However, replacing existing metadata does not guarantee that a crash leaves either the old or the new checkpoint available. Nor does the sequence establish a crash-durable transaction across the directory. Storage-backend guarantees and recovery tests must address those failures separately.

Protect the snapshot, then publish the save

Release mutable training state before storage publicationAt a coherent update boundary, create a protected snapshot. Staging completes before the next parameter mutation, which can overlap background writes. All rank writes must report success before the coordinator finishes. The default local filesystem path syncs temporary metadata and renames it to the final name.Event order → · schematic, not elapsed durationTrainingSnapshotRank writesPublicationCoherentupdate boundaryProtected stagingStaging completeNext parameter mutations may proceedRank 0 write + data syncRank 1 write + data syncAll writes reportedsuccessfulCoordinator finishWrite + sync temporary metadata → rename final metadata
  • Every participating write reports success: coordinator finish can proceed.
  • A participating operation reports failure: coordinated exception handling blocks finish.
  • A write is unfinished or a process disappears: completion remains unknown; this gate does not promise bounded detection.
The asynchronous staging contract and DCP’s reported-write gate are distinct from filesystem durability. This local-filesystem sequence assumes default synchronization. A fresh directory without final metadata is not loadable; replacing an existing save is not a crash-atomic transaction.

Restart policy is another layer. Under documented torchrun behavior, worker failure or membership change stops and reforms the worker group. Loading can reshard tensors into a different topology, but the application must revisit global batch size, random state, and input assignment. TorchData's StatefulDataLoader coordinates local loading subprocesses, not distributed ranks. Successfully loading every tensor therefore does not establish unchanged data coverage or the same update sequence after a world-size change.

Checkpoint frequency balances saving cost against repeated work after failure. John Daly's 2006 analysis treats useful computation, checkpoint writing, lost work, and restart separately. Its stochastic assumptions do not automatically fit correlated failures or asynchronous staging. Measure your saving and recovery costs rather than copying an interval formula without its failure model.

A bounded verification method is to compare an uninterrupted run with one stopped during staging or writing and restored from the last completed checkpoint. Check the selected update boundary, tensor and optimizer state, next input identities, and subsequent updates under declared numerical tolerances. Test changed membership separately: it changes more than the location of tensor shards.

Restore capacity without inventing continuity

Serving recovery has two separate goals: restore executable capacity and determine what happens to interrupted requests. Discovery tells dispatchers which endpoints exist; readiness concerns eligibility for work; draining stops new admission while allowing existing work to finish. Replacing failed workers can restore future service without recovering any particular stream.

A frontend can answer health checks while no model worker is available. Dynamo's development health reference allows this and offers active canaries: small inference requests that exercise the engine. They test more than process reachability, but not performance under representative load. Routing eligibility is another boundary. The operator implementation described here registers workers separately from Kubernetes readiness probes and leaves active health checks disabled by default. A readiness probe therefore does not establish that inference was tested or that routing will exclude an unusable worker; verify both mechanisms in the deployed version and configuration.

A recovery contract should assign these responsibilities separately.
BoundaryRequired result
Discovery and group managementRemove unusable endpoints; restore the configured cooperating group.
Execution readinessCompatible model state and communication can actually execute inference.
Request replayRetained input and continuation state are sufficient for the supported request type.
Client deliveryKnow which output can be repeated or continued without contradicting committed output.
Cancellation and cleanupConfirm backend work has stopped and transfer-owned resources are eventually released.

Replay uses retained request information to rebuild execution elsewhere. Dynamo's documented migration retains prompt and generated tokens, with attempt and sequence-length limits. It excludes multi-choice requests and structured-output continuation. In the latter, replaying tokens as context does not advance the replacement engine's constraint state machine—the state that restricts legal next tokens. Constrained decoding explains that additional state. A retained prefix is therefore not a universal continuation checkpoint.

The described Dynamo migrator records returned token IDs before forwarding them upstream, appends them to the replay request, and subtracts them from the remaining generation budget. Its boundary is tokens observed by the migrator, not client-acknowledged delivery. Rebuilding KV state may permit further generation, but this path neither transfers backend random-generator state nor establishes reconnect deduplication. Apply safe repetition contracts before promising an uninterrupted, duplicate-free stream.

Observed tokens are not acknowledged delivery

Record observed token IDs before forwardingOriginal engine sends token IDs to the migrator. The migrator appends observed IDs and accounts for their count before forwarding to the client. Client receipt remains unknown at interruption. On a later migratable error, the migrator sends retained prompt, continuation and remaining budget to a replacement engine, which rebuilds KV.Original engineMigratorClient boundaryReplacement engineReturned token IDsRetain k observed tokensAppend to replay contextRemaining budget: n − kForward upstreamInterruption:receipt unknownMigratable errorPrompt + observed continuation + budget n − kRebuild KV from contextGenerate continuation

Observed tokens condition the replacement; they are not automatically re-emitted as a prefix. This path carries neither backend random-generator state nor a client acknowledgment cursor. It does not establish identical samples or reconnect deduplication, and structured-output continuation needs additional constraint state.

The described Dynamo migrator records returned IDs before forwarding upstream. On a migratable error, replay uses its observed continuation and remaining generation budget; client receipt at interruption is a separate, unknown boundary.

Cancellation has a similar boundary. Linked request contexts can propagate a stop signal, but the engine must observe it and abort computation. Dynamo's cancellation metric counts received signals, not confirmed engine aborts. During an interrupted cache transfer, retained source blocks can outlive the signal. Recovery tests must observe execution and resource release as well as control messages.

VII — Measurement

Find the useful scaling limit

Choose a feasible baseline before calculating speedup. If one device cannot execute the model, compare against a credible multi-device configuration rather than an imaginary single-device time. Freeze the model, precision, input distribution, output policy, and semantic requirements. Then change the smallest partition or placement decision predicted to shorten the critical path. Measure completed work, not submission, and benchmark the workload, not one convenient tensor shape.

Each proposed optimization needs a mechanism-level prediction and an end-to-end acceptance measure.
ChangeInspectAccept only when
Larger gradient bucketsReadiness delay, message count, exposed reductions.Completed updates improve with intended normalization unchanged.
Earlier parameter prefetchGather overlap and peak simultaneous residency.Useful execution improves without exceeding memory.
Higher tensor-parallel degreeLocal operation sizes and repeated communication.The fixed workload completes sooner, not merely on more devices.
Separate serving phasesInterference removed, transfer tail, and both queues.More requests meet the declared latency requirements.
Different checkpoint intervalSaving cost, lost work, and recovery duration.Useful training completion improves under the relevant failures.

For training, separate step throughput from completion at a quality target. MLPerf Training measures wall-clock time to a specified quality on a specified dataset and repeats runs to account for variability. Increasing the global batch changes the learning experiment unless deliberately controlled. Production completion also includes checkpointing and recovery; MegaScale's coordinated diagnostics, node replacement, and checkpoint restore illustrate work omitted by a healthy-step benchmark.

For serving, define goodput here as completed requests satisfying configured latency objectives per benchmark second. State offered load, prompt/output distributions, errors, and completion accounting. Time to first token, or TTFT, needs a start and first-content boundary. Average time per output token, or TPOT, describes pace after the first token; it is not the distribution of individual gaps. AIPerf calls its per-request average ITL and separately reports inter-chunk gaps. Its request-latency boundary ends at the last content response, which need not be a later terminal event. Latency compliance also does not establish answer correctness.

Use per-rank progress, peak memory, transfer measurements, imbalance, and failure behavior to explain the result. Network microbenchmarks help isolate a mechanism, but the final question remains whether the model workload finishes usefully sooner. More parallelism stops helping when its communication, coordination, or recovery costs outweigh the declared gain. Full cost attribution belongs to AI Cost and Performance Engineering; the execution decision begins with ownership and ends with completed outcomes.

Open questions

  1. Elastic recovery needs a contract for more than tensor resharding. Changing membership also changes input assignment and potentially batch composition. Progress would mean tested preservation of declared data coverage and update semantics, including unfinished accumulation and application state.

  2. Portable stream recovery requires agreement on committed output and continuation state across the client, migrator, and engine. Token replay alone misses constraint machines and delivery acknowledgements. Progress would include explicit replay boundaries and failure tests covering disconnects, partial transfers, and cancellation.

  3. Automatic partition selection must predict transient memory and exposed communication under changing workloads, not just static parameter fit. Useful progress would be a placement policy whose predictions remain calibrated across prompt lengths, contention, and hardware changes, with safe responses when estimates fail.

  4. Sparse expert placement must respond to demand without making weight movement more expensive than the congestion it removes. The hard boundary is between relocating unchanged computation and changing expert selection. Progress would compare both under controlled routing distributions and report end-to-end completion alongside memory and traffic.

Follow the curated reading path through the speakers and demonstrations behind this entry.

20 min

AI Engineer World's Fair 2025 · 2025

Hacking the Inference Pareto Frontier

Kyle Kranen

Cited in this entry

Develops the interaction among phase separation, worker ratios, cache locality, and queueing, with workload-dependent tradeoffs rather than a universal disaggregation prescription.

Watch talk

Explore more talks

The rest of the library, beyond the curated path. Cited talks support this entry; reviewed transcripts were processed in full. Metadata candidates have not been reviewed as sources or verified as topic members.

11 matching talks

TalkSpeakerEventYear
Alex CheemaAI Engineer Europe 20262026
Mark MoyouAI Engineer World's Fair 20242024
Rhythm Garg, Linden LiAI Engineer Code 20252025
Walden, Carter, Tanay, Alex Atallah, NavAI Engineer World's Fair 20262026
Philip Kiely, Yineng ZhangAI Engineer World's Fair 20252025
Daniel Kim, Daria SobolevaAI Engineer World's Fair 20252025
Dylan PatelAI Engineer World's Fair 20242024
Lachlan Ainley, Humza IqbalAI Engineer World's Fair 20242024
Nader Khalil, Alex Cheema, Matthew Berman, Ahmad Osman, Joseph NelsonAI Engineer World's Fair 20262026
Joe FiotiAI Engineer World's Fair 20252025
Sander DielemanAI Engineer Europe 20262026

References

Coverage and source review
Processed transcripts
16 processed in full · 5 in the curated path
Automated source review
Passed
Metadata candidates
0 unreviewed; not verified topic membership
Corpus version
1bd8e407b26a07b33815594e1b2db5f41827119a2b3cb6fbf240f9fc571fc767

Automated review checks source support; it is not publication approval.

A synthesis of selected conference talks and technical references. Citations link to the source material; they do not imply that every talk on this subject is included.

  1. vLLM 0.22.0: Parallelism and Scaling

    vLLM supports tensor- and pipeline-parallel inference, including one executable model spread across multiple nodes. Its example combines tensor parallelism of eight with pipeline parallelism of two on two eight-GPU nodes. After weights fit, available KV-cache capacity still constrains concurrent request state. The documented maximum-concurrency log is an estimate based on configured maximum request length. Multi-node execution requires consistent model paths and software environments.

  2. vLLM: Data Parallel Deployment

    vLLM replicates model weights across data-parallel engines to process different request batches, with an independent KV cache per engine. An engine can itself own multiple tensor-parallel GPU workers. However, MoE configurations combining data-parallel attention with shared tensor- or expert-parallel expert layers couple those engines: forward passes must align, and idle ranks may execute dummy forwards while other ranks have requests. Separate dense-model servers can instead operate independently behind an external request balancer.

  3. LLNL: Introduction to Parallel Computing Tutorial

    Distributed-memory processors own local memory and communicate to obtain remote data; aggregate memory is not automatically one shared address space. Communication latency describes minimal-message delay, while bandwidth measures transferred data per time. Many small messages can become latency-dominated, and competing traffic can saturate a network. Strong scaling holds total work fixed while increasing processors; weak scaling holds work per processor fixed. Communication, synchronization, and insufficient work granularity can outweigh parallel computation. At a barrier, the slowest participating task determines when others can proceed.

  4. LLM Inference Beyond a Single Node: From Bottlenecks to Mitigations with Fast All-Reduce Communication

    The study held inference workloads fixed while increasing GPUs. For Llama 3.1 70B, vLLM tensor-parallel latency improved from four to eight GPUs but then generally flattened or increased. YALIS profiling from eight to sixteen GPUs showed communication increasing about 1.6× in a decode-heavy case, offsetting reduced computation. Its BF16 decode all-reduce example with batch eight and hidden width 8192 carries 128 KB. Hybrid tensor/pipeline execution reduced communication but did not necessarily reduce small decode matrix-operation time.

  5. PyTorch: Training a Classifier

    The CIFAR-10 example converts RGB images into normalized tensors and batches them as B×3×32×32, paired with B integer class labels. Learned convolution and linear weights transform inputs through convolution, ReLU, pooling, and flattening into B×10 logits. Cross-entropy compares logits with target classes; for one example it is -log softmax(logits)[target]. Training clears old gradients, runs the forward pass, calls loss.backward() to accumulate parameter derivatives by the chain rule, then optimizer.step() updates parameters using SGD with momentum. Fixed-parameter inference retains preprocessing and the forward pass, while target labels, training loss, backpropagation, and optimizer updates are unnecessary. The example uses no_grad() during testing.

  6. Mastering LLM Inference Optimization: From Theory to Cost-Effective Deployment

    The illustrated inference loop has a prefill stage for the prompt followed by incremental decoding, with different computation shapes.

  7. Mastering LLM Inference Optimization: From Theory to Cost-Effective Deployment

    Retaining key and value representations avoids repeating earlier prompt work during decoding, at the cost of GPU memory.

  8. ZeRO: Memory Optimizations Toward Training Trillion Parameter Models

    ZeRO addressed redundant training-state storage while retaining relatively large local computations. Its mixed-precision Adam accounting uses 16 bytes per parameter: FP16 parameters and gradients plus FP32 master parameters and two optimizer arrays. Activations and temporary buffers are additional. Its communication analysis replaces gradient all-reduce with reduce-scatter and updated-parameter all-gather without increasing modeled volume for optimizer-plus-gradient sharding. Adding parameter sharding requires parameter collection for both forward and backward computation, increasing modeled volume from 2Ψ to 3Ψ elements per step.

  9. vLLM memory profiling: allocations and transient peaks

    vLLM distinguishes memory outside its instance, PyTorch-controlled allocations inside it, and its allocations outside PyTorch. The profiling example separates model weights, transient activation tensors, NCCL memory and attention-backend buffers. Snapshots record current and peak framework allocations and device free memory; reserved framework memory differs from live allocated tensors. Non-KV demand includes persistent consumption and headroom for transient peaks, rather than weight bytes alone. Workspace and communication buffers can therefore reduce cache capacity even when the weights fit.

  10. Transformers: cache allocation versus retained history

    KV caches retain attention keys and values beyond model weights. DynamicCache grows as tokens arrive; StaticCache preallocates a maximum capacity, masking unused positions and potentially wasting memory and attention work on short sequences. Sliding-window or chunked layers stop growing at their retained-history limits even when the configured sequence capacity is larger. Offloading transfers most layer caches through CPU memory; quantized caches reduce precision but can increase latency for short contexts. Operational inference: allocated slots are a storage decision, not evidence that the model supports that many sequence positions. For ordinary full-history static caching, reserve sufficient slots for prompt plus intended output while independently enforcing the model's supported context limit. Windowed cache capacity must instead follow the architecture's retention rules.

  11. vLLM GPU worker: profiling available KV capacity

    The GPU worker profiles a model forward pass and, when configured, estimates CUDA-graph memory separately. Its available KV-cache budget subtracts profiled non-KV consumption and the applied graph estimate from requested memory. Later warmup compares actual graph-pool use with its estimate and reserves additional headroom in suggested allocations. This connects weights, activations, runtime buffers and graph storage to the space left for request state. An explicit cache-byte override skips normal capacity inference and requires a suitable value.

  12. NCCL: Creating a Communicator

    A communicator associates participating CUDA devices with unique ranks from zero through n−1. Reusing one device as multiple ranks in the same communicator is unsupported. Some network errors arrive asynchronously and leave operations unable to complete. NCCL documents polling asynchronous error status, aborting failed communicators, and recreating communication state. Its error table distinguishes invalid arguments that leave the communicator usable from errors fatal to the communicator.

  13. PyTorch: torchrun Elastic Launch

    Under torchrun's documented worker-failure policy, a worker failure stops and restarts all workers up to the configured restart limit. Node arrivals and departures also stop existing workers and form a new group with new rank and world-size assignments. Surviving workers are terminated during these events, so progress must be checkpointed. Node and agent failures additionally depend on job-manager policy.

  14. PyTorch: Getting Started with DeviceMesh

    DeviceMesh organizes devices into named dimensions and manages the corresponding process groups. The tutorial distinguishes shard groups from replica groups and illustrates a two-dimensional replicate-by-shard arrangement. Its hybrid sharding example performs FSDP within a host and data-parallel replication across hosts. Submeshes can select separate communication groups for composed parallelism while reusing communicators.

  15. PyTorch: Getting Started with Fully Sharded Data Parallel (FSDP2)

    FSDP2 shards parameters outside computation, all-gathers them before forward and backward use, reduce-scatters local gradients, and updates parameter shards with sharded optimizer state. Applying fully_shard to individual layers allows other layers to remain sharded while one executes. Prefetching can overlap the next layer's all-gather with current computation. Prefetching multiple layers increases resident memory; delayed CPU issuance can prevent overlap, and the first gather can remain exposed. Persistent shard size therefore differs from execution-time residency.

  16. Building Generative Image & Video Models at Scale

    Batch-level data parallelism eventually needs to be supplemented by model parallelism across chips.

  17. Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism

    Partitioning a linear layer's weight matrix by output columns produces independent output pieces, allowing an elementwise nonlinearity to run locally. Partitioning the contracted dimension instead produces partial sums that must be combined before a nonlinearity. Megatron pairs a column-partitioned first MLP matrix with a row-partitioned second matrix, avoiding communication between them and reducing the second matrix's partial outputs. Its MLP uses one forward all-reduce and one backward all-reduce. The original transformer block uses two of each. Activation recomputation saves retained intermediates by repeating forward work during backward.

  18. Mastering LLM Inference Optimization: From Theory to Cost-Effective Deployment

    The speaker places tensor parallelism typically within a node and describes pipeline parallelism as sequential handoff across nodes.

  19. GPipe: Efficient Training of Giant Neural Networks Using Pipeline Parallelism

    Yanping Huang and colleagues at Google introduced GPipe in a November 2018 preprint, followed by the 2019 NeurIPS paper. It partitions sequential layers using estimated computational costs and overlaps microbatches across stages. Gradients accumulate before a minibatch-level parameter update. Rematerialization retains boundary activations and recomputes internal intermediates during backward execution. The published demonstrations include a 557-million-parameter image model and a six-billion-parameter multilingual translation model, establishing capacity beyond one accelerator rather than merely proposing a schedule.

  20. NCCL: Collective Operations

    All-reduce combines corresponding array elements across ranks and returns the reduced array to every participant. All-gather instead concatenates each rank's contribution in rank order. Reduce-scatter reduces corresponding values, then distributes equal-sized portions of the result among ranks. Broadcast copies a designated root rank's buffer to all participants. Reduce-scatter followed by all-gather implements the result of all-reduce. NCCL requires matching counts and datatypes across participating ranks; violations can hang, crash, or corrupt data.

  21. MPI 4.1: Nonblocking Collective Operations

    A nonblocking collective initiates communication and returns a request handle; a separate completion operation establishes when its local buffers are safe to access or modify. Initiation alone does not establish completion. Local completion does not generally establish that other processes have completed. All participants must initiate collectives in the same order on a communicator. Nonblocking operations permit computation overlap, but that permission is not a measured performance guarantee.

  22. SUMMA: Scalable Universal Matrix Multiplication Algorithm

    Robert van de Geijn and Jerrell Watts describe distributed matrix multiplication on a logical two-dimensional processor grid. Workers retain their output blocks while receiving the required input panels through row and column broadcasts. Blocking and pipelined broadcasts reduce the cost of repeatedly initiating small transfers. The paper models communication as message startup plus a size-dependent transfer cost; equivalently, T_message ≈ α + S/B under the model's assumptions. This explains why dividing work more finely can reduce local arithmetic while increasing communication overhead.

  23. Accelerating Mixture of Experts Training With Rail-Optimized InfiniBand Networking in Crusoe Cloud

    Overlap can hide part of communication time, but the speaker reports that substantial network waiting remained in customer workloads.

  24. Validity of the Single Processor Approach to Achieving Large Scale Computing Capabilities

    Gene Amdahl's 1967 IBM paper challenged the assumption that adding processors would automatically accelerate complete applications. It emphasized sequential housekeeping, irregular computation, data management, and memory contention alongside parallel arithmetic. Improving only the readily parallelized portion leaves these other costs exposed. The contribution is a whole-workload argument: parallel hardware must improve the actual problem, including its coordination and data movement, rather than only a favorable computational fragment.

  25. Reevaluating Amdahl's Law

    John Gustafson's 1988 Sandia paper asked what happens when additional processors enable a larger problem within approximately the same execution time. If s is the serial fraction measured on the parallel machine and N is the processor count, its scaled-speedup model is s + N(1-s). This differs from measuring how quickly more processors finish one fixed problem. The paper connects the argument to scientific simulations whose parallel work grows with problem size while serial overhead changes relatively little.

  26. NCCL Tests: Performance

    NCCL Tests distinguishes algorithm bandwidth, the operation's data size divided by elapsed time, from a calculated bus-bandwidth normalization. For all-reduce over n ranks, its correction multiplies algorithm bandwidth by 2(n−1)/n; all-gather and reduce-scatter use (n−1)/n. These factors account for the communication work associated with the collective rather than changing the measured duration. The documentation separately identifies startup-dominated small messages and bandwidth-dominated large messages.

  27. PyTorch: Distributed Data Parallel

    DDP initializes replicas from a shared model state and groups parameter gradients into communication buckets. Backward hooks mark gradients ready; once a bucket is ready, its reducer launches asynchronous all-reduce to obtain mean gradients. Backward waits for reductions before exposing synchronized gradients to the optimizer. Identical starting state and averaged gradients allow each replica's local optimizer to maintain matching parameters. Reductions execute in bucket order across processes, not arbitrary readiness order. Poor alignment between bucket contents and gradient readiness delays communication launch.

  28. DeepSpeed: Zero Redundancy Optimizer

    ZeRO progressively partitions training state: stage 1 partitions optimizer state, stage 2 also partitions reduced gradients, and stage 3 also partitions parameters, gathering and repartitioning them during execution. Each process updates its owned optimizer partition. The tutorial's 1.5-billion-parameter GPT-2 example reports Adam-related state decreasing from 18 GB per device to 2.25 GB across eight data-parallel ranks, enabling a configuration that otherwise runs out of memory.

  29. Accelerate: Performing Gradient Accumulation

    For variable-length token tasks, the intended token-mean loss uses summed losses divided by the total number of scored, non-padding tokens across the accumulation window. Averaging per-batch means is different. The distributed example gathers the token count across processes, compensates for DDP's gradient averaging and Accelerate's accumulation scaling, and suppresses intermediate synchronization. Its published teaching fixture compares an accumulated update with a cloned model updated on the combined batch.

  30. PyTorch 2.9: DistributedSampler

    DistributedSampler assigns dataset subsets using replica count and rank. When dataset length is not evenly divisible, drop_last removes the tail; otherwise the sampler adds indices to equalize partitions. Processes must use the same shuffle seed. Calling set_epoch before constructing each epoch's iterator changes the shuffle order; otherwise the same ordering repeats. The documented sampler assumes a constant-size dataset with stable element ordering.

  31. Horovod: Fast and Easy Distributed Deep Learning in TensorFlow

    Alexander Sergeev and Mike Del Balso's February 2018 Uber paper addressed both distributed-training performance and the integration burden of TensorFlow's parameter-server approach. Horovod built on Baidu's ring-all-reduce implementation, subsequently using NCCL, and exposed gradient averaging through an optimizer wrapper with initial parameter broadcast. Cross-worker timelines revealed many small reductions in deep models. Tensor Fusion packs ready tensors of matching datatype into one buffer, reduces that buffer, and copies results back. The reported Inception V3 and ResNet-101 experiments showed improved scaling over the tested distributed TensorFlow baseline.

  32. A Bridging Model for Parallel Computation

    Valiant's August 1990 paper proposed bulk-synchronous parallel computation as an intermediate model connecting portable software with parallel hardware. A superstep combines local computation and message exchange; participants advance after completion is established for the participating components. The model separates processing, communication, and synchronization rather than assuming that additional processors alone determine execution time.

  33. Large Scale Distributed Deep Networks

    Google's 2012 DistBelief system combined partitioning within a model with multiple model replicas. Downpour SGD let replicas independently fetch parameters and send gradients to a parameter server whose state was itself sharded across machines. Other replicas could continue when one replica failed, but gradients could use outdated parameters, and independently updated server shards need not share an update count or ordering. This traded stricter coordination for tolerance of variable worker progress.

  34. PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel

    Yanli Zhao and colleagues' 2023 Meta paper presents FSDP as a PyTorch-native realization of ZeRO-inspired state sharding. Its engineering contribution includes integration with the tensor dispatcher and memory allocator, initialization when the complete model cannot fit on one GPU, and control of prefetched parameter allocations. These concerns matter because reducing persistent shard size alone does not prevent initialization or transient-memory failures. The paper evaluates the system on clusters of up to 512 A100 GPUs.

  35. Road to 5 Million Tokens: Breaking Barriers in Long Context Training — Max Ryabinin, Together AI

    Activation checkpointing reduces stored activations by recomputing them during the backward pass, but its configuration must control added computation.

  36. Road to 5 Million Tokens: Breaking Barriers in Long Context Training — Max Ryabinin, Together AI

    Transformer-block inputs can be moved off the GPU while unused and prefetched for backpropagation to reduce GPU activation storage.

  37. PyTorch: Numerical Accuracy

    Floating-point addition and multiplication are not associative, so changing operation order can change numerical results. PyTorch does not guarantee bitwise identity for mathematically identical computations, across platforms, or across releases. Batched and individually computed matrix operations can differ. Different reduction orders and accumulation precision can also change whether extreme inputs produce finite values.

  38. Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LM

    Pipeline parallelism assigns layers to devices and schedules microbatches through them. Flushes preserve consistent forward/backward weight versions. GPipe's all-forward-then-all-backward schedule retains activations for all microbatches; synchronous 1F1B bounds outstanding activations by pipeline depth but retains the same bubble time in the paper's model. Bubble time relative to ideal computation is (p−1)/m. Combined execution uses p×t×d devices and global batch b×m×d. The paper's fixed-resource experiments show that excessive tensor parallelism increases communication and shrinks local matrix operations; its cluster favored tensor groups within eight-GPU nodes and pipeline transfers across nodes.

  39. PipeDream: Generalized Pipeline Parallelism for DNN Training

    PipeDream's SOSP 2019 design overlapped different minibatches to avoid repeated pipeline flushing. Weight stashing retained parameter versions so a stage's backward pass used the version from that minibatch's forward pass. This did not guarantee that different stages used one common version. Optional vertical synchronization aligned versions across stages, but updates still applied gradients computed from older weights. Its one-forward-one-backward schedule therefore did not imply the same update semantics as synchronous GPipe.

  40. NVIDIA: Massively Scale Your Deep Learning Training with NCCL 2.4

    NVIDIA describes ring all-reduce as bandwidth-efficient but with latency growing linearly with participant count. Its double-tree implementation divides data across complementary trees to obtain logarithmic latency while retaining bandwidth efficiency. The hierarchical ring example performs reduce-scatter within nodes, all-reduces between nodes, then all-gather within nodes. Reported Summit experiments showed bandwidth degradation when communication crossed additional network-switch levels. NCCL selected rings when they provided greater bandwidth.

  41. NVIDIA GPUDirect RDMA: Overview and Design Considerations

    GPUDirect RDMA enables direct data exchange between GPU memory and a peer device such as a network adapter through PCI Express. Direct payload movement still requires software to identify and register the memory, arrange mappings, initiate transfers, and release resources safely. The documentation distinguishes paths through PCIe switches, CPU I/O infrastructure, and inter-socket links because those paths have different performance and support constraints. GPU memory registration can itself be expensive, motivating reuse of registrations.

  42. Doubling All2All Performance with NVIDIA Collective Communication Library 2.12

    NVIDIA's February 28, 2022 account explains PXN, which can move GPU data over NVLink to an intermediate GPU before sending it through that GPU's network interface controller, or NIC. This changes which physical links carry the payload. In a rail-optimized network, corresponding NICs across servers share a leaf switch; choosing an intermediate GPU on the destination's rail can avoid traversing higher-level switches. PXN also aggregates messages destined for the same remote node.

  43. Accelerating Mixture of Experts Training With Rail-Optimized InfiniBand Networking in Crusoe Cloud

    In the presented rail-optimized topology, NCCL PXN uses an internal NVSwitch hop to reach the appropriate rail without routing through the spine.

  44. Kubernetes: Pod Topology Spread Constraints

    A failure domain groups resources exposed to a common failure, such as one node or zone. Kubernetes illustrates why placing both replicas on one node permits a single node failure to remove the workload. Topology labels identify domains, and spread constraints govern placement across them. Hard constraints can leave a workload pending; preferences allow scheduling despite imbalance. Placement also affects traffic between zones and its latency.

  45. Kueue: All-or-nothing Scheduling

    Gang scheduling addresses workloads whose cooperating processes must run together: partially started jobs can occupy resources while waiting for missing participants. Kueue distinguishes reserving aggregate quota from checking physical placement. Eight available GPUs split across two four-GPU nodes cannot satisfy one eight-GPU Pod. Topology-aware admission checks node and domain capacity. A separate readiness timeout can evict and requeue partially ready workloads, releasing their quota.

  46. Infra behind Krea 2 - How to train and serve at scale

    Krea combined Kueue gang scheduling and workload priority with Kubernetes pod priority, but manually maintained resource quotas could become stale.

  47. Insights from Snorkel AI running Azure AI Infrastructure

    Treat low accelerator utilization as evidence of a pipeline bottleneck: investigate inter-node networking for multi-node jobs and data loading for single-node jobs, including shared-filesystem read throughput.

  48. Road to 5 Million Tokens: Breaking Barriers in Long Context Training — Max Ryabinin, Together AI

    Fully sharded data parallelism can reduce model memory while leaving attention activations as the limiting allocation.

  49. Megatron Core: Context Parallel Package

    Megatron distinguishes sequence parallelism that splits selected Dropout and LayerNorm activations from context parallelism that partitions inputs and activations along sequence positions. Token-local operations can operate on those partitions, while attention needs remote keys and values. The documented context-parallel implementation exchanges KV through ring point-to-point communication, gathers it again for backward computation, and reduces corresponding KV gradients. Context parallelism composes with tensor, pipeline, and data parallelism.

  50. DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models

    Ulysses starts with each worker owning different sequence positions. Before attention, an all-to-all redistributes queries, keys, and values so each worker receives the full sequence for a different subset of attention heads. After local attention, another all-to-all restores sequence-position partitioning for subsequent operations. The design targets long-sequence memory and communication constraints and can combine with ZeRO-3 for model-state sharding.

  51. Ring Attention with Blockwise Transformers for Near-Infinite Context

    Hao Liu, Matei Zaharia, and Pieter Abbeel's October 2023 paper distributes sequence blocks across devices. Each device keeps its query block while key/value blocks circulate around a ring, combining attention contributions incrementally. Communication can overlap block computation when computation lasts at least as long as the corresponding transfer. Consequently, faster arithmetic relative to the interconnect requires larger blocks to hide communication. The experiments demonstrate increased training sequence capacity using GPU and TPU configurations, combining Ring Attention with model-state sharding.

  52. From Mixture of Experts to Mixture of Agents … with Super Fast Inference

    Mixture of Experts (MoE) replaces a monolithic feed-forward network with multiple expert networks and routes each token to a subset.

  53. GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding

    GShard's mixture-of-experts layer selects at most two feed-forward submodules per token and combines their outputs using routing weights. Experts reside on different devices while other layers are replicated. All-to-all changes ownership from input groups to experts: each participant sends different slices to different peers, which assemble received slices. Uneven expert selection can overload a few buffers and leave other experts underused. GShard caps expert capacity; tokens overflowing both selected experts bypass expert computation through residual connections.

  54. FasterMoE: Modeling and Optimizing Training of Large-Scale Dynamic Pre-Trained Models

    The FasterMoE authors describe expert shadowing as an alternative to sending every token to an overloaded expert's original device: selected popular expert weights are broadcast so other workers can perform that expert's computation. A performance model guides when replication is worthwhile. The system also divides communication and computation into smaller groups to overlap them. Its topology-aware routing proposal additionally changes expert selection, which is a model-routing intervention rather than merely a different implementation of unchanged communication.

  55. From Mixture of Experts to Mixture of Agents … with Super Fast Inference

    Mixture of Agents (MoA) combines already pretrained LLMs through orchestration rather than requiring MoE pretraining.

  56. NVIDIA Dynamo: KV-Aware Routing

    Dynamo's router combines reusable prefix-cache overlap with projected active prefill and decode load. A worker with matching cached state can avoid repeated prompt computation, but a colder worker can win when the cache-rich worker is busier. Workers publish cache creation and release events to update the index. Worker selection and KV transfer are separate responsibilities: the router selects destinations while backend transfer mechanisms move state.

  57. Automatic prefix caching — vLLM

    A repeated shared token prefix can reuse stored KV state and skip computation for that prefix. Stable initial context favors reuse; unrelated prefixes cannot share those computations merely because their meaning is similar. The benefit is in prefill, not generating new decode tokens, so long outputs may limit the fraction of request latency saved.

  58. Taking Reinforcement Learning Cross Datacenter

    Keep the tightly coupled trainer on fast fabric, but distribute rollout serving islands across regions or providers.

  59. Taking Reinforcement Learning Cross Datacenter

    Publish immutable policy versions and make requested, acceptable, and returned versions explicit.

  60. Hacking the Inference Pareto Frontier

    Disaggregation lets prefill and decode use different resource allocations and avoids competition between their scheduling needs.

  61. DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving

    DistServe frames serving capacity around request rate subject to both TTFT and TPOT objectives and an explicit attainment target. Its 13B-model experiment compares decode-only batches with batches containing one additional prefill job: prompt work delays continuing generation, with stronger interference for longer prompts. The paper distinguishes execution time from latency that also includes queueing. Chunking prompt work reduces long decode stalls but can add repeated KV reads and prompt-processing overhead.

  62. Splitwise: Efficient Generative LLM Inference Using Phase Splitting

    Splitwise assigns prompt and decode machines together so cache transfer can begin as individual layers finish. Its implementation uses one-sided writes and a semaphore the destination waits on before proceeding. Layerwise transfer overlaps later prompt computation but introduces synchronization and interference; short prompts can favor serialized transfer. Figure 14 reports approximately 8 ms exposed transfer on its A100 setup and 5 ms on H100, using 200- and 400-Gbps InfiniBand respectively. These are remaining delays after overlap, not total transfer durations.

  63. DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving

    DistServe transfers KV state and the first token from prefill to decoding workers. Its placement search jointly considers phase-specific parallelism, instance counts, workload, memory, and network constraints. Variable prompt lengths can create pipeline imbalance. Cache-transfer demand grows with prompt length and arrival rate; constrained cross-node bandwidth changes feasible placement.

  64. vLLM: NixlConnector Compatibility Matrix

    NixlConnector checks compatibility during prefill/decode handshake, including software versions, model dimensions and dtype, attention backend, cache dtype, and transfer protocol. Different tensor-parallel degrees and block sizes are supported only under stated restrictions. Cache layout determines whether head splitting is possible. For MLA, cache is replicated across tensor-parallel workers rather than divided into KV heads. Runtime-generated quantization scales are unsupported because those scales are not transferred with the cache.

  65. vLLM 0.15.0: NixlConnector Usage Guide

    The guide distinguishes failing a request after KV-load failure from recomputing failed blocks on the decode instance. Recomputing can interfere with ongoing decoding by introducing prompt work. If an aborted request's decoder has not read the producer's cache, the producer releases those blocks after a configurable timeout, documented as 480 seconds by default. Cancellation can therefore leave source state retained temporarily.

  66. Hacking the Inference Pareto Frontier

    Disaggregation is workload-sensitive: short inputs reduce its scheduling benefit, extreme operating points may favor aggregation, and a poor worker ratio can create idle capacity or queues.

  67. Frontier AI at Home (literally)

    KV-cache transfer must be fast enough to overlap computation; otherwise communication adds a serial delay before decode.

  68. Flight Recorder: A New Lens for Understanding NCCL Watchdog Timeouts

    A PyTorch NCCL-watchdog timeout can result from CPU divergence, GPU hangs, incompatible collective arguments, or network and hardware problems. The reporting rank and timed-out operation need not originate the fault. Flight Recorder records collective type, sequence ID, tensor shapes and dtypes, call stacks, and scheduled/started/completed states. Diagnosis aligns records within each process group across ranks. Similar state mismatches can have different causes, requiring hardware signals and repeated-failure patterns.

  69. Infra behind Krea 2 - How to train and serve at scale

    Collect communication-fabric telemetry beyond basic GPU metrics, covering both cross-node InfiniBand and intra-node NVLink failures.

  70. MegaScale: Scaling Large Language Model Training to More Than 10,000 GPUs

    MegaScale monitors executor heartbeats, process status, logs, and network traffic. On detected failure, its driver suspends training across executors, runs diagnostics, replaces identified faulty nodes, and resumes from a checkpoint. Checkpointing first stages GPU state in host memory, then writes it asynchronously to distributed storage. Recovery reduces storage contention by having one worker read state shared by a group and broadcast it. The report also describes stragglers that appeared normal in isolated matrix benchmarks but slowed distributed execution.

  71. TorchSnapshot: Getting Started

    TorchSnapshot requires the application to identify stateful objects to capture, including models, optimizers, learning-rate schedulers, and custom progress state. Capturing its RNGState utility restores the supported global random-generator state. Distributed snapshots involve all ranks. Its experimental world-size changes support replicated objects and supported sharded tensors; other objects can only be restored by their saving rank. Tensor resharding therefore does not automatically make arbitrary application state elastic.

  72. PyTorch: Asynchronous Saving with Distributed Checkpoint

    Asynchronous checkpointing separates staging state into CPU memory from writing it to storage. The fully asynchronous example exposes distinct staging-completion and upload-completion futures. It waits for staging before the optimizer modifies parameters, allowing the copy to overlap intervening forward/backward computation without racing the next update. It waits for upload completion before queuing another checkpoint and before final cleanup. Background staging consumes CPU resources and additional memory.

  73. PyTorch: Distributed Checkpoint

    Distributed Checkpoint saves and loads from multiple ranks, producing multiple files and supporting load-time resharding into another cluster topology. Loading writes into storage allocated by the destination model. Its StorageWriter contract separates local planning, coordinator global planning, per-rank data writes, and coordinator finish. Finish receives write results from all ranks, writes metadata, and marks the checkpoint successful.

  74. PyTorch DCP utils.py: coordinated exception handling

    DCP's distributed all_reduce wrapper runs a local function on each rank and gathers either its result or a wrapped exception. The coordinator invokes the finishing function only when the gathered results contain no failures. Otherwise it broadcasts a CheckpointException, which participating ranks raise. Exceptions from the coordinator's finishing function are also propagated.

  75. PyTorch DCP filesystem.py: FileSystemWriter and FileSystemReader

    The local filesystem writer defaults to sync_files=True: data files are flushed and fsynced before their write results are returned. finish builds storage metadata from returned results, serializes .metadata.tmp, flushes and fsyncs it, then renames it to .metadata. The reader opens the final metadata filename, not the temporary file; a fresh interrupted save without final metadata therefore fails at metadata loading. finish does not independently reread shards or compare every planned item with returned results. Existing metadata is deleted before replacement, and the inspected path contains no parent-directory fsync.

  76. TorchData: Stateful DataLoader

    StatefulDataLoader supports mid-epoch state capture and restoration. Its default records yielded-batch progress and fast-forwards the sampler or dataset; custom state methods allow those components to preserve more precise state. It aggregates state across local data-loading subprocesses, explicitly not across distributed ranks. The documentation also warns that out-of-order batch delivery currently has no state-management guarantees.

  77. A Higher Order Estimate of the Optimum Checkpoint Interval for Restart Dumps

    John Daly's Los Alamos analysis separates useful computation, checkpoint writing, work repeated after failure, and restart time. Saving more often reduces expected lost work but consumes more execution time. It revisits the first-order useful-computation interval approximation sqrt(2δM), where δ is checkpoint duration and M is mean time between interruptions, then develops a higher-order model incorporating additional failure and restart effects. The decision is therefore a balance of measured saving cost and failure exposure, not simply a preference for frequent checkpoints.

  78. NVIDIA Dynamo 0.9.1: Fault Tolerance

    Dynamo distinguishes request recovery, worker health, overload handling, and infrastructure availability. Planned shutdown invalidates endpoints, stops new admission, optionally drains in-flight work, and cleans up resources. Unexpected worker loss is detected through service-discovery lease expiration; new requests then route to remaining workers. Cancellation propagates through request chains. The documentation identifies worker-failure migration tests and GPU/network fault injection as separate validation paths.

  79. NVIDIA Dynamo: Overall Architecture

    Dynamo separates worker health detection and discovery-based endpoint removal from Kubernetes workload management. The Dynamo Operator reconciles DynamoGraphDeployment resources. Grove-backed multinode deployments represent worker groups through PodCliqueSet and PodClique resources, with PodCliqueScalingGroup representing coordinated scaling. Request migration and cancellation handle in-flight requests separately from these infrastructure responsibilities.

  80. NVIDIA Dynamo: Health Check Reference

    A healthy frontend can return HTTP 200 even when its discovered worker list is empty. Worker health endpoints report notready before readiness and ready afterward. Optional active canaries send a backend-specific minimal inference request through the normal endpoint, exercising request handling and engine execution rather than only process reachability.

  81. Dynamo Operator: worker container defaults

    The inspected operator code configures separate startup, liveness and readiness probes for workers. Its comments explicitly state that Kubernetes worker readiness does not itself determine traffic eligibility: worker registration uses an external store and the transport does not use a Kubernetes Service. The default environment in this implementation sets active Dynamo health checks to false.

  82. NVIDIA Dynamo: Request Migration

    Dynamo can retain prompt and generated-token state for replay on another worker after failure. Migration is disabled by default and bounded by a configured attempt limit; exceeding a configured total-sequence-length limit disables tracking and migration. Multi-choice requests are unsupported because the migration path retains only one continuation state. Structured-output requests are also unsupported: replaying prior tokens as context does not advance a newly initialized constraint state machine, which can corrupt continuation. Migration duration metrics distinguish success, failure, and cancellation.

  83. Dynamo migration.rs: response tracking and stream recreation

    The inspected migrator tracks a response before returning it upstream: it appends returned token IDs to the retained request and subtracts their count from the remaining generation budget. On a migratable error it replaces the backend stream using that accumulated request rather than emitting the retained prefix again. Each new attempt keeps the request ID, links its context to the parent and checks whether the parent is stopped or killed before dispatch. Thus its replay boundary is tokens observed by the migrator, not a client acknowledgement cursor.

  84. NVIDIA Dynamo: Request Cancellation Architecture

    Frontend client disconnection cancels the request context, and linked child contexts propagate that cancellation downstream. Workers receive cancellation through control messages or connection loss, but their engine implementations must observe the context and stop computation. The runtime cancellation metric counts received signals, not confirmed engine aborts. Graceful stop does not invalidate results already in the stream; kill expresses a preference to avoid draining, with engine-specific support.

  85. CUDA C++ Best Practices Guide

    Kernel launches return before GPU work completes; CPU timing must account for completion. CUDA events record device timestamps when reached in a stream, and the example waits for the stop event before reading elapsed time. Extra synchronization can alter execution. Bandwidth is data transferred per unit time. Occupancy is active warps per multiprocessor divided by its supported maximum; registers, shared memory, and block size constrain residency, and higher occupancy need not improve performance. Amdahl's law bounds fixed-workload improvement by the fraction accelerated: unchanged work remains even if the optimized portion becomes arbitrarily fast.

  86. MLCommons: MLPerf Training Benchmark

    MLPerf Training measures wall-clock time to reach a specified quality target on a specified dataset. It repeats runs and aggregates results to account for variability. The Closed division constrains model choice to support comparable system measurements, while the Open division allows broader changes.

  87. AIPerf Metrics Reference

    AIPerf measures TTFT from request start to the first nonempty content response. Its metric named ITL is a per-request average: (request latency minus TTFT)/(output sequence length minus one), requiring at least two output tokens. It separately measures inter-chunk arrival gaps. The displayed request-latency formula ends at the last content response, so it does not independently establish a later terminal-event timestamp. Goodput counts requests satisfying configured SLOs per benchmark second; successful requests and errors have separate counters.

  88. Accelerating Mixture of Experts Training With Rail-Optimized InfiniBand Networking in Crusoe Cloud

    Validate network benchmark gains against time to train a particular model rather than treating microbenchmark improvement as the final outcome.

  89. Compute & System Design for Next Generation Frontier Models

    The speaker reports a ByteDance case in which removing a slow but nominally functioning GPU improved training throughput, illustrating the impact of stragglers in synchronous training.

  90. Frontier AI at Home (literally)

    The speaker reports that low-latency RDMA made fine-grained parallel inference practical across Macs by reducing repeated synchronization costs.

  91. Road to 5 Million Tokens: Breaking Barriers in Long Context Training — Max Ryabinin, Together AI

    Loss and MLP computations can require large sequence-length buffers even after attention memory is reduced.

  92. Hacking the Inference Pareto Frontier

    Route using both reusable prefix state and current worker load; maximizing KV match alone can increase queueing.

  93. MPI: A Message-Passing Interface Standard, Version 1.1

    MPI sought a portable, efficient interface for message-passing programs, giving application developers a common contract and vendors routines they could optimize. Its introduction describes collaboration among vendors, universities, laboratories, and industry, building on existing communication systems. The document identifies MPI 1.0 with June 1994 and MPI 1.1 with June 1995; the latter clarified and corrected the earlier specification.

  94. Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism

    NVIDIA's Mohammad Shoeybi and colleagues first submitted Megatron-LM in September 2019. The inspected March 2020 revision reports converged 8.3-billion-parameter models on 512 GPUs; its scaling-efficiency experiment enlarges the model rather than holding total work fixed.