Elastic Training: Dynamic Scaling for Fault-Tolerant and Cost-Efficient Large Model Training
Abstract: Large-scale GPU clusters are inherently dynamic environments — hardware failures remove nodes, maintenance windows shrink…
Elastic Training: Dynamic Scaling for Fault-Tolerant and Cost-Efficient Large Model Training
Abstract: Large-scale GPU clusters are inherently dynamic environments — hardware failures remove nodes, maintenance windows shrink capacity, and multi-tenant scheduling continuously reshapes resource availability. Traditional distributed training, however, operates under a static assumption: a job requests a fixed number of GPUs at launch and cannot adapt when that allocation changes. This rigidity leads to two systemic inefficiencies: jobs crash entirely on node loss (even when most nodes remain healthy), and idle GPUs cannot be absorbed by running jobs. Elastic training addresses this by enabling training jobs to dynamically adjust their scale — continuing on fewer nodes after failures and expanding onto newly available capacity — without restarting from scratch. This article examines the elastic training problem from first principles, surveys the landscape of existing approaches, and provides a detailed analysis of SageMaker HyperPod’s elastic training implementation — a system that integrates Kubernetes-native workload management, PyTorch Distributed Checkpoint resharding, and operator-driven orchestration to deliver production-grade elastic scaling for foundation model training.
1. The Problem: Static Jobs in a Dynamic World
1.1 Why Clusters Are Inherently Dynamic
A modern GPU training cluster is not a stable, dedicated resource — it is a shared, failure-prone, constantly shifting environment. Three forces make this unavoidable:
Hardware failures continuously remove nodes from the pool. At the 16,384-GPU scale, the projected Mean Time To Failure is approximately 1.8 hours [1]; at 131,072 GPUs, roughly 14 minutes. Each failure, under a traditional fixed-size training regime, halts the entire job. (The failure taxonomy and detection mechanisms at this scale have been analyzed separately in our examination of health monitoring and automatic recovery — the present article takes failure frequency as a given and focuses on how training jobs should respond to the resulting resource dynamics.)
Multi-tenant clusters have fluctuating resource availability. In production environments, training, inference, and experimentation workloads share the same cluster. Inference demand follows diurnal traffic patterns — releasing capacity during off-peak hours and reclaiming it during peak. A training job locked at a fixed size cannot absorb freed GPUs and cannot gracefully yield resources when higher-priority workloads arrive [2].
Scheduled maintenance and spot reclamation create planned capacity changes. Whether driven by firmware updates, cooling maintenance, or cloud spot instance reclamation, clusters regularly gain and lose nodes on timescales ranging from minutes to hours.
The key observation is that hardware failures are only one source of dynamism — and arguably not the most frequent. In a well-managed multi-tenant cluster, resource rebalancing from scheduler decisions (inference autoscaling, job preemption, priority changes) may trigger capacity fluctuations more often than hardware faults. An elastic training system must handle all three sources through a unified mechanism.
1.2 The Cost of Static Training
Under the traditional fixed-size model, the consequences are binary: either the job runs at its requested scale, or it does not run at all. This rigidity manifests as three distinct cost categories:
Wasted capacity from inflexible allocation. Consider a 256-GPU cluster running a training job on 32 GPUs alongside inference workloads. During off-peak hours, inference releases 96 GPUs. Under a static model, those GPUs sit idle — the training job cannot expand to use them. As a worked-example upper bound, sustained off-peak idle of 96 GPUs over a 24-hour window represents approximately 2,304 wasted GPU-hours per day [2]. Across a fleet, the aggregate waste from mismatched allocation is often the single largest source of GPU underutilization — not hardware failures, but the inability of running jobs to absorb freed capacity.
All-or-nothing failure response. When a single node fails in a 32-node training job, the standard recovery procedure is: halt the entire job, replace the faulty node, restart all 32 nodes, and reload the checkpoint. Even if 31 of 32 nodes remain healthy, the job experiences the full recovery penalty. An elastic alternative — continuing on 31 nodes while the replacement proceeds — would eliminate most of this idle time, but requires the training system to handle dynamic world size changes.
Preemption as a blunt instrument. In a multi-tenant cluster, when a higher-priority job needs resources, the scheduler must choose between fully preempting the lower-priority training job (ejecting it entirely) or denying resources to the new workload. There is no middle ground — no ability to shrink the training job to free some GPUs while keeping training alive on the remainder. This binary choice leads to either resource starvation for high-priority jobs or catastrophic progress loss for low-priority ones.
1.3 What Elastic Training Must Solve
An elastic training system must address four interconnected challenges:
- State redistribution: When the number of GPUs changes, model parameters, optimizer states, and gradient buffers must be resharded across the new set of workers — the checkpoint saved with N GPUs must be loadable on M GPUs.
- Training correctness: Changing the number of data-parallel replicas affects the effective batch size. The system must either maintain a constant global batch size (by adjusting per-replica batch size or gradient accumulation steps) or provide principled adaptation of the learning rate schedule.
- Reconfiguration speed: The value of elastic scaling depends on how quickly the system transitions between configurations. If reconfiguration takes 30 minutes, it is only worthwhile for capacity changes lasting substantially longer.
- Integration with cluster scheduling: Elastic scaling is not a single-job concern — it requires coordination with the cluster scheduler to determine when and how resources should flow between jobs.
Elastic training has been explored through several distinct approaches, each addressing different subsets of the problem. This section surveys the major systems chronologically, examining their architectures, capabilities, and limitations.
2.1 PyTorch Elastic (torchrun)
PyTorch Elastic [3] is PyTorch’s native framework for fault-tolerant and elastic distributed training, and the foundation upon which most production systems are built.
The core mechanism is a rendezvous protocol: when the number of participating nodes changes (due to failure or new nodes joining), all surviving workers coordinate through a rendezvous backend (typically a TCP store) to agree on a new world size and rank assignments. Workers are then restarted with the new configuration, and user code is responsible for loading the latest checkpoint and adjusting training parameters.
PyTorch Elastic supports elastic scaling of the data-parallel dimension only. The number of DP replicas can change dynamically, but tensor parallelism (TP) and pipeline parallelism (PP) configurations must remain fixed. This is a fundamental architectural constraint: TP partitions individual weight matrices across GPUs within tightly-coupled communication groups, and reconfiguring TP degree mid-training would require live resharding of individual tensor dimensions — a significantly harder problem than redistributing complete model replicas.
The primary limitation is that PyTorch Elastic is restart-based: any membership change causes all workers to terminate and relaunch. Recovery time is dominated by checkpoint save/load, typically measured in minutes for large models. Furthermore, state management is entirely the user’s responsibility — the framework provides restart mechanics but not state redistribution.
2.2 DeepSpeed Elastic
DeepSpeed provides an elasticity module focused on elastic batch size management during data-parallel training [4]. When the number of GPUs changes, DeepSpeed computes a valid batch size configuration from a user-specified range of micro-batch sizes and gradient accumulation steps.
The system builds on PyTorch Elastic for worker management and rendezvous, adding a batch size adjustment layer. When using ZeRO Stages 1/2/3, optimizer state is automatically repartitioned across the new worker set.
However, DeepSpeed’s elasticity is narrow in scope: only the DP dimension is elastic; pipeline and tensor parallel configurations cannot change dynamically. Learning rate adjustment must be handled manually by the user. The module does not appear to be a primary development focus — recent DeepSpeed efforts have concentrated on inference (DeepSpeed-MII, FastGen) and training efficiency (ZeRO++, Ulysses).
2.3 Academic Systems: Elastic Pipeline Parallelism
A distinct line of research has explored elastic scaling of the pipeline-parallel dimension — a significantly harder problem than DP elasticity because changing the number of pipeline stages requires repartitioning the model’s layer assignments.
Varuna (EuroSys 2022) [5] introduced “Job Morphing” for elastic PP+DP training on spot VMs. Users annotate their model with CutPoint markers to define pipeline stage boundaries. An AutoConfig module profiles each stage and, given a new GPU count, computes an optimal pipeline/DP configuration. Scaling events trigger a full stop-and-restart: checkpoint → relaunch with new topology → reload. Varuna demonstrated training of 200B-parameter models with up to 5x cost reduction using spot instances, but reconfiguration incurs minutes of downtime.
Bamboo (NSDI 2023) [6] takes a fundamentally different approach: proactive redundancy. In pipeline-parallel training, GPUs have natural idle periods (pipeline bubbles) between forward and backward passes. Bamboo fills these bubbles with redundant computation from neighboring pipeline stages. When a node fails, its neighbor already holds the redundant state and can take over near-instantly — no checkpoint loading required. The reported gains use two distinct baselines: a 3.7x throughput improvement over checkpoint-based fault-tolerant training (e.g., Varuna), and a 2.4x cost reduction relative to on-demand instances by exploiting preemptible VMs. The cost of these gains is a hard requirement on pipeline parallelism and steady-state overhead from the redundant computation.
Oobleck (SOSP 2023) [7] pre-computes a set of heterogeneous pipeline templates — different pipeline configurations that can serve different node counts. It runs f+1 pipeline replicas to tolerate f simultaneous failures. On failure, the system selects template combinations that cover all surviving nodes, ensuring no GPU sits idle. Oobleck achieves up to 29.6x better throughput than Bamboo and Varuna in failure scenarios, with a mathematical guarantee of full resource utilization after failures.
These systems demonstrate that PP elasticity is achievable, but all operate within the PP+DP design space and do not address tensor parallelism.
2.4 TorchFT: Per-Step Fault Tolerance
TorchFT [8] represents the most recent advance in the PyTorch ecosystem, offering per-step fault tolerance rather than the restart-based approach of PyTorch Elastic.
The architecture introduces a Rust-based Lighthouse server for replica group coordination and enables live state recovery from healthy peers via checkpoint transports. When a failure occurs, only the affected replica restarts — other replicas continue training. The FT-HSDP (Fault-Tolerant Hybrid Sharded Data Parallel) paper validates this design at the O(100,000)-GPU scale, reporting recovery time reduced from 10 minutes to 3 minutes and effective training time improved from 44% to 80% relative to a synchronous baseline [9].
TorchFT’s limitation is its restriction to FSDP-class strategies: production support is for DDP, FSDP, and HSDP, with LocalSGD and DiLoCo offered experimentally. Within each replica, TP and PP configurations must remain fixed; only the replicated dimension across replicas is elastic. For production workloads employing full 3D parallelism (TP+PP+DP), TorchFT cannot dynamically adjust the TP or PP dimensions.
2.5 ElasWave: Multi-Dimensional Elastic Scaling
ElasWave [10] (2025) is the most ambitious academic proposal, explicitly designed as an elastic-native system for hybrid parallelism (DP+PP+ZeRO). It operates across four scheduling layers — graph, dataflow, DVFS (Dynamic Voltage and Frequency Scaling), and RNG — to handle elastic events while maintaining parameter consistency, low recovery time, strong post-scaling performance, and computation determinism.
Key techniques include online pipeline resharding with asynchronous parameter migration, ZeRO partition interleaving for efficient state redistribution, and dynamic communicator recovery that completes within 1 second (82x faster than full process group rebuilds). The system reports 1.35x throughput improvement over ReCycle and 1.60x over TorchFT.
However, ElasWave has been validated only on 96 NPUs (Ascend hardware), and its generalization to GPU-based production systems at scale remains undemonstrated.
2.6 The Gap: Production-Grade Elastic Training
Surveying the landscape reveals a clear pattern:
For production use, the pragmatic observation is that DP elasticity covers the dominant use case. In mainstream 3D-parallel training configurations, the DP dimension is typically the most flexible: adding or removing DP replicas does not require repartitioning the model architecture itself. TP and PP dimensions, by contrast, define the fundamental parallelism structure of the model and are far more difficult to change on the fly.
What remains missing is a production-grade system that combines DP elastic scaling with proper cluster scheduling integration, fault recovery, and the practical engineering required for multi-tenant environments — graceful preemption, anti-thrashing safeguards, priority-based resource allocation, and seamless checkpoint resharding.
3. PyTorch Distributed Checkpoint: The Resharding Foundation
Before examining HyperPod’s elastic training implementation, it is necessary to understand the critical enabler: PyTorch Distributed Checkpoint (DCP) [12]. In the context of checkpoint I/O optimization, DCP is valued for its sharded, asynchronous write capabilities — enabling parallel saves that scale linearly with the number of ranks (an aspect explored in our analysis of managed tiered checkpointing). Here, however, DCP’s relevance is different: it solves the fundamental resharding challenge of elastic training — saving a checkpoint with N GPUs and loading it on M GPUs — through a metadata-driven architecture that decouples checkpoint format from parallelism configuration.
3.1 Why Traditional Checkpoints Cannot Support Elastic Scaling
In conventional distributed training, each rank saves its own shard of the model state. The resulting checkpoint is tightly coupled to the parallelism configuration:
Checkpoint saved with world_size=4, FSDP:
rank_0.pt → parameters[0:25%], optimizer_states[0:25%]
rank_1.pt → parameters[25:50%], optimizer_states[25:50%]
rank_2.pt → parameters[50:75%], optimizer_states[50:75%]
rank_3.pt → parameters[75:100%], optimizer_states[75:100%]
Loading this checkpoint on 6 GPUs requires knowing how to remap four source shards into six destination shards — where each source shard’s tensor regions must be split, overlapped, and reassembled for the destination layout. Traditional torch.save / torch.load provides no mechanism for this remapping.
3.2 How DCP Resharding Works
DCP introduces a metadata layer that decouples the checkpoint format from the parallelism configuration:
- On save: Each rank writes its tensor shards along with metadata describing the global tensor shapes and shard boundaries. The metadata encodes what each rank holds, not how many ranks there are.
- On load with a different world size: The new configuration initializes the model with its own parallelism layout. DCP’s planner reads the checkpoint metadata, computes the overlap between source shards and destination shards, and each destination rank reads only the data it needs — potentially from multiple source shard files.
# Save with 4 GPUs
dcp.save(state_dict, storage_writer=dcp.FileSystemWriter("/checkpoint"))
# Load on 6 GPUs — DCP reshards automatically
dcp.load(state_dict, storage_reader=dcp.FileSystemReader("/checkpoint"))
The resharding logic (implemented in torch.distributed.checkpoint.resharding) handles all standard parallelism strategies: DDP, FSDP/FSDP2, tensor parallelism, pipeline parallelism, and combinations thereof. This generality makes DCP the standard building block for elastic training systems.
Figure 1: DCP resharding in action. The metadata layer is what makes the source and destination world sizes independent — destination ranks address the global tensor by offset, not by source rank, so ranks at shard boundaries simply pull two partial reads.
3.3 Practical Implications
DCP’s resharding capability has a direct consequence for elastic training: the training code does not need to know in advance how many GPUs it will run on. The same checkpoint can be loaded at any world size, provided the model is initialized with the corresponding parallelism configuration.
However, DCP does not eliminate all costs. For large models (100B+ parameters), even with parallel I/O, checkpoint save/load can take minutes. DCP is therefore necessary but not sufficient — the overall elastic training system must also minimize how frequently checkpoints are needed and how quickly transitions complete.
4. HyperPod Elastic Training: Architecture and Implementation
SageMaker HyperPod’s elastic training [2] [13] is a production implementation that addresses the gap identified in Section 2.6: DP-elastic scaling with full cluster scheduling integration, fault recovery, and multi-tenant resource management.
The system’s design philosophy can be summarized as: the training operator, not the training script, owns the scaling decision. The training code’s responsibility is limited to (a) detecting elastic events, (b) saving a checkpoint, and © exiting gracefully. Everything else — resource allocation, rank assignment, timing, and restart — is orchestrated externally.
4.1 System Architecture
The architecture comprises four layers, each with a distinct responsibility:
Figure 2: AWS’s published view of the elastic training scaling-event workflow. The five-stage loop — detection, coordination, checkpoint, restart, resume — corresponds to the layered architecture above: Layer 1 produces resource events, Layer 2 coordinates the response, Layer 4 (with DCP) saves and reloads state, and Layers 2–3 jointly drive the restart. Source: [2].
Layer 1: Kueue + Task Governance. Kueue is the Kubernetes-native workload queuing system. It enforces resource quotas per namespace, implements gang scheduling (ensuring all pods of a job start simultaneously), and handles preemption decisions based on workload priority. HyperPod Task Governance extends Kueue with AI-training-aware policies — for example, enabling partial preemption where only the “elastic” portion of a job’s resources is revocable. This layer is what distinguishes elastic training from pure fault recovery: Kueue makes the resource allocation decision; the operator executes it.
Layer 2: HyperPod Training Operator. The operator manages HyperPodPyTorchJob custom resources. Its internal architecture - operator-controlled rendezvous, the agent's HTTP API and IPC protocol, graduated recovery escalation - has been analyzed in depth in our examination of training job orchestration. For elastic training, what matters is the elastic policy the operator enforces on top of that foundation: the scaling envelope ( minReplicas, maxReplicas, replicaIncrementStep) and timing parameters (graceful shutdown timeout, scaling timeout, faulty scale-down timeout). When Kueue admits or revokes resources, the operator orchestrates the transition: signal workers → wait for checkpoint → adjust pods → assign ranks → issue /start.
Layer 3: HyperPod Elastic Agent. The hyperpodrun launcher runs on each pod, extending PyTorch's LocalElasticAgent with an operator-driven lifecycle. For elastic training, the key capability is elastic event detection: the agent receives scaling signals from the operator and propagates them to the training loop via SIGUSR1 (detailed in Section 4.3).
Layer 4: Training Script. The training code integrates elastic training through two required touchpoints — calling elastic_event_detected() in the training loop to detect scaling signals, and using DCP for checkpoint save/load - plus one optional touchpoint: a StatefulDataLoader whose state is included in the checkpoint, so that single-epoch jobs do not reprocess already-seen samples after a world-size change.
4.2 Scaling Flow: Step by Step
The complete elastic scaling sequence, for a scale-up event where additional GPUs become available:
Figure 3: AWS’s published resource timeline for the scale-up case. Note that scaling is staged through Kueue Workloads, not pods directly — the operator never bypasses the scheduler. Source: [13].
For scale-down (preemption by a higher-priority job), the flow is symmetric: Kueue preempts the elastic workload’s lower-priority pods, the operator signals remaining workers to checkpoint and restart at the reduced scale.
For fault recovery, the flow includes an additional phase: the operator first attempts to recreate failed pods on spare capacity (within faultyScaleDownTimeoutInSeconds). If replacement succeeds, the job resumes at the original scale. If replacement times out, the operator performs an elastic scale-down to the surviving node count, and the job continues at reduced scale until resources become available for scale-up.
4.3 Elastic Event Detection Mechanism
A critical design detail is how scaling signals propagate from the operator to the training loop. The HyperPod Elastic Agent implements a SIGUSR1-based signaling mechanism with optional distributed coordination.
When the operator decides to scale, it sends a /stop request to the agents with is_graceful=True. The agent translates this into a SIGUSR1 signal to worker processes. Training code polls for this signal via elastic_event_detected().
Two coordination modes are supported, controlled by the HYPERPOD_SIGNAL_COORDINATION environment variable:
**disabled(default)**:elastic_event_detected()is a no-op - it short-circuits toFalseregardless of whether SIGUSR1 was received. In this mode the elastic loop is effectively disabled at the training-script level, so users opting into elastic training must explicitly switch todistributed. The default exists for safety: introducing the elastic agent into a non-elastic training script never changes its behavior.**distributed*: each rank reads its local SIGUSR1 flag and then participates in atorch.distributed.all_reducewithReduceOp.MAXto propagate the signal across all ranks. If any* rank observes SIGUSR1, all ranks observeTrueon the next call toelastic_event_detected():
signal_tensor = torch.tensor([1.0 if local_signal else 0.0], device=device)
dist.all_reduce(signal_tensor, op=dist.ReduceOp.MAX)
result = signal_tensor.item() > 0
This distributed coordination ensures that all workers reach a consistent checkpoint before any worker exits — preventing the scenario where some workers exit prematurely while others are mid-step.
Figure 4: Two-layer signal coordination. The HTTP layer (operator → agent) ensures every pod receives the scaling signal; the optional all-reduce layer (worker ↔︎ worker) ensures every rank acts on it at the same training step.
4.4 Rank Assignment During Scaling
When the world size changes, all workers need new rank assignments. As analyzed in our examination of the Training Operator, HyperPod replaces PyTorch Elastic’s distributed rendezvous with operator-controlled rank assignment — the operator centrally determines the topology and pushes assignments to each agent via the /start API. That analysis focused on how this design accelerates fault recovery by eliminating the re-rendezvous synchronization barrier. For elastic training, the same mechanism opens up an additional optimization opportunity: because rank assignment is no longer the result of a distributed protocol, the operator can in principle preserve existing rank assignments across a scale-up event and append new ranks for the new pods - a necessary precondition for any locality-aware checkpoint reload. Concretely, when scaling from 4 to 6 nodes, an append-only rank policy would let the existing 4 nodes retain ranks 0-3 while the 2 new nodes receive ranks 4-5. Whether this stable rank assignment translates into a physically locality-aware DCP reload is a separate question: by default, FSDP rebalances parameters uniformly across the new world size, so the destination shards on ranks 0-3 will not match what each rank held before scaling, and DCP will fetch the residual from storage either way. Realizing the "shard onto new ranks only" optimization requires that the destination sharding plan also preserve the old layout - a non-default DCP configuration. The operator-driven design is thus a necessary but not sufficient condition for this optimization; a distributed rendezvous protocol could not even express it.
4.5 Partial Preemption: Priority-Stratified Replicas
One of the most practically significant features is partial preemption — the ability to shrink a training job rather than killing it entirely. This is implemented through a dual replica spec configuration:
spec:
elasticPolicy:
minReplicas: 2
maxReplicas: 8
replicaIncrementStep: 2
replicaSpecs:
- name: base
replicas: 2
template:
spec:
priorityClassName: high-priority # Never preempted
- name: elastic
replicas: 0
maxReplicas: 6
template:
spec:
priorityClassName: low-priority # Preemptible
The base replicas are assigned high priority and are never preempted - they guarantee that the training job always has a minimum resource allocation. The elastic replicas are assigned low priority and can be reclaimed by the scheduler when higher-priority workloads arrive. This design transforms preemption from a binary operation (full stop vs. no preemption) into a graduated response: the job contracts to its guaranteed baseline rather than terminating.
From a training correctness perspective, this is safe because the job uses DCP checkpointing — the checkpoint saved at world_size=8 is loadable at world_size=2, and the global batch size is maintained through gradient accumulation adjustment.
Figure 5: Partial preemption transforms a binary “kill or admit” decision into a graduated contraction. The high-priority base replicas (green) are never preempted; only the low-priority elastic replicas (yellow) are reclaimed. Training never stops - it merely runs on fewer ranks until elastic capacity returns.
Figure 6: AWS’s published preemption timeline. The crucial point is that the elastic job continues running on the surviving Workload throughout the entire sequence — only one of its multiple Workload objects is evicted. Source: [13].
4.6 Batch Size Management Under Elastic Scaling
When the number of DP replicas changes, the system must decide how to handle the effective batch size. HyperPod provides two approaches:
Constant global batch size (default). The global batch size remains fixed regardless of the number of replicas. When replicas decrease, each remaining replica processes more micro-batches through increased gradient accumulation. When replicas increase, each processes fewer. This approach preserves convergence properties because the optimization trajectory is unchanged — only the wall-clock time per step changes.
Figure 7: Convergence is preserved across elastic transitions because the global batch size is held constant — the optimization sees the same sequence of gradients regardless of how those gradients are sharded. Source: [2].
Uneven batch distribution. For cases where the global batch size cannot be evenly divided among the available ranks, HyperPod supports explicit configuration of which ranks receive larger vs. smaller micro-batches:
The constraint is: global_batch_size = (small_batch × num_small_groups) + (large_batch × (world_size — num_small_groups)). This allows the system to operate at any world size without requiring the global batch size to be exactly divisible.
4.7 Integration with Fault Recovery
Elastic training and fault recovery share significant infrastructure — the Training Operator, Elastic Agent, and DCP checkpointing pipeline are the same components that orchestrate the coordinated shutdown and graduated escalation (IPR → PLR → JLR) analyzed in our examination of training job orchestration. The novel integration point in the elastic context is what happens after the operator detects a failure: rather than simply restarting the job at the same scale (which requires waiting for node replacement), the operator can treat the failure as a scaling event — continuing training on the surviving nodes immediately. When a node fails during elastic training:
- Immediate phase (0 to
faultyScaleDownTimeoutInSeconds): The training controller attempts to recreate the failed pod on spare capacity. If spare nodes are available - typically supplied by HyperPod's Health Monitoring Agent auto-recovery, analyzed in our health-monitoring article - the job may resume at the original scale without a scaling event. - Elastic scale-down: If pod recreation fails within the timeout, the operator treats the failure as an elastic scale-down event — signaling surviving workers to checkpoint and restart at the reduced world size.
- Elastic scale-up: When replacement capacity becomes available (either through auto-recovery of the original node or new capacity allocation), the operator triggers a scale-up back to the preferred size.
This integration means that a node failure does not necessarily stop training — the job can continue on surviving nodes while the infrastructure recovers the faulty node, and then scale back up when the recovered node rejoins. The training code handles both intentional scaling (from scheduler decisions) and reactive scaling (from failures) through the same elastic event mechanism.
Figure 8: Fault recovery as a special case of elastic scaling. The faultyScaleDownTimeoutInSeconds parameter is the knob that decides whether a fault is absorbed by static fault recovery (left branch - same world size) or escalated to elastic scale-down (right branch - reduced world size with later scale-up). Either way, the training job survives.
5. Comparison with Existing Approaches
5.1 Architectural Comparison
The following table compares HyperPod elastic training with the systems surveyed in Section 2 across key architectural dimensions:
Two observations stand out:
First, HyperPod’s elastic dimension — DP only — is a deliberate pragmatic choice, not a limitation. In production 3D-parallel training, the DP dimension is the natural elasticity axis: adding or removing DP replicas does not require repartitioning the model’s layer assignments (PP) or resharding individual weight matrices (TP). The academic systems that offer PP/TP elasticity do so at research scale and with substantial steady-state overhead (Bamboo’s redundant computation, Oobleck’s f+1 replicas, ElasWave’s 96-NPU validation).
Second, HyperPod is the only system with integrated cluster scheduling. All other systems treat scaling as a job-internal concern — the training framework decides when to scale. HyperPod externalizes this decision to the Kubernetes scheduler (Kueue) and training operator, enabling cluster-wide optimization: priority-based preemption, quota enforcement, anti-thrashing safeguards, and policy-driven resource allocation.
5.2 Recovery Time Characteristics
A precise comparison of recovery times is difficult because different systems operate under different failure models and scales. The following qualitative comparison captures the key differences:
HyperPod’s elastic training recovery time is longer than per-step approaches like TorchFT, but this is the expected trade-off for a checkpoint-based approach. The key advantage is not speed of individual transitions but the systemic properties enabled by operator integration: anti-thrashing protection prevents rapid oscillation between configurations, partial preemption eliminates unnecessary full-job stops, and the fault recovery integration means the same mechanism handles both planned scaling and unplanned failures.
6. Applicability Assessment and Trade-off Analysis
6.1 Where Elastic Training Delivers the Most Value
Elastic training is most impactful in environments where resource availability fluctuates and training duration is long:
Multi-tenant GPU clusters. When training, inference, and experimentation share the same cluster, elastic training allows training jobs to absorb idle capacity during off-peak hours and gracefully yield resources during peak demand. The partial preemption mechanism ensures that training jobs maintain a guaranteed baseline rather than being fully evicted.
Figure 9: Near-linear throughput scaling on Llama-3 70B fine-tuning. The seven-fold throughput delta between 1 and 8 nodes is what makes elastic absorption of off-peak capacity economically meaningful — every additional GPU absorbed during off-peak hours converts almost directly into training progress. Source: [2].
Spot/preemptible instance usage. Although HyperPod elastic training does not currently support spot instances directly, the architectural pattern — guaranteed base + preemptible elastic — is designed for cost-optimized capacity. As spot support evolves, elastic training provides the natural mechanism for handling reclamation events.
Long-running pre-training and fine-tuning. Jobs that run for days or weeks have higher exposure to both hardware failures and resource contention. Elastic training reduces the impact of both by enabling the job to continue at a reduced scale rather than halt entirely.
Environments requiring strict SLAs for high-priority jobs. When critical fine-tuning or evaluation jobs must start immediately, elastic training allows lower-priority pre-training jobs to contract rather than being killed — preserving their accumulated progress while freeing resources.
6.2 Where Elastic Training Has Limited Benefit
Small-scale, short-duration training. Jobs that complete within hours on a handful of nodes have low exposure to resource fluctuations. The overhead of elastic policy configuration, DCP checkpointing, and transition downtime exceeds the benefit.
Tightly-coupled TP/PP configurations. Current elastic training scales the DP dimension only. If a training job uses a highly specific TP+PP configuration with minimal DP (e.g., TP=8, PP=4, DP=1), there is no elastic dimension to scale.
Latency-sensitive production training. For training jobs where every minute of wall-clock time matters (e.g., rapid iteration during model development), the overhead of elastic transitions — even seconds to minutes — may be unacceptable compared to running at a fixed, guaranteed allocation.
6.3 Engineering Trade-offs
Constant batch size vs. constant throughput. HyperPod’s default approach of maintaining constant global batch size means that convergence properties are preserved, but per-step wall-clock time changes with scale (fewer replicas → more gradient accumulation steps → slower per-step). An alternative would be to scale the batch size with the number of replicas and adjust the learning rate accordingly (linear scaling rule), which preserves throughput but changes the optimization trajectory. The constant batch size approach is the safer default for production use.
Checkpoint frequency vs. transition overhead. More frequent checkpointing reduces the amount of compute lost during an elastic transition (since less work is discarded when rolling back to the latest checkpoint) but increases steady-state overhead. The optimal checkpoint interval depends on the expected frequency of elastic events, which is determined by cluster dynamics — a design parameter that must be tuned per deployment.
Scaling granularity. The replicaIncrementStep and replicaDiscreteValues parameters control the granularity of scaling. Finer granularity (step=1) maximizes resource utilization but increases the frequency of transitions. Coarser granularity (step=4 or discrete values like [2, 4, 8]) reduces transition frequency but may leave resources underutilized. The scalingTimeoutInSeconds parameter provides an additional anti-thrashing mechanism by enforcing a minimum interval between scaling events.
7. Evolution and Outlook
Elastic training is part of a broader trajectory in large-scale training resilience. Viewed alongside the other layers of the resilience stack — health monitoring, job orchestration, and checkpoint I/O optimization — it represents the dynamic adaptation layer: the ability of the training system to adjust its own resource footprint in response to changing conditions.
7.1 Three Generations of Elastic Training
The evolution of elastic training can be characterized in three generations:
Gen 1 (2020–2022) Checkpoint-and-Restart
PyTorch Elastic, DeepSpeed Elastic, Varuna
DP-only or PP+DP; minutes of downtime; user-managed state
Gen 2 (2022–2023) Proactive Redundancy
Bamboo, Oobleck
PP+DP; near-instant recovery; steady-state overhead
Gen 3 (2024–) Elastic-Native Systems
TorchFT, ElasWave, HyperPod Elastic
Scheduler integration; sub-minute transitions;
production-grade orchestration
HyperPod elastic training sits within Generation 3, distinguished by its integration with cluster-level scheduling rather than treating elasticity as a purely job-internal concern.
7.2 Open Challenges
Several fundamental challenges remain:
TP-elastic training. No production system can dynamically change the tensor parallelism degree mid-training. TP partitions individual matrix operations — changing TP degree requires live resharding of weight matrices at the tensor dimension level, fundamentally harder than redistributing complete model replicas (DP) or reassigning layer-groups (PP). This remains an open research problem.
Convergence guarantees under frequent scaling. While maintaining constant global batch size preserves the mathematical properties of the optimization, frequent elastic events introduce variance in training dynamics — different numbers of gradient accumulation steps, varying all-reduce communication patterns, and potential numerical differences from different data orderings. Rigorous convergence analysis under realistic elastic event patterns is still lacking.
Cross-layer optimization. Current elastic training systems operate independently from other resilience layers (checkpointing, health monitoring, job orchestration). A fully integrated system might, for example, predict upcoming failures from health monitoring telemetry and pre-emptively scale down before a crash occurs, or coordinate checkpoint timing with expected scaling events to minimize transition overhead.
Heterogeneous scaling. Current systems assume homogeneous hardware — all GPUs are identical. As clusters increasingly mix GPU generations (e.g., H100 and H200) or accelerator types, elastic training must account for heterogeneous compute capabilities when making scaling decisions.
8. Conclusion
Elastic training transforms distributed training from a rigid, fixed-allocation model into a dynamic system that can adapt to its environment. The core insight is that a training job’s optimal resource allocation is not a constant — it depends on cluster state, workload priority, and hardware health, all of which change continuously.
The technical foundation — PyTorch DCP for state resharding, Kubernetes-native scheduling for resource management, and operator-driven orchestration for transition coordination — is now mature enough for production deployment. HyperPod’s implementation demonstrates that elastic training can be integrated into a comprehensive resilience stack: health monitoring detects failures, the training operator orchestrates recovery, elastic scaling adjusts the job’s footprint, and DCP ensures state continuity across configurations.
For teams operating large-scale training clusters, particularly in multi-tenant environments, elastic training addresses a fundamental inefficiency: the mismatch between dynamic resource availability and static job allocations. It does not eliminate the need for fast checkpointing or robust fault detection — these remain complementary layers in the resilience stack — but it adds a new degree of freedom: the ability of the training job itself to participate in resource management, contracting and expanding as conditions demand.
References
- [1] Kokolis, A. et al. “Revisiting Reliability in Large-Scale Machine Learning Research Clusters.” HPCA 2025. https://arxiv.org/abs/2410.21680
- [2] AWS. “Adaptive infrastructure for foundation model training with elastic training on SageMaker HyperPod.” AWS Machine Learning Blog, 2025. https://aws.amazon.com/blogs/machine-learning/adaptive-infrastructure-for-foundation-model-training-with-elastic-training-on-sagemaker-hyperpod/
- [3] PyTorch. “Elastic — PyTorch Documentation.” https://pytorch.org/docs/stable/distributed.elastic.html
- [4] Microsoft. “DeepSpeed.” GitHub. https://github.com/microsoft/DeepSpeed
- [5] Athlur, S. et al. “Varuna: Scalable, Low-cost Training of Massive Deep Learning Models.” EuroSys 2022. https://arxiv.org/abs/2111.04007
- [6] Thorpe, J. et al. “Bamboo: Making Preemptible Instances Resilient for Affordable Training of Large DNNs.” NSDI 2023. https://arxiv.org/abs/2204.12013
- [7] Jang, I. et al. “Oobleck: Resilient Distributed Training of Large Models Using Pipeline Templates.” SOSP 2023. https://arxiv.org/abs/2309.08125
- [8] Meta. “Fault Tolerant Llama Training with 2,000 Synthetic Failures.” PyTorch Blog, 2025. https://pytorch.org/blog/fault-tolerant-llama-training-with-2000-synthetic-failures-every-15-seconds-and-no-checkpoints-on-crusoe-l40s/
- [9] Salpekar, O. et al. “Training LLMs with Fault Tolerant HSDP on 100,000 GPUs.” arXiv:2602.00277, January 2026. https://arxiv.org/abs/2602.00277
- [10] ElasWave Team. “ElasWave: An Elastic-Native System for Scalable Hybrid-Parallel Training.” arXiv:2510.00606, 2025. https://arxiv.org/abs/2510.00606
- [11] Qiao, A. et al. “Pollux: Co-adaptive Cluster Scheduling for Goodput-Optimized Deep Learning.” OSDI 2021. https://www.usenix.org/conference/osdi21/presentation/qiao
- [12] PyTorch. “Distributed Checkpoint.” https://pytorch.org/docs/stable/distributed.checkpoint.html
- [13] AWS. “Elastic training on Amazon SageMaker HyperPod.” AWS Documentation. https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-eks-elastic-training.html
Originally published at https://zz-s3-pdx.s3.us-west-2.amazonaws.com.
메타데이터
- post_id
- 8a43fa883cfa
- slug
- elastic-training-dynamic-scaling-for-fault-tolerant-and-cost-efficient-large-model-training-8a43fa883cfa
- url
- https://medium.com/@zhenghao1507/elastic-training-dynamic-scaling-for-fault-tolerant-and-cost-efficient-large-model-training-8a43fa883cfa
- canonical_url
- https://medium.com/@zhenghao1507/elastic-training-dynamic-scaling-for-fault-tolerant-and-cost-efficient-large-model-training-8a43fa883cfa
- author_url
- https://medium.com/@zhenghao1507
- status
- ok
- fetched_at
- 2026-06-09 15:37:30