# 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 easy-to-configure FSDP and DeepSpeed support

Repository: https://github.com/huggingface/accelerate
Canonical: https://ross.abutalabs.com/products/accelerate
Homepage: https://huggingface.co/docs/accelerate
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-26T03:16:45+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 88, longevity 100
- inputs: {"age_days": 2133, "days_push": 7, "days_rel": 83, "gap_med": 26, "n_releases_24m": 22}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9838, forks 1444 (observed 2026-08-28T04:10:37.447727+00:00)

## What it is
Hugging Face Accelerate is a Python library that lets you run the same PyTorch training and inference code on any device or distributed configuration (multi-GPU, TPU, fp16/fp8 mixed precision, FSDP, DeepSpeed) by adding just a few lines of code. It abstracts the boilerplate of distributed training while leaving your training loop unchanged.

## Use cases
- train pytorch models on multiple gpus
- run the same training script on gpu, tpu, or cpu
- add mixed precision fp16 or fp8 to my training loop
- scale pytorch training with fsdp or deepspeed
- run inference with very large models that don't fit in memory
- launch distributed training without writing torchrun boilerplate
- fine-tune large language models across distributed hardware

## When to choose
- you write custom PyTorch training loops and want minimal changes to scale them
- you need portability across GPUs, TPUs, and distributed setups with one codebase
- you want easy mixed precision, FSDP, or DeepSpeed integration without learning each framework's API
- you're in the Hugging Face ecosystem (Transformers, Diffusers, TRL)

## When to avoid
- you use a high-level training framework like PyTorch Lightning or Keras and don't need fine-grained control
- you need fully managed distributed training rather than a library you integrate into your own loop
- your project isn't PyTorch-based (e.g., JAX or TensorFlow)

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, llm-training, gpu-computing, cli
- domain: deep-learning, machine-learning, large-language-models, developer-tools
- platform: python, cross-platform, cli
- tags: pytorch, distributed-training, mixed-precision, fsdp, deepspeed, multi-gpu, tpu, huggingface, gpu

## Member repositories
- huggingface/accelerate (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:37.447727+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:20:54.680004+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/accelerate (fetched 2026-08-28T04:10:37.447727+00:00, sha 1335a12ee6e6)
  - homepage: https://huggingface.co/docs/accelerate (fetched 2026-08-29T08:20:27.794840+00:00, sha ed8b2be074ad)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T08:20:27.803872+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/accelerate/basic_tutorials/install (fetched 2026-08-29T08:20:27.808050+00:00, sha 3bfd1618a5c3)
  - site_page: https://huggingface.co/docs/accelerate/quicktour (fetched 2026-08-29T08:20:27.810655+00:00, sha b89a3c5cc2e6)
  - site_page: https://huggingface.co/docs/accelerate/basic_tutorials/overview (fetched 2026-08-29T08:20:27.813246+00:00, sha d0b73258e84e)
  - site_page: https://huggingface.co/docs/accelerate/basic_tutorials/migration (fetched 2026-08-29T08:20:27.815137+00:00, sha bb6d628bd730)
  - site_page: https://huggingface.co/docs/accelerate/basic_tutorials/execution (fetched 2026-08-29T08:20:27.821727+00:00, sha e48eb40708aa)
  - site_page: https://huggingface.co/docs/accelerate/basic_tutorials/tpu (fetched 2026-08-29T08:20:27.829806+00:00, sha 0ede16cd560a)
  - registry_pypi: https://pypi.org/pypi/accelerate/json (fetched 2026-08-29T08:20:27.831981+00:00, sha 8e499b75d67d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
