What problem does it solve?
It removes the complexity of writing and maintaining separate code paths for single-GPU, multi-GPU, and multi-node distributed training by providing a unified interface for common PyTorch distributed backends.
Core Features & Use Cases
- Unified distributed API: Use one training script while running with DDP, DeepSpeed, FSDP, or Megatron-LM through the same
Accelerator entry points.
- Automatic training plumbing: Handles device placement, distributed wrapping, and mixed precision (FP16/BF16/FP8) to reduce boilerplate and common setup errors.
- Common production workflows: Supports interactive configuration, gradient accumulation, DeepSpeed ZeRO stages, FSDP sharding strategies, and accelerator-aware checkpointing/saving.
Use case: You have a PyTorch training script that runs on a single GPU, and you need to scale it to 8 GPUs with BF16 and gradient accumulation while keeping the code changes minimal and repeatable across environments.
Quick Start
Ask your assistant to run accelerate launch train.py using Hugging Face Accelerate with the default configuration for your available hardware.