Skip to content
Skillpedia
Machine learning15k · #11075

distributed-training

What it does

The skill gives patterns for training on multiple GPUs. It is for practitioners who need faster training than one GPU allows.

When to use it

  • ✓When you want to scale model training across several GPUs.
  • ✓When you move from single-GPU to multi-GPU training with PyTorch.
  • ✓When you need to save checkpoints or scale the learning rate in a multi-GPU setup.

Skill link

https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/tooling/distributed-training/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/tooling/distributed-training/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Move my PyTorch training script to four GPUs with DistributedDataParallel.”

5 new skills a week. 1 minute to read.

How it works

The agent recommends DistributedDataParallel, initializing the process group, sharding data with a distributed sampler, syncing batch norm, saving checkpoints from one process, and scaling the learning rate.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Distributed Training Best Practice

  1. Use DistributedDataParallel (DDP) over DataParallel for multi-GPU
  2. Initialize process group: dist.init_process_group(backend='nccl')
  3. Use DistributedSampler for data sharding
  4. Synchronize batch norm: nn.SyncBatchNorm.convert_sync_batchnorm()
  5. Only save checkpoint on rank 0
  6. Scale learning rate linearly with world size
  7. Use gradient accumulation for effectively larger batch sizes
FAQ

Why not use DataParallel?

The skill recommends DistributedDataParallel for multi-GPU training over DataParallel.

Who should save checkpoints?

Only the main process, rank zero, so files are not written several times.

How should the learning rate change?

Scale it linearly with the number of processes.

Details

Original description by the author

Multi-GPU and distributed training patterns with PyTorch DDP. Use when scaling training across GPUs.

repo: aiming-lab/AutoResearchClaw

Popularity

GitHub stars
15k
Ranking position
#11075
License
MIT
Updated
8/19/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills