|
Download examples/simple/distributed/README.md from camenduru/apex: direct link, hf CLI and curl.
- Browser
- Download file 762 Bytes
-
https://huggingface.co/camenduru/apex/resolve/main/examples/simple/distributed/README.md
- Command line
-
hf download hf://camenduru/apex/examples/simple/distributed/README.md
-
curl -L -o README.md https://huggingface.co/camenduru/apex/resolve/main/examples/simple/distributed/README.md
762 Bytes
| **distributed_data_parallel.py** and **run.sh** show an example using Amp with | |
| [apex.parallel.DistributedDataParallel](https://nvidia.github.io/apex/parallel.html) or | |
| [torch.nn.parallel.DistributedDataParallel](https://pytorch.org/docs/stable/nn.html#distributeddataparallel) | |
| and the Pytorch multiprocess launcher script, | |
| [torch.distributed.launch](https://pytorch.org/docs/master/distributed.html#launch-utility). | |
| The use of `Amp` with DistributedDataParallel does not need to change from ordinary | |
| single-process use. The only gotcha is that wrapping your model with `DistributedDataParallel` must | |
| come after the call to `amp.initialize`. Test via | |
| ```bash | |
| bash run.sh | |
| ``` | |
| **This is intended purely as an instructional example, not a performance showcase.** | |