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

remove nemo.collection.nlp imports from nemo2 #11904

Merged
merged 107 commits into from
Feb 13, 2025
Merged

Conversation

dimapihtar
Copy link
Collaborator

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Collection: [Note which collection this PR will affect]

Changelog

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

Usage

  • You can potentially add a usage example below
# 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".

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

  • Related to # (issue)

@dimapihtar dimapihtar changed the title Dpykhtar/nemo2 transition remove nemo.collection.nlp imports from nemo2 Jan 20, 2025
@dimapihtar dimapihtar marked this pull request as ready for review January 27, 2025 19:48
)

model_cfg.transformer_layer_spec = get_gpt_layer_modelopt_spec(num_experts=model_cfg.num_moe_experts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM as for changes to nemo/collections/llm/quantization

dimapihtar and others added 3 commits January 29, 2025 15:57
Co-authored-by: Ananth Subramaniam <[email protected]>
Signed-off-by: Dmytro Pykhtar <[email protected]>
dimapihtar and others added 5 commits February 10, 2025 05:16
Signed-off-by: dimapihtar <[email protected]>
Signed-off-by: dimapihtar <[email protected]>
Signed-off-by: dimapihtar <[email protected]>
Signed-off-by: dimapihtar <[email protected]>
dimapihtar and others added 2 commits February 10, 2025 09:38
Signed-off-by: dimapihtar <[email protected]>
Copy link
Contributor

[🤖]: Hi @dimapihtar 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully

So it might be time to merge this PR or get some approvals

I'm just a bot so I'll leave it you what to do next.

//cc @pablo-garay @ko3n1g

Copy link
Collaborator

@cuichenx cuichenx left a comment

Choose a reason for hiding this comment

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

GPT data and LoRA look good to me!

Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

Blocking until we code freeze.

Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

Removing block after code freeze.

@ericharper ericharper merged commit 8236f52 into main Feb 13, 2025
232 of 233 checks passed
@ericharper ericharper deleted the dpykhtar/nemo2_transition branch February 13, 2025 18:19
tomlifu pushed a commit to tomlifu/NeMo that referenced this pull request Feb 20, 2025
* move torch_dtype_from_precision function to nemo2

Signed-off-by: dimapihtar <[email protected]>

* move average_losses_across_data_parallel_group to nemo2

Signed-off-by: dimapihtar <[email protected]>

* move nemo1 gemma2 modules to nemo2

Signed-off-by: dimapihtar <[email protected]>

* move get_gpt_full_te_layer_autocast_spec to nemo2

Signed-off-by: dimapihtar <[email protected]>

* move get_gpt_layer_modelopt_spec function to nemo2

Signed-off-by: dimapihtar <[email protected]>

* remove nemo1 imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* move BertEmbeddingDataset class to nemo2

Signed-off-by: dimapihtar <[email protected]>

* remove nemo1 imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* remove get_gpt_full_te_layer_autocast_spec implementation

Signed-off-by: dimapihtar <[email protected]>

* revert changes

Signed-off-by: dimapihtar <[email protected]>

* use get_gpt_layer_modelopt_spec from mcore

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* revert change

Signed-off-by: dimapihtar <[email protected]>

* revert changes

Signed-off-by: dimapihtar <[email protected]>

* move torch_dtype_from_precision to llm.utils

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* Update nemo/collections/llm/utils.py

Co-authored-by: Ananth Subramaniam <[email protected]>
Signed-off-by: Dmytro Pykhtar <[email protected]>

* copy GPTSFTDataset to nemo2

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add copyright

Signed-off-by: dimapihtar <[email protected]>

* fix styling

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* copy T5SFTDataset to nemo2

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* copy ParallelLinearAdapter to nemo2

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* remove unused import

Signed-off-by: dimapihtar <[email protected]>

* copy BertEmbeddingDataset to nemo2

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix TE import issue

Signed-off-by: dimapihtar <[email protected]>

* fix TE import

Signed-off-by: dimapihtar <[email protected]>

* fix circular import error

Signed-off-by: dimapihtar <[email protected]>

* copy logit_softcapping func to nemo2

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* move function

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* add import

Signed-off-by: dimapihtar <[email protected]>

* add function

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add safe imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* use safe imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* remove unused import

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* remove unused import

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add docstrings

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add docstrings

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add docstrings

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* add docstring

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix syntax error

Signed-off-by: dimapihtar <[email protected]>

* fix syntax error

Signed-off-by: dimapihtar <[email protected]>

* fix syntax error

Signed-off-by: dimapihtar <[email protected]>

* remove comment

Signed-off-by: dimapihtar <[email protected]>

* switch to mcore helpers_cpp

Signed-off-by: dimapihtar <[email protected]>

* fix copyright message

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* move data classes to utils

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix style

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

* fix imports

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* fix import

Signed-off-by: dimapihtar <[email protected]>

* Apply isort and black reformatting

Signed-off-by: dimapihtar <[email protected]>

---------

Signed-off-by: dimapihtar <[email protected]>
Signed-off-by: dimapihtar <[email protected]>
Signed-off-by: Dmytro Pykhtar <[email protected]>
Co-authored-by: dimapihtar <[email protected]>
Co-authored-by: Ananth Subramaniam <[email protected]>
Co-authored-by: oliver könig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants