跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

HuggingFace Accelerate

技能 已验证 活跃

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.

目的

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.

功能

  • 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)

使用场景

  • 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.

非目标

  • 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.

工作流

  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.

实践

  • Distributed Training
  • Code Simplification
  • Unified API Design

先决条件

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

安装

请先添加 Marketplace

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

质量评分

已验证
97 /100
1 day ago 分析

信任信号

最近提交17 days ago
星标8.3k
许可证MIT
状态
查看源代码

类似扩展

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.

技能
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.

技能
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.

技能
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.

技能
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`.

技能
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.

技能
K-Dense-AI