What problem does it solve?
Distributed training setup becomes slow and error-prone when you need to support multi-GPU, mixed precision, and multiple backends without rewriting core training loops.
Core Features & Use Cases
- Unified distributed API: Write one PyTorch training script and enable DDP, DeepSpeed, or FSDP through a consistent
Accelerator interface.
- Automatic device placement & launch: Prepare model/optimizer/dataloader once and run with
accelerate launch without custom launcher boilerplate.
- Performance-ready training: Configure mixed precision (FP16/BF16/FP8), gradient accumulation, and sharding/offload options to reduce memory pressure.
Use case: You have a single-GPU PyTorch/Transformers training script and need to scale it to 8 GPUs with mixed precision and optional DeepSpeed ZeRO or FSDP, while keeping the training code essentially unchanged.
Quick Start
Run accelerate launch train.py to start distributed training using the Accelerate CLI and your existing PyTorch script.