huggingface/accelerate

🚀 A simple way to launch, train, and use PyTorch models on almost any device and distributed configuration, automatic mixed precision (including fp8), and...

View on GitHub ↗Jump to charts ↓

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 2 hours ago
Added to GitGenius on November 20th, 2023
Created on October 30th, 2020
Open Issues & Pull Requests: 92 (+0)
GitHub issues: Enabled
Number of forks: 1,535
Total Stargazers: 9,911 (+0)
Total Subscribers: 97 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.1 days
Mean response time: 85.5 days
90th percentile: 362.9 days
Tracked items: 729

Maintainer activity

1 person did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 7, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits.

How this project is maintained

About 15% of issues opened in the past year have never received a reply. 98% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "bug" is answered fastest, typically in about 3 days, while "enhancement" waits about 3 months. 92% of issues opened in the past year have since been closed. Three people close 51% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue analytics are temporarily unavailable.

Detailed Description

Hugging Face Accelerate is a PyTorch training library designed to simplify distributed training across diverse hardware configurations. The library enables developers to run raw PyTorch training scripts on single CPUs, single GPUs, multi-GPU setups, TPUs, and multi-node clusters with minimal code modifications. Rather than requiring users to rewrite their training loops, Accelerate abstracts only the boilerplate code necessary for distributed training, mixed precision, and device management while leaving the core training logic untouched.

The core value proposition centers on reducing friction for PyTorch users who want to maintain control over their training loops but avoid writing and maintaining complex distributed training infrastructure. By adding just five lines of code to a standard PyTorch training script, users can enable multi-GPU or TPU support and mixed precision training including fp8, fp16, and bf16 formats. The library handles device placement automatically, allowing the same code to run unchanged across different hardware configurations, from local machines for debugging to production training environments.

Accelerate provides a command-line interface tool that guides users through configuring their training environment interactively. The accelerate config command generates configuration files that automatically set appropriate defaults for the target hardware. Users can then launch scripts using accelerate launch, eliminating the need to remember torch.distributed.run syntax or write custom TPU launchers. The CLI is optional, and users can continue using standard Python execution or torchrun if preferred. The repository includes a configuration zoo with templates for various deployment scenarios.

The library supports multiple launching mechanisms beyond standard GPU training. It enables multi-CPU runs using MPI, with support for Open MPI, Intel MPI, and MVAPICH. For large-scale training, Accelerate integrates with DeepSpeed, allowing users to configure DeepSpeed settings entirely through accelerate config without modifying training code, though this support is marked as experimental. The library also provides a notebook_launcher function for distributed training in Jupyter environments, particularly useful for Colab and Kaggle notebooks with TPU backends.

The library explicitly positions itself as a thin wrapper around PyTorch rather than a high-level framework. It is intended for users who want to write their own training loops and maintain full control over training logic while delegating distributed infrastructure concerns. The entire Accelerate API centers on a single Accelerator object, keeping the learning curve minimal. The library is not designed for users seeking high-level abstractions that eliminate the need to write training loops themselves, as numerous other frameworks already serve that purpose.