Data as of Sep 16, 2026 · Based on 295 AI responses from ChatGPT Search and Google AI Mode · See how Parse measures this
For most ML teams wanting to save with spot instances, choose Ray Train: it offers built-in fault tolerance, automatic worker restoration and checkpoint resumption for long jobs. If you need native
PyTorch control, use
PyTorch Elastic. Use SageMaker Managed Spot if you prefer a hands-off managed service; choose for very large-model ZeRO sharding or AdaptDL for aggressive cost-optimized scheduling.
Brands AI recommends here
Named in 64% of answers
Best overall for ML teams using spot instances: Ray Train provides built-in fault tolerance, automatic worker restoration and checkpoint resume for long-running jobs; tradeoff is more infra flexibility versus a fully managed service.
Named in 60% of answers
Named in 57% of answers
Named in 52% of answers
If your main goal is **distributed ML training on cheap, interruptible Spot instances**, I’d look closely at **Ray Train**. ### Recommended architecture **Ray Train + PyTorch + Kubernetes/EKS + Spot GPU workers + persistent object storage**
If your main goal is distributed ML training on cheap, interruptible Spot instances, I’d look closely at Ray Train.
Ray Train + PyTorch + Kubernetes/EKS + Spot GPU workers + persistent object storage
Ray Train is specifically designed to recover distributed training after worker/node failures. When a Spot node disappears, it can restart the worker group on replacement nodes and resume from the latest checkpoint.
A typical setup would be:
┌─────────────────────┐
│ Stable driver │
│ CPU / On-Demand │
└──────────┬──────────┘
│
Ray Train job
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
Spot GPU #1 Spot GPU #2 Spot GPU #3
│ │ │
└─────────────────┼─────────────────┘
│
checkpoints
▼
S3 / object storage
The important part is not treating the Spot workers as durable machines. AWS explicitly warns that Spot capacity can disappear and recommends Spot for fault-tolerant workloads.
TorchTrainer handles the distributed worker setup. A minimal configuration looks roughly like:
from ray.train import RunConfig, ScalingConfig, FailureConfig
from ray.train.torch import TorchTrainer
trainer = TorchTrainer(
train_loop_per_worker=train_fn,
scaling_config=ScalingConfig(
num_workers=8,
use_gpu=True,
),
run_config=RunConfig(
storage_path="s3://my-bucket/checkpoints",
failure_config=FailureConfig(
max_failures=-1,
),
),
)
trainer.fit()
Your train_fn needs to save and restore the model/optimizer/training state. Ray then supplies the latest checkpoint to restarted workers.
For tightly synchronized large-model training, losing a worker generally means the whole worker group may be restarted, rather than the remaining GPUs simply continuing indefinitely. That's still useful with Spot, but checkpoint frequency becomes important.
I'd also keep the Ray driver/head node on On-Demand capacity rather than Spot. Ray's own guidance recommends putting the driver on a safer node because losing the driver can take down the training workers.
AWS Spot itself can provide substantial savings—AWS advertises discounts of up to 90% versus On-Demand, although actual savings and availability vary.
If you tell me AWS/GCP/Azure, PyTorch vs. JAX, and whether you're training an LLM or something smaller, I can lay out a concrete architecture (including Kubernetes/VM setup, checkpointing, autoscaling, and how to handle Spot interruptions).
┌─────────────────────┐
│ Stable driver │
│ CPU / On-Demand │
└──────────┬──────────┘
│
Ray Train job
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
Spot GPU #1 Spot GPU #2 Spot GPU #3
│ │ │
└─────────────────┼─────────────────┘
│
checkpoints
▼
S3 / object storage
The important part is not treating the Spot workers as durable machines. AWS explicitly warns that Spot capacity can disappear and recommends Spot for fault-tolerant workloads.
Running distributed training on spot/preemptible instances (which save up to 90% on compute costs)requires a framework that handles **node preemption (sudden termination)** gracefully . Because cloud providers can pull the rug out from under your GPUs at any moment, standard multi-node scripts will…
Running distributed training on spot/preemptible instances (which save up to 90% on compute costs)requires a framework that handles node preemption (sudden termination) gracefully . Because cloud providers can pull the rug out from under your GPUs at any moment, standard multi-node scripts will crash.
The top frameworks and infrastructure orchestrators designed specifically to solve this problem approach it from slightly different layers of the stack:
torchrun) : If you are doing pure PyTorch distributed training, native torchrun supports elastic training . It allows the cluster size to shrink or grow dynamically when a spot instance is reclaimed or added back. Paired with frequent checkpointing, the job detects the node drop, re-configures the remaining ranks, and continues training without a total pipeline crash.To help narrow down the best fit, tell me:
**PyTorch Elastic (TorchElastic)** , integrated natively into PyTorch via `torchrun` , is the leading distributed training framework for handling spot instance interruptions cost-effectively. When a cloud provider reclaims a spot instance (giving a brief 2-minute warning), standard distributed jobs crash. **PyTorch…
PyTorch Elastic (TorchElastic) , integrated natively into PyTorch via torchrun , is the leading distributed training framework for handling spot instance interruptions cost-effectively.
When a cloud provider reclaims a spot instance (giving a brief 2-minute warning), standard distributed jobs crash. PyTorch Elastic detects membership changes dynamically, pauses or shrinks the worker pool, and resumes training from the latest checkpoint without requiring a manual restart.
| Framework | Core Advantage | Best Use Case |
|---|---|---|
PyTorch Elastic (torchrun) | Built directly into PyTorch; handles dynamic node re-joining and fault tolerance natively. | Standard PyTorch training scripts across multi-node GPU spot clusters. |
| Ray / Ray Train | Exceptional cluster-level auto-recovery and management of preemptible nodes across heterogeneous hardware. | Reinforcement learning, hyperparameter tuning, and distributed Python workflows. |
| Elastic Horovod | Dynamically scales the worker count up and down via Gloo coordination without tearing down the job. | Legacy Horovod setups or multi-framework deep learning pipelines. |
To successfully run distributed training on spot capacity, frameworks alone are not enough. You must implement the following patterns:
torchrun with --max-restarts parameters configured so that the agent layer waits for a replacement spot instance to spin up and dynamically re-integrates it into the rank list.If you'd like to narrow this down, let me know:
If you want distributed training on **spot/preemptible instances**, you need more than just a distributed trainer—you need **elasticity + fault tolerance + checkpointing**. Good options: ## 1. PyTorch Elastic + Kubernetes (most flexible) **Best default choice for custom PyTorch workloads.**
If you want distributed training on spot/preemptible instances, you need more than just a distributed trainer—you need elasticity + fault tolerance + checkpointing. Good options:
Best default choice for custom PyTorch workloads.
Stack:
torchrunWhy it works:
Typical architecture:
Object Storage
(checkpoints/data)
|
v
Spot GPU nodes --> PyTorch Elastic --> Trainer
| |
| v
node eviction rendezvous
|
v
Kubernetes replaces node
Good for:
Best if you want easier orchestration.
Anyscale builds around Ray, which supports distributed training workflows and elastic cloud scaling.
Advantages:
Tradeoff:
Best if you want a training platform instead of building infrastructure.
Determined AI provides experiment management, distributed training, checkpoint handling, and spot-instance workflows.
Good when you want:
For most teams:
Kubernetes
├── On-demand small control plane
├── Spot GPU worker pool
│ ├── A100/H100/L40/etc.
│ └── multiple instance types
├── PyTorch Elastic
├── NCCL
└── Object storage checkpoints
Key design choices:
Checkpoint often
Save model weights
optimizer state
scheduler state
RNG state
dataloader position if possible
Use multiple spot instance types
Avoid depending on one scarce GPU SKU.
Keep a small on-demand anchor
Rendezvous/control services are cheap compared with losing a large training job.
Prefer elastic data parallel training
Rigid multi-node jobs are much harder to run on spot because one lost GPU can kill the whole job.
A framework like PyTorch Elastic on Kubernetes is usually the best balance of cost, control, and reliability for a production training system.
If you tell me your stack (PyTorch/TensorFlow/JAX), cloud (AWS/GCP/Azure), GPU type, and whether this is LLM pretraining vs fine-tuning, I can suggest a more specific architecture.
Running distributed training on spot (preemptible) instances can slash your GPU costs by 60–90%, but it requires a setup that handles node interruptions gracefully. Because hyperscalers like AWS and GCP give little warning (2 minutes and 30 seconds respectively) before yanking an instance, your framework choice needs…
Running distributed training on spot (preemptible) instances can slash your GPU costs by 60–90%, but it requires a setup that handles node interruptions gracefully. Because hyperscalers like AWS and GCP give little warning (2 minutes and 30 seconds respectively) before yanking an instance, your framework choice needs native fault tolerance, elastic resizing, or robust auto-recovery.
The best frameworks and orchestration tools designed to tackle spot instance volatility include:
torchrun / TorchElastic)torchrun ) allows training to dynamically change the number of active workers (scale down when a spot instance is preempted, scale back up when a replacement is provisioned) without tearing down the entire job, provided your code periodically saves states to a shared checkpoint.Whichever framework you pick, spot-instance training always relies on a two-part safety net:
If you'd like to narrow this down, tell me:
I can help outline a sample configuration file or workflow for your setup.
Yes. If your goal is **distributed ML training on interruptible/Spot instances**, I’d prioritize frameworks that can survive node loss rather than plain `torchrun`/DDP. ### My top choices - **Ray Train** — probably the best general-purpose choice. It supports multi-node/multi-GPU training, worker/node fault tolerance,…
Yes. If your goal is distributed ML training on interruptible/Spot instances, I’d prioritize frameworks that can survive node loss rather than plain torchrun/DDP.
For an AWS-based setup, I'd lean toward:
┌───────────────┐
│ S3 / durable │
│ checkpoints │
└───────┬───────┘
│
checkpoint/load
│
┌───────────────────┼───────────────────┐
│ │ │
Spot GPU #1 Spot GPU #2 Spot GPU #3
│ │ │
└──────────── Ray Train / PyTorch ──────┘
│
Spot node disappears
│
worker replaced
│
resume from checkpoint
The important part is checkpointing to durable storage frequently enough that losing a Spot node doesn't cost hours of work. Ray specifically supports distributed checkpointing, including sharded checkpoints for FSDP/DeepSpeed/Megatron-style training.
If you're on AWS, SageMaker makes this even simpler: its managed Spot training automatically handles the Spot lifecycle and restores checkpoints when the job resumes.
| Situation | Recommendation |
|---|---|
| AWS + want minimal infrastructure work | SageMaker Managed Spot Training |
| AWS/GCP/Azure + want flexible open source | Ray Train |
| Large LLM with FSDP/DeepSpeed | Ray Train + FSDP/DeepSpeed |
| Need dynamic worker count | Ray Train |
| Maximum low-level control | PyTorch distributed + custom orchestration |
| Short jobs where interruption isn't costly | Plain Spot + PyTorch DDP can be sufficient |
One subtle point: ordinary synchronous data-parallel training doesn't naturally tolerate losing a worker—the other workers generally have to stop waiting for it. That's why Ray's worker/node fault tolerance or SageMaker's managed restart/checkpoint mechanism is valuable for Spot workloads.
If you tell me AWS/GCP/Azure, GPU type, PyTorch/Hugging Face/etc., and whether this is LLM pretraining or fine-tuning, I can recommend a concrete architecture and estimated cost-saving strategy.
Running distributed training on spot (or preemptible) instances is one of the best ways to slash cloud compute bills by up to 70%-90%, but it requires handling sudden node terminations gracefully. Rather than choosing just *one* isolated framework, the modern approach splits the stack into two layers: an…
Running distributed training on spot (or preemptible) instances is one of the best ways to slash cloud compute bills by up to 70%-90%, but it requires handling sudden node terminations gracefully.
Rather than choosing just one isolated framework, the modern approach splits the stack into two layers: an infrastructure/orchestration layer that manages spot instance interruptions, and a training framework layer that actually coordinates the GPU compute.
Phase 1: Infrastructure & Spot Management (The Orchestrator)
These tools handle spot instance provisioning, auto-recovery, and failover when AWS, GCP, or Azure reclaims a spot node.
Phase 2: Distributed Training Frameworks (The Computations)
Once your infrastructure can survive a spot interruption, you run your actual training logic using these frameworks (which all support fault-tolerant state-saving):
To help narrow down the best setup for your project, let me know:
No sources cited
Yes. If you're on AWS, I’d strongly consider **PyTorch + TorchElastic on Kubernetes/EKS with EC2 Spot instances**. That combination is designed around the exact problem you’re describing: workers can disappear and be replaced without treating the whole training run as permanently failed. AWS specifically documents…
Yes. If you're on AWS, I’d strongly consider PyTorch + TorchElastic on Kubernetes/EKS with EC2 Spot instances. That combination is designed around the exact problem you’re describing: workers can disappear and be replaced without treating the whole training run as permanently failed. AWS specifically documents TorchElastic for Spot-based distributed training and dynamic worker scaling.
S3
checkpoints / data
│
▼
┌─────────────┐
│ EKS │
│ │
│ TorchElastic│
└──────┬──────┘
│
┌──────────┼──────────┐
▼ ▼ ▼
Spot GPU Spot GPU Spot GPU
worker worker worker
│ │ │
└──────────┼──────────┘
│
distributed
PyTorch/FSDP
The critical piece is checkpointing. Save model + optimizer + scheduler + scaler + training position frequently to durable storage. When Spot reclaims a node, the replacement worker(s) can recover from the latest checkpoint rather than throwing away hours of GPU time. SageMaker's implementation, for example, automatically synchronizes checkpoints through S3.
One important caveat: don't build a tightly coupled distributed system that assumes every Spot node will remain alive. AWS explicitly notes that Spot capacity isn't guaranteed and recommends Spot for fault-tolerant workloads; distributed training therefore needs interruption/recovery mechanisms.
If you tell me (1) PyTorch/TensorFlow, (2) model size, (3) number/type of GPUs, and (4) AWS vs GCP/Azure, I can recommend a concrete framework/architecture and give you the cluster + training configuration.
For distributed training across **spot/preemptible instances**, you want an **elastic, fault-tolerant training framework** rather than a traditional fixed-size distributed launcher. Spot nodes can disappear, so the system needs checkpointing, worker replacement, and ideally the ability to change worker counts during a…
For distributed training across spot/preemptible instances, you want an elastic, fault-tolerant training framework rather than a traditional fixed-size distributed launcher. Spot nodes can disappear, so the system needs checkpointing, worker replacement, and ideally the ability to change worker counts during a run.
Good options:
PyTorch Elastic is designed for this use case. It adds elastic worker management on top of PyTorch distributed training: workers can leave and rejoin, and jobs can recover after node loss.
Typical stack:
Architecture:
Control plane
|
TorchElastic/K8s
|
+------------+------------+
| | |
Spot GPU Spot GPU Spot GPU
worker worker worker
checkpoint store
|
resume after loss
Advantages:
Example scenarios using Kubernetes spot pools with TorchElastic have been demonstrated for fault-tolerant training.
Ray Train is another good choice if you want a broader distributed compute platform.
Pros:
Tradeoff:
Horovod supports elastic training, allowing workers to be added or removed without restarting the entire job.
Good when:
DeepSpeed is popular for large language models.
Usually paired with:
It is excellent for reducing memory requirements, but the spot-resilience layer usually comes from the orchestration system around it.
For most teams today:
Kubernetes
|
+-- On-demand small control nodes
|
+-- Spot GPU workers
|
+-- PyTorch Elastic
|
+-- DistributedDataParallel
|
+-- Checkpoints -> object storage
Important practices:
Cloud providers specifically recommend checkpointing and resilient distributed training for spot workloads because interruptions are expected.
If you are starting fresh, I would pick:
Important practices:
Cloud providers specifically recommend checkpointing and resilient distributed training for spot workloads because interruptions are expected.
If you are starting fresh, I would pick:
Running distributed training on **spot instances** (preemptible VMs) can slash your compute bills by 50% to 70%, but it requires a framework that handles node **preemption (eviction)** gracefully without crashing the entire job.[](https://www.spheron.network/blog/spot-gpu-training-resilience-checkpointing-guide/)…
Running distributed training on spot instances (preemptible VMs) can slash your compute bills by 50% to 70%, but it requires a framework that handles node preemption (eviction) gracefully without crashing the entire job.
No single framework magically solves spot interruptions on its own; rather, the best approach is a combination of an elastic training framework and an orchestration layer that manages instance replacement and fast state-recovery.
torchrun (TorchElastic):
torchrun ) supports node failures and dynamic membership. If a spot instance is reclaimed, torchrun can pause the job, wait for the cluster autoscaler to spin up a replacement node, re-mesh the remaining and new nodes, reload the latest checkpoint, and resume training seamlessly.Frameworks alone don't request new spot instances when old ones die. You need an orchestrator that watches for the cloud provider's preemption warning (AWS gives a 2-minute notice; GCP/Azure give 30 seconds) and auto-provisions replacements:
Recommended Architecture Stack
To help narrow down the exact stack, tell me:
I can provide a concrete configuration or architecture blueprint.