What accelerate gives you
accelerate is the abstraction below Trainer that handles: device placement, mixed precision, gradient accumulation, distributed training (DDP, FSDP, DeepSpeed), and resumability. Trainer wraps it; you can also use it directly when you have a custom training loop.
Two ways in
- Through Trainer — you set
TrainingArgumentsknobs (fsdp,deepspeed) and accelerate is plumbed for you. - Directly —
Accelerator()+accelerator.prepare(model, optimizer, dataloader)+ your own.backward()/.step().
FSDP vs DeepSpeed in 2026
FSDP (Fully Sharded Data Parallel, native PyTorch) is now the default for training big models — better integration, simpler config. DeepSpeed (Microsoft) is still strong for some advanced workloads but adds a runtime dependency. For most fine-tuning and pre-training at the scales we'd consider, FSDP is the right starting point.