Instructions to use KexuanShi/Megatron-LM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use KexuanShi/Megatron-LM with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
|
Download docs/api-guide/core/distributed.md from KexuanShi/Megatron-LM: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/KexuanShi/Megatron-LM/resolve/main/docs/api-guide/core/distributed.md
- Command line
-
hf download hf://KexuanShi/Megatron-LM/docs/api-guide/core/distributed.md
-
curl -L -o distributed.md https://huggingface.co/KexuanShi/Megatron-LM/resolve/main/docs/api-guide/core/distributed.md
497 Bytes
distributed package
This package contains various utilities to finalize model weight gradients
on each rank before the optimizer step. This includes a distributed data
parallelism wrapper to all-reduce or reduce-scatter the gradients across
data-parallel replicas, and a finalize_model_grads method to
synchronize gradients across different parallelism modes (e.g., 'tied'
layers on different pipeline stages, or gradients for experts in a MoE on
different ranks due to expert parallelism).