Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mcore conversion bug #7846

Merged
merged 10 commits into from
Nov 7, 2023
Merged

Fix mcore conversion bug #7846

merged 10 commits into from
Nov 7, 2023

Conversation

cuichenx
Copy link
Collaborator

@cuichenx cuichenx commented Nov 1, 2023

What does this PR do ?

Fix mcore conversion script bug which affected GPT3 models. Also improve the UX of the script.

Collection: NLP

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
python scripts/nlp_language_modeling/convert_nemo_gpt_to_mcore.py --in-folder=<input-nemo-folder> --out-file=<output-mcore-ckpt>

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • 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:

  • 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.

Additional Information

@cuichenx cuichenx assigned aklife97 and unassigned aklife97 Nov 1, 2023
@cuichenx cuichenx requested a review from aklife97 November 1, 2023 23:02
aklife97
aklife97 previously approved these changes Nov 2, 2023
Copy link
Collaborator

@aklife97 aklife97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@aklife97
Copy link
Collaborator

aklife97 commented Nov 2, 2023

jenkins

@aklife97
Copy link
Collaborator

aklife97 commented Nov 2, 2023

jenkins

@ericharper
Copy link
Collaborator

jenkins

@cuichenx cuichenx requested a review from aklife97 November 3, 2023 21:23
@aklife97
Copy link
Collaborator

aklife97 commented Nov 3, 2023

jenkins

@cuichenx cuichenx merged commit 34bae82 into main Nov 7, 2023
12 checks passed
@cuichenx cuichenx deleted the chcui/fix_mcore_conversion_bug branch November 7, 2023 17:07
pzelasko pushed a commit to pzelasko/NeMo that referenced this pull request Jan 3, 2024
* fix bug for gpt

* add more user friendly messages for OOM

* rename in-file to in-folder and add overwrite option

* change print to logging

* fix issue where BF16+O1 nemo ckpt converted to FP32 mcore ckpt

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add warning for MegatronGPTSFTModel

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Piotr Żelasko <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* fix bug for gpt

* add more user friendly messages for OOM

* rename in-file to in-folder and add overwrite option

* change print to logging

* fix issue where BF16+O1 nemo ckpt converted to FP32 mcore ckpt

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add warning for MegatronGPTSFTModel

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants