A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)
Enables existing MCore optimizations, mainly for parallelizing the checkpoint save and load.
These are a lot of small changes, but it made sense to group them into a single MR because they are all somehow interconnected.
Collection: NLP
Changelog
Enable MCoreDistOpt parallel R/W (controlled with model.dist_ckpt_parallel_save flag, loading is parallelized based on save)
Enable model weight save parallelization (controlled with model.dist_ckpt_parallel_save flag)
Set model.dist_ckpt_parallel_save flag to True by default (increases performance and allows DistOpt ckpt resharding; the only caveat is potentially larger number of files in the checkpoint: O(ranks * model.dist_ckpt_torch_dist_multiproc)
Enable model weight load parallelization (controlled with model.dist_ckpt_parallel_load flag)
Allow increasing intra-rank save parallelization with multiprocessing (controlled with model.dist_ckpt_torch_dist_multiproc flag)
Skip state dict validation in subsequent saves (controlled with model.dist_ckpt_assume_constant_structure flag)
Remove some async-related code that was moved to MCore (whole nemo/utils/callbacks/torch_dist_async.py file)
Usage
Use by enabling the flags mentioned in the changelog.
# Add a code snippet demonstrating how to use this
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
[ ] Did you add or update any necessary documentation?
[ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
[ ] Reviewer: Does the PR have correct import guards for all optional libraries?
PR Type:
[x] New Feature
[ ] Bugfix
[ ] Documentation
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
What does this PR do ?
Enables existing MCore optimizations, mainly for parallelizing the checkpoint save and load. These are a lot of small changes, but it made sense to group them into a single MR because they are all somehow interconnected.
Collection: NLP
Changelog
model.dist_ckpt_parallel_save
flag, loading is parallelized based on save)model.dist_ckpt_parallel_save
flag)model.dist_ckpt_parallel_save
flag to True by default (increases performance and allows DistOpt ckpt resharding; the only caveat is potentially larger number of files in the checkpoint:O(ranks * model.dist_ckpt_torch_dist_multiproc
)model.dist_ckpt_parallel_load
flag)model.dist_ckpt_torch_dist_multiproc
flag)model.dist_ckpt_assume_constant_structure
flag)nemo/utils/callbacks/torch_dist_async.py
file)Usage
Use by enabling the flags mentioned in the changelog.
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR. To re-run CI remove and add the label again. To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed. Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information