How do you train a PyTorch model on multiple GPUs?
Wrap your model in DistributedDataParallel (DDP) if it fits on one GPU, or shard it with FSDP if it doesn't, and start one process per GPU with torchrun . On Nodus, nodus run --gpu H100:8 -- torchrun train.py runs that script on all eight GPUs of one machine with no launcher flags, and --nodes 2 --…
Read the full story at DEV Community — Machine Learning ↗
Timeline · 1 report
- 2026-10-28 01:38 · DEV Community — Machine Learning
How do you train a PyTorch model on multiple GPUs?