accelerate
by
huggingface

Description: 🚀 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 ↗

Summary Information

Updated 11 minutes ago
Added to GitGenius on November 20th, 2023
Created on October 30th, 2020
Open Issues & Pull Requests: 95 (+0)
Number of forks: 1,399
Total Stargazers: 9,767 (+1)
Total Subscribers: 94 (+0)

Issue Activity (beta)

Open issues: 75
New in 7 days: 3
Closed in 7 days: 0
Avg open age: 840 days
Stale 30+ days: 62
Stale 90+ days: 56

Recent activity

Opened in 7 days: 3
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (117)
  • feature request (85)
  • solved (58)
  • enhancement (57)
  • wip (22)
  • documentation (17)
  • TPU (16)
  • good first issue (14)

Repository Insights (GitGenius)

Median issue/PR response: 23.8 hours
Mean response time: 97.5 days
90th percentile: 429.5 days
Tracked items: 720

Most active contributors

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.

According to GitGenius activity tracking, the repository maintains active development with a median issue and pull request response latency of 23.8 hours across 720 tracked items. Feature requests represent the most common issue type with 33 tracked instances, followed by enhancements with 22 and bugs with 16. The core development team includes muellerzr with 380 tracked events, SunMarc with 321 events, and BenjaminBossan with 121 events as the most active contributors and triagers. The repository's contributor overlap with microsoft/vscode, microsoft/typescript, and rust-lang/rust indicates cross-pollination with major open-source projects.

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.

accelerate
by
huggingfacehuggingface/accelerate

Repository Details

Fetching additional details & charts...