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

[NeMo-UX] Make TE and Apex dependencies optional #9550

Merged
merged 48 commits into from
Jul 15, 2024

Conversation

ashors1
Copy link
Collaborator

@ashors1 ashors1 commented Jun 26, 2024

What does this PR do ?

This PR provides a fallback codepath that defaults to pure Pytorch/jit when TE and Apex are not installed. Note that this is specifically designed to work with NeMo 2.0, so there are no guarantees when running with NeMo 1.0 models.

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)

@github-actions github-actions bot added core Changes to NeMo Core NLP labels Jun 26, 2024
@ashors1 ashors1 changed the title Ashors/remove te apex deps Make TE and Apex dependencies optional Jun 26, 2024
@github-actions github-actions bot removed the core Changes to NeMo Core label Jun 26, 2024
@ashors1 ashors1 marked this pull request as draft June 26, 2024 23:39
Comment on lines 290 to 295
# def check_adlr_autoresume_termination(iteration, model, optimizer, lr_scheduler, save: bool):
# """Check for autoresume signal and exit if it is received."""
# from apex.ppu.checkpointing import save_checkpoint
#
# autoresume = get_adlr_autoresume()
# # Add barrier to ensure consistency.
# torch.distributed.barrier()
# if autoresume.termination_requested():
# if save:
# save_checkpoint(iteration, model, optimizer, lr_scheduler)
# print_rank_0(">>> autoresume termination request found!")
# if torch.distributed.get_rank() == 0:
# autoresume.request_resume()
# print_rank_0(">>> training terminated. Returning")
# sys.exit(0)

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
nemo/lightning/apex_utils.py Fixed Show fixed Hide fixed
nemo/lightning/data.py Fixed Show fixed Hide fixed
nemo/lightning/apex_utils.py Fixed Show fixed Hide fixed
nemo/lightning/apex_utils.py Fixed Show fixed Hide fixed
nemo/lightning/apex_utils.py Fixed Show fixed Hide fixed
nemo/lightning/apex_utils.py Fixed Show fixed Hide fixed
@github-actions github-actions bot added the CI label Jun 30, 2024
@ericharper ericharper requested review from dimapihtar and removed request for marcromeyn and akoumpa July 3, 2024 19:12
@@ -99,6 +99,9 @@
TransformerConfig = ApexGuardDefaults

HAVE_MEGATRON_CORE = False
from typing import Any

RetroConfig = Any
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to do the same for all of others mcore's classes we are trying to import under "try" block?
also, why don't use ApexGuardDefaults?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

do we want to do the same for all of others mcore's classes we are trying to import under "try" block?

So this PR is intended to provide a pure pytorch/jit path for NeMo 2.0, so things are not guaranteed to work with NeMo 1.0 models (I have updated the description to reflect this). I added this change because previously, the import of the Retro model in https://github.com/NVIDIA/NeMo/blob/bdb4e89d9ac33d733f8ea7b21552628dda798825/nemo/collections/nlp/models/language_modeling/__init__.py was breaking the 2.0 codepath, but it looks like that's no longer the case anymore. If it makes things clearer, I go ahead and revert this change.

nemo/lightning/data.py Outdated Show resolved Hide resolved
nemo/lightning/megatron_parallel.py Outdated Show resolved Hide resolved
nemo/lightning/pytorch/plugins/data_sampler.py Outdated Show resolved Hide resolved
nemo/collections/llm/gpt/model/base.py Outdated Show resolved Hide resolved
@ashors1 ashors1 marked this pull request as ready for review July 5, 2024 06:47
@ashors1 ashors1 changed the title Make TE and Apex dependencies optional [NeMo-UX] Make TE and Apex dependencies optional Jul 5, 2024
examples/llm/megatron_gpt_pretraining.py Fixed Show fixed Hide fixed
setup_microbatch_calculator,
)

HAVE_APEX = True

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable HAVE_APEX is not used.
@ashors1 ashors1 force-pushed the ashors/remove-te-apex-deps branch from ed46aec to 9e0fbbd Compare July 5, 2024 19:50
@ashors1 ashors1 marked this pull request as draft July 5, 2024 19:56
@ashors1 ashors1 force-pushed the ashors/remove-te-apex-deps branch from 6f3f671 to 6abeff6 Compare July 5, 2024 20:05
@ashors1 ashors1 marked this pull request as ready for review July 5, 2024 20:06
@github-actions github-actions bot removed the core Changes to NeMo Core label Jul 5, 2024
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jul 12, 2024
Signed-off-by: ashors1 <ashors@nvidia.com>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jul 12, 2024
Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors@nvidia.com>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jul 12, 2024
Signed-off-by: ashors1 <ashors@nvidia.com>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jul 12, 2024
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
@ashors1 ashors1 added Run CICD and removed Run CICD labels Jul 12, 2024
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!

@ericharper ericharper merged commit bbf5631 into r2.0.0rc1 Jul 15, 2024
116 checks passed
@ericharper ericharper deleted the ashors/remove-te-apex-deps branch July 15, 2024 04:06
ashors1 added a commit that referenced this pull request Jul 15, 2024
* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
ashors1 added a commit that referenced this pull request Jul 15, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
nikitaved pushed a commit to nikitaved/NeMo that referenced this pull request Jul 16, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (NVIDIA#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
@ko3n1g ko3n1g mentioned this pull request Jul 18, 2024
2 tasks
ertkonuk pushed a commit that referenced this pull request Jul 19, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
Signed-off-by: Tugrul Konuk <ertkonuk@gmail.com>
malay-nagda pushed a commit to malay-nagda/NeMo that referenced this pull request Jul 26, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (NVIDIA#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
Signed-off-by: Malay Nagda <malayn@malayn-mlt.client.nvidia.com>
tonyjie pushed a commit to tonyjie/NeMo that referenced this pull request Aug 6, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (NVIDIA#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
Signed-off-by: tonyjie <jl4257@cornell.edu>
dimapihtar pushed a commit that referenced this pull request Aug 27, 2024
* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
monica-sekoyan pushed a commit that referenced this pull request Oct 14, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 5, 2024
* [NeMo-UX] Make TE and Apex dependencies optional (NVIDIA#9550)

* Provide a pure pytorch/jit path to avoid required dependency on TE and Apex

Signed-off-by: ashors1 <ashors@nvidia.com>

* add missing file

Signed-off-by: ashors1 <ashors@nvidia.com>

* add minimal gpt pretraining example

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix pre-training datamodule initialization

Signed-off-by: ashors1 <ashors@nvidia.com>

* add non-te/non-apex test

Signed-off-by: ashors1 <ashors@nvidia.com>

* add comment to pretraining script

Signed-off-by: ashors1 <ashors@nvidia.com>

* use microbatch calculator from mcore

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix nemo 2 test name

Signed-off-by: ashors1 <ashors@nvidia.com>

* update Mcore commit for CI

Signed-off-by: ashors1 <ashors@nvidia.com>

* replace apex microbatch calculator with megatron's in more places

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix missing import

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix missed apex import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: ashors1 <ashors@nvidia.com>

* move imports

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* add types to command-line args

Signed-off-by: ashors1 <ashors@nvidia.com>

* bug fix

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix path

Signed-off-by: ashors1 <ashors@nvidia.com>

* Disable distributed optimizer in nemo 2.0 test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix optimizer config

Signed-off-by: ashors1 <ashors@nvidia.com>

* update checkpointing

Signed-off-by: ashors1 <ashors@nvidia.com>

* move import

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* fix failing unit test

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix failing test

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* Updating num_weights check of RETRO due to underlying changes from mcore RETRO MLM

Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>

* Apply isort and black reformatting

Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

* remove stale warning

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix lora notebook

Signed-off-by: ashors1 <ashors@nvidia.com>

* fix small typo

Signed-off-by: ashors1 <ashors@nvidia.com>

* add import guards to gemma2

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>

* fix cherry-pick

Signed-off-by: ashors1 <ashors@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: ashors1 <ashors1@users.noreply.github.com>

---------

Signed-off-by: ashors1 <ashors@nvidia.com>
Signed-off-by: ashors1 <ashors1@users.noreply.github.com>
Signed-off-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Signed-off-by: huvunvidia <huvunvidia@users.noreply.github.com>
Co-authored-by: ashors1 <ashors1@users.noreply.github.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Co-authored-by: huvunvidia <86480512+huvunvidia@users.noreply.github.com>
Co-authored-by: huvunvidia <huvunvidia@users.noreply.github.com>
Signed-off-by: Hainan Xu <hainanx@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants