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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- Use DistributedDataParallel (DDP) over DataParallel for multi-GPU
- Initialize process group: dist.init_process_group(backend='nccl')
- Use DistributedSampler for data sharding
- Synchronize batch norm: nn.SyncBatchNorm.convert_sync_batchnorm()
- Only save checkpoint on rank 0
- Scale learning rate linearly with world size
- 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.
Popularity
- GitHub stars
- 15k
- Ranking position
- #11075
- License
- MIT
- Updated
- 8/19/2026
Comments
- …
More skills from this repository
a-evolve
15kHelps your agent improve over repeated runs by diagnosing failures, creating targeted skills from error patterns, and recording lessons for later use.
biology-biopython
15kHelps your agent work with DNA, RNA, and protein sequences using Biopython, including file parsing, sequence calculations, BLAST searches, and database access.
chemistry-rdkit
15kHelps your agent analyze molecules written as SMILES strings with RDKit, including descriptors, fingerprints, similarity, and substructure search.
hypothesis-formulation
15kHelps your agent turn an observation into testable hypotheses, with competing explanations and clear predictions that could prove them wrong.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.