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

SFT patch: (1) enable sequence parallelism and (2) enable profile #7963

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

erhoo82
Copy link
Collaborator

@erhoo82 erhoo82 commented Dec 2, 2023

What does this PR do ?

SFT patch: (1) enable sequence parallelism and (2) enable profile

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 

Jenkins CI

To run Jenkins, a NeMo User with write access must comment jenkins on the PR.

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 Dec 2, 2023
self._reset_activation_checkpointing_args()
self._reset_sequence_parallelism_args()
Copy link
Collaborator

@ericharper ericharper Dec 5, 2023

Choose a reason for hiding this comment

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

This is good we need to remove from the constructor. But we probably need conditionals for the other calls.

@hsiehjackson could you please review?

@ericharper
Copy link
Collaborator

jenkins

Copy link
Collaborator

@hsiehjackson hsiehjackson left a comment

Choose a reason for hiding this comment

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

@erhoo82 one question: if we want to do inference, do we still need this assert in generation mode?

@erhoo82
Copy link
Collaborator Author

erhoo82 commented Dec 8, 2023

@hsiehjackson
I don't know the background of why this is set as False for inference.
When we remove this condition, we use sequence parallelism for both training and inference but I didn't see any issue with this.

@hsiehjackson
Copy link
Collaborator

@erhoo82 for inference do you mean generation mode instead of calculating validation loss? This assert needs config sequence_parallel == False. I think if you remove _reset_sequence_parallelism_args for models with sequence parallel, we may get assertion error during generation.

Copy link
Collaborator

@hsiehjackson hsiehjackson left a comment

Choose a reason for hiding this comment

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

LGTM

@hsiehjackson
Copy link
Collaborator

jenkins

@hsiehjackson hsiehjackson merged commit e482965 into main Dec 18, 2023
15 checks passed
@hsiehjackson hsiehjackson deleted the sft_patch branch December 18, 2023 20:18
pzelasko pushed a commit to pzelasko/NeMo that referenced this pull request Jan 3, 2024
…IDIA#7963)

* SFT profile start and end step fix

Signed-off-by: Sangkug Lym <[email protected]>

* Removed sequence parallelism assertion check

Signed-off-by: Selvaraj Anandaraj <[email protected]>

---------

Signed-off-by: Sangkug Lym <[email protected]>
Signed-off-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Cheng-Ping Hsieh <[email protected]>
Signed-off-by: Piotr Żelasko <[email protected]>
ssh-meister pushed a commit to ssh-meister/NeMo that referenced this pull request Feb 15, 2024
…IDIA#7963)

* SFT profile start and end step fix

Signed-off-by: Sangkug Lym <[email protected]>

* Removed sequence parallelism assertion check

Signed-off-by: Selvaraj Anandaraj <[email protected]>

---------

Signed-off-by: Sangkug Lym <[email protected]>
Signed-off-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Cheng-Ping Hsieh <[email protected]>
Signed-off-by: Sasha Meister <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
…IDIA#7963)

* SFT profile start and end step fix

Signed-off-by: Sangkug Lym <[email protected]>

* Removed sequence parallelism assertion check

Signed-off-by: Selvaraj Anandaraj <[email protected]>

---------

Signed-off-by: Sangkug Lym <[email protected]>
Signed-off-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Selvaraj Anandaraj <[email protected]>
Co-authored-by: Cheng-Ping Hsieh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to NeMo Core NLP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants