Distributed Training
Distributed training with Optimum Habana
As models get bigger, parallelism has emerged as a strategy for training larger models on limited hardware and accelerating training speed by several orders of magnitude.
All the PyTorch examples and the GaudiTrainer
script work out of the box with distributed training. There are two ways of launching them:
Using the gaudi_spawn.py script:
Copied
where --argX
is an argument of the script to run in a distributed way. Examples are given for question answering here and text classification here.
Using the
DistributedRunner
directly in code:
Copied
You can set the training argument --distribution_strategy fast_ddp
for simpler and usually faster distributed training management. More information here.
To go further, we invite you to read our guides about:
DeepSpeed to train bigger models
Multi-node training to speed up even more your distributed runs
Last updated