Accelerate

Hugging Face Accelerate launches and trains PyTorch models across devices and distributed configurations.

github.com/huggingface/accelerate
Accelerate homepage screenshot

About Accelerate

Accelerate is an open-source Python library for running raw PyTorch training scripts across single and distributed hardware. It abstracts boilerplate for multi-GPU, TPU, and mixed-precision handling while leaving the rest of the training loop unchanged.

It supports fp8, fp16, and bf16 mixed precision, FSDP and DeepSpeed, and device placement for models and data. An optional command-line tool configures the environment and launches scripts, while standard python or torchrun commands remain usable.

Key features

  • Run same PyTorch script on CPU, single GPU, multi-GPU, and TPU
  • Mixed precision training with fp8, fp16, and bf16
  • Prepare models, optimizers, and dataloaders for distributed training
  • Support for FSDP and DeepSpeed distributed training
  • Automatic device placement for models and batches
  • Launch scripts with accelerate config and accelerate launch CLI
Best for: PyTorch users who write their own training loops and need to run them across different hardware setups.
Good for
  • Adds a few lines to standard PyTorch scripts to enable distributed execution
  • Same code runs without modification for local debugging and training environments
  • Command-line tool is optional and works alongside python and torchrun commands

Accelerate at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

Accelerate alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in ML Training & Optimization

Well-known listings from the same topic.

All 75

Accelerate FAQ

Do I have to use the Accelerate CLI to run training?
No. The CLI is optional. You can still use python my_script.py or python -m torchrun my_script.py.
How do I configure Accelerate for my hardware?
Run accelerate config and answer the questions. It generates a config file used automatically by accelerate launch.
What code changes are needed to use Accelerate?
Create an Accelerator, get the device from it, wrap the model, optimizer, and dataloader with accelerator.prepare, and use accelerator.backward for the loss.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing