huggingface-accelerate

Simplify distributed training for PyTorch scripts with a unified API.

11.5k|842|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill huggingface-accelerate-orchestra-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-accelerate
Source: https://github.com/Orchestra-Research/AI-Research-SKILLs/tree/main/08-distributed-training/accelerate
Command: npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill huggingface-accelerate-orchestra-research

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 to any PyTorch script, allowing you to leverage multiple GPUs or machines with minimal code changes.

Core Features & Use Cases

  • Unified API: Supports DeepSpeed, FSDP, DDP, and Megatron with a single interface.
  • Automatic Configuration: Handles device placement, mixed precision (FP16/BF16/FP8), and sharding automatically.
  • Use Case: You have a PyTorch script for training a large language model on a single GPU. With just a few lines of code added using this Skill, you can seamlessly scale your training across multiple GPUs or even multiple nodes without rewriting your core training logic.

Quick Start

Add the huggingface-accelerate skill to your PyTorch script to enable distributed training.

Frequently Asked Questions about huggingface-accelerate

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

FAQPage Schema
How do I run distributed PyTorch training across multiple GPUs without rewriting my script?

Distributed PyTorch training across multiple GPUs requires minimal code modifications when using a unified API that automates device placement, sharding, and mixed precision. You can scale existing single-GPU scripts to multi-GPU or multi-node environments seamlessly by adding just a few lines of code.

Can I use DeepSpeed and FSDP with the same PyTorch training script?

DeepSpeed, FSDP, DDP, and Megatron-LM are all supported through a single unified API for distributed training. You can configure these distributed training strategies within your PyTorch script without changing your core training logic.

How does mixed precision training work for large language models in PyTorch?

Mixed precision training in PyTorch works by automatically handling FP16, BF16, and FP8 configurations to optimize memory and speed. This automation handles device placement and precision scaling for you, which is crucial when training large language models across multiple GPUs.

Do I need to manually manage device placement when scaling PyTorch scripts to multi-node environments?

Manual device placement management is not required when scaling PyTorch scripts to multi-node environments. The API automatically handles device placement, sharding, and mixed precision configuration, allowing you to focus on your training logic rather than infrastructure setup.

What is the best way to add multi-GPU support to an existing single-GPU PyTorch training loop?

The best way to add multi-GPU support to an existing PyTorch training loop is to use a unified API that wraps your script to automate sharding and device placement. This approach allows you to leverage DeepSpeed or FSDP strategies without rewriting your core training logic.

What are the limitations of using a unified API for PyTorch distributed training?

A limitation of using a unified API for PyTorch distributed training is that it depends on existing PyTorch, transformers, and accelerate libraries. While it simplifies multi-GPU and multi-node scaling, your underlying training script must be compatible with these specific dependencies to function correctly.