Skip to main content
skill

distributed-training-accelerate — Claude Code skill

This skill shows how to adapt PyTorch training code for HuggingFace Accelerate. Use it to move from one GPU to distributed runs or configure mixed precision.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill ai-research/distributed-training-accelerate
Open on GitHub

What distributed-training-accelerate does

The skill walks through adding Accelerator to a PyTorch script, preparing the model, optimizer, and dataloader, then routing backpropagation through Accelerate. The same training code can be configured for DDP, DeepSpeed, FSDP, or Megatron and started with accelerate launch train.py.

Its examples cover the interactive accelerate config flow, FP16 and BF16, ZeRO-2, FSDP, and gradient accumulation. The installation instructions use pip install accelerate; torch and transformers are also listed as dependencies. The FP8 example targets H100 and later hardware, so check that requirement before choosing that mode.

What it helps with

  • adapt a single-GPU PyTorch script for multi-GPU training
  • configure training with DDP, DeepSpeed, or FSDP
  • enable FP16 or BF16 for a training run
  • accumulate gradients across batches

Example prompts for the agent

  • Show me how to add Accelerate to my PyTorch training script.
  • Configure train.py to run across multiple GPUs with DeepSpeed ZeRO-2.
  • Add gradient accumulation and BF16 mixed precision to this training loop.

How to install distributed-training-accelerate

1claude-code-templates

npx claude-code-templates@latest --skill ai-research/distributed-training-accelerate

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill distributed-training-accelerate -a claude-code

3Manually: put the files in place

~/.claude/skills/distributed-training-accelerate/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/distributed-training-accelerate/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about distributed-training-accelerate

How do I install distributed-training-accelerate in Claude Code?

Run npx claude-code-templates@latest --skill ai-research/distributed-training-accelerate.

What does distributed-training-accelerate do?

It guides you through using HuggingFace Accelerate with PyTorch for distributed training. The examples cover DDP, DeepSpeed, FSDP, and mixed precision.

What hardware does the FP8 example require?

The example specifies H100 or later for FP8. The installation instructions use pip install accelerate.

Similar skills

All skills for AI and ML →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor