NVIDIA / NeMo

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)
https://docs.nvidia.com/nemo-framework/user-guide/latest/overview.html
Apache License 2.0
10.82k stars 2.26k forks source link

Distributed optimizer aligns FP8 transposes over pipeline-parallel group #9481

Open timmoon10 opened 2 weeks ago

timmoon10 commented 2 weeks ago

What does this PR do ?

When training GPT in FP8 with interleaved pipeline parallelism, we have experienced some GPU idling due to load imbalances across the pipeline parallel group. The first microbatch in a training step requires computing an FP8 weight transpose, which is reused in later microbatches. The fix is to align the FP8 weight transposes across the pipeline parallel group, similar to how we align param all-gathers and grad reduce-scatters (see https://github.com/NVIDIA/apex/pull/1611 and https://github.com/NVIDIA/NeMo/pull/6183).

Collection: NLP

Changelog

Usage

Run GPT, e.g. with the config at https://github.com/NVIDIA/NeMo/blob/main/examples/nlp/language_modeling/conf/megatron_gpt_config.yaml.

The following settings are required for this optimization:

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

github-actions[bot] commented 2 days ago

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.