Skip to main content

HuggingFace Accelerate

Skill Verified Active

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

Purpose

To enable researchers and engineers to easily add distributed training support to their PyTorch scripts with minimal code changes and a single launch command, abstracting away the complexities of different distributed frameworks.

Features

  • Unified API for DeepSpeed/FSDP/Megatron/DDP
  • Automatic device placement and mixed precision
  • Interactive configuration via `accelerate config`
  • Single launch command for diverse hardware
  • Minimal code changes (4 lines to add support)

Use Cases

  • Adding distributed training to an existing single-GPU PyTorch script.
  • Seamlessly switching between different distributed backends (DDP, FSDP, DeepSpeed) without code changes.
  • Enabling mixed-precision training (FP16/BF16/FP8) with automatic configuration.
  • Simplifying multi-node and multi-GPU training setup.

Non-Goals

  • Providing a full-fledged deep learning framework with high-level abstractions like callbacks or schedulers (use PyTorch Lightning for that).
  • Managing multi-node orchestration beyond launching scripts (use Ray Train or similar).
  • Offering direct API control over advanced features of DeepSpeed or FSDP that are not exposed through Accelerate.

Workflow

  1. Install the 'accelerate' library.
  2. Add 4 lines of code to a PyTorch script to integrate Accelerate.
  3. Run 'accelerate config' to configure the distributed training setup interactively.
  4. Launch the training script using 'accelerate launch' with appropriate arguments.
  5. Optionally, configure mixed precision, gradient accumulation, or specific distributed backends (DeepSpeed, FSDP) via configuration or code.

Practices

  • Distributed Training
  • Code Simplification
  • Unified API Design

Prerequisites

  • PyTorch installed
  • Python environment
  • Basic understanding of distributed training concepts

Installation

First, add the marketplace

/plugin marketplace add Orchestra-Research/AI-Research-SKILLs
/plugin install AI-Research-SKILLs@ai-research-skills

Quality Score

Verified
97 /100
Analyzed about 20 hours ago

Trust Signals

Last commit16 days ago
Stars8.3k
LicenseMIT
Status
View Source

Similar Extensions

Huggingface Accelerate

99

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

Skill
davila7

Pytorch Lightning

99

High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate. Scales from laptop to supercomputer with same code. Use when you want clean training loops with built-in best practices.

Skill
Orchestra-Research

Ray Train

99

Distributed training orchestration across clusters. Scales PyTorch/TensorFlow/HuggingFace from laptop to 1000s of nodes. Built-in hyperparameter tuning with Ray Tune, fault tolerance, elastic scaling. Use when training massive models across multiple machines or running distributed hyperparameter sweeps.

Skill
Orchestra-Research

PyTorch Lightning

100

Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.

Skill
K-Dense-AI

Hf Cli

100

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastructure; managing Hugging Face repos; discussions and pull requests; browsing models, datasets and spaces; reading, searching, or browsing academic papers; managing collections; querying datasets; configuring spaces; setting up webhooks; or deploying and managing HF Inference Endpoints. Make sure to use this skill whenever the user mentions 'hf', 'huggingface', 'Hugging Face', 'huggingface-cli', or 'hugging face cli', or wants to do anything related to the Hugging Face ecosystem and to AI and ML in general. Also use for cloud storage needs like training checkpoints, data pipelines, or agent traces. Use even if the user doesn't explicitly ask for a CLI command. Replaces the deprecated `huggingface-cli`.

Skill
huggingface

PyHealth Clinical Pipelines

99

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer, RETAIN, GAMENet, SafeDrug, MICRON, StageNet, AdaCare, CNN/RNN/MLP), training with the PyHealth Trainer, computing clinical metrics, and using medical code utilities (ICD/ATC/NDC/RxNorm lookup and cross-mapping). Use this skill whenever the user mentions PyHealth, MIMIC, eICU, OMOP, EHR modeling, clinical prediction, drug recommendation, sleep staging, medical code mapping, ICD/ATC codes, or any healthcare ML pipeline that fits the dataset → task → model → trainer → metrics pattern, even if "PyHealth" isn't named explicitly.

Skill
K-Dense-AI

© 2025 SkillRepo · Find the right skill, skip the noise.