What problem does it solve?
HuggingFace Accelerate removes the complexity of setting up distributed training by giving you one simple API for running the same PyTorch code across single GPU, multi-GPU, and multi-node environments.
Core Features & Use Cases
- Unified distributed training API: Switch between DDP, DeepSpeed, and FSDP without rewriting your training loop.
- Automatic device placement and mixed precision: Handle mixed precision modes like FP16, BF16, and FP8, plus correct backward handling.
- Practical workflows for real training: Enable gradient accumulation, configure DeepSpeed ZeRO stages, and use Megatron-LM plugins for tensor/pipeline parallelism.
Use case: You have a working single-GPU PyTorch script and need to scale it to 8 GPUs with BF16 mixed precision and optionally DeepSpeed ZeRO, without maintaining separate launcher logic and device-transfer code paths.
Quick Start
Tell the AI to configure Accelerate for your setup and launch distributed training for your script in one run.