huggingface-accelerate

Configure distributed PyTorch training with DDP, DeepSpeed, and FSDP backends.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/GarrettRoi/open-manus --skill huggingface-accelerate-garrettroi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-accelerate
Source: https://github.com/GarrettRoi/open-manus/tree/main/skills/mlops/training/accelerate
Command: npx skills add https://github.com/GarrettRoi/open-manus --skill huggingface-accelerate-garrettroi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires accelerate, torch, transformers, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill drastically simplifies the process of adding distributed training capabilities (multi-GPU, multi-node, mixed precision, DeepSpeed, FSDP) to any PyTorch script with minimal code changes.

Core Features & Use Cases

  • Unified API: Write one script that works across various distributed setups (DDP, DeepSpeed, FSDP).
  • Automatic Configuration: Handles device placement, mixed precision (FP16/BF16/FP8), and sharding automatically.
  • Quick Prototyping: Enables rapid iteration and scaling of PyTorch models from single-GPU to distributed environments.
  • Use Case: You have a PyTorch script for training a transformer model on a single GPU. With just 4 lines of code added, you can scale this script to run efficiently on a cluster of 8 GPUs using DeepSpeed ZeRO-3.

Quick Start

Run your PyTorch training script 'train.py' using accelerate by executing the command 'accelerate launch train.py'.

Frequently Asked Questions about huggingface-accelerate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scale a PyTorch training script to multi-GPU without rewriting it?

To scale PyTorch training to multi-GPU, add just four lines of code using a unified API that handles distributed backends like DDP, DeepSpeed, and FSDP. This enables seamless scaling with minimal code modification.

What is the best way to configure mixed precision training in PyTorch?

The best way to configure mixed precision training is using an API that automates device placement and precision formats like FP16, BF16, and FP8. It handles sharding configurations automatically, eliminating manual setup for your PyTorch scripts.

Does Hugging Face Accelerate work with DeepSpeed ZeRO-3?

Yes, Accelerate works with DeepSpeed ZeRO-3 through its unified API. You can scale a single-GPU transformer training script to run efficiently on an 8-GPU cluster using DeepSpeed ZeRO-3 with minimal code changes.

How do I launch distributed training across multiple nodes using PyTorch?

You launch distributed training by executing the command 'accelerate launch train.py' on your PyTorch script. This command handles the automatic setup for different hardware, enabling seamless scaling from single-GPU to multi-node, multi-GPU setups.

Can I use FSDP and DDP in the same PyTorch training script?

Yes, you can use FSDP and DDP in the same script by leveraging a unified API. This API allows you to write one script that works across various distributed setups, automatically handling device placement and sharding configurations for each backend.