Skip to content

Unified distributed training API that adds multi-GPU support to PyTorch scripts in about four lines.

CCM score
59 of 100
skills.sh installs
1.1K
GitHub stars
14.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers single-GPU to multi-GPU and multi-node setups through one script that works across DDP, DeepSpeed, FSDP, and Megatron
  • Includes interactive accelerate config setup and a single accelerate launch command with flags for GPU count, machine count, and rank
  • Handles automatic device placement and mixed precision in FP16, BF16, or FP8, plus gradient accumulation via accelerator.accumulate
  • Designed for HuggingFace ecosystem users who want a simple path to distributed training before reaching for Lightning or Ray Train

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill huggingface-accelerate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

HuggingFace Accelerate - Unified Distributed Training

Quick start

Accelerate simplifies distributed training to 4 lines of code.

Installation:

pip install accelerate

Convert PyTorch script (4 lines):

import torch
+ from accelerate import Accelerator

+ accelerator = Accelerator()

  model = torch.nn.Transformer()
  optimizer = torch.optim.Adam(model.parameters())
  dataloader = torch.utils.data.DataLoader(dataset)

+ model, optimizer, dataloader = accelerator.prepare(model, optimizer, dataloader)

  for batch in dataloader:
      optimizer.zero_grad()
      loss = model(batch)
-     loss.backward()
+     accelerator.backward(loss)
      optimizer.step()

Run (single command):

accelerate launch train.py

Common workflows

Workflow 1: From single GPU to multi-GPU

Original script:

# train.py
import torch

model = torch.nn.Linear(10, 2).to('cuda')
optimizer = torch.optim.Adam(model.parameters())
dataloader = torch.utils.data.DataLoader(dataset, batch_size=32)

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
Data Science & Analytics, AI Agents & LLM Apps, Python
First seen
Jun 3, 2026

Questions

What does the huggingface-accelerate skill do?

The huggingface-accelerate skill adds distributed training to a PyTorch script in about 4 lines using the Accelerator class. It offers one unified API across DeepSpeed, FSDP, Megatron and DDP, with automatic device placement and mixed precision in FP16, BF16 or FP8.

How do I install the huggingface-accelerate skill?

Run npx -y skills add orchestra-research/ai-research-skills --skill huggingface-accelerate -y in your project. After that, huggingface-accelerate lets your agent convert a single-GPU script to multi-GPU training with one launch command.

Does the huggingface-accelerate skill need any extra tools to run?

The huggingface-accelerate skill builds on the accelerate, torch and transformers packages, installed with pip install accelerate. Multi-GPU runs also need DeepSpeed if you choose that backend, while DDP uses torch.distributed.run, which is built in.

Where does the huggingface-accelerate skill sit in its category?

The huggingface-accelerate skill is listed under Data Science & Analytics on Claude Marketplaces. Its own facts set it apart by focusing on the HuggingFace Accelerate API, which unifies DeepSpeed, FSDP, Megatron and DDP behind one script.

More from orchestra-research/ai-research-skills

All 92

Similar to Huggingface Accelerate

More Data Science & Analytics