Distributed Training distributed-training

Multi-GPU and distributed training patterns with PyTorch DDP.

Use it when scaling training across GPUs.

Works in Claude, ChatGPT, Codex and more
Our test
—
not tested yet
GitHub stars
15k
aiming-lab/autoresearchclaw
Added by
0
members
Updated
Dec 6
commit be4ba47
Content
1 file
no scripts · 1 KB
License
MIT
free to use

What our test found

Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.

View on GitHub ↗
name: distributed-training
description: Multi-GPU and distributed training patterns with PyTorch DDP. Use when scaling training across GPUs.
metadata:
  category: tooling
  trigger-keywords: "distributed,multi-gpu,parallel,ddp,scale"
  applicable-stages: "10,12"
  priority: "7"
  version: "1.0"
  author: researchclaw
  references: "PyTorch DDP Tutorial, pytorch.org; Goyal et al., Accurate Large Minibatch SGD, 2017"

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