-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bug fix to reset sequence parallelism #6756
Conversation
Signed-off-by: Markel Sanz Ausin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Signed-off-by: Markel Sanz Ausin <[email protected]>
@@ -1186,5 +1186,6 @@ def _restore_sequence_parallelism_args(self): | |||
self.cfg.sequence_parallel = self.last_sequence_parallel | |||
|
|||
# Restore model parameters. | |||
for module in self.get_gpt_module_list(): | |||
module.language_model.encoder.sequence_parallel = self.last_sequence_parallel | |||
for module in self.model.modules(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be a double loop:
for module in self.get_gpt_module_list():
for mod in module.modules():
if hasattr(mod, "sequence_parallel"):
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Please double check @ericharper
Signed-off-by: Markel Sanz Ausin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
* Bug fix to reset sequence parallelism Signed-off-by: Markel Sanz Ausin <[email protected]> * Update seq par reset/restore Signed-off-by: Markel Sanz Ausin <[email protected]> * Add nested loop Signed-off-by: Markel Sanz Ausin <[email protected]> --------- Signed-off-by: Markel Sanz Ausin <[email protected]>
* Bug fix to reset sequence parallelism * Update seq par reset/restore * Add nested loop --------- Signed-off-by: Markel Sanz Ausin <[email protected]> Co-authored-by: Markel Sanz Ausin <[email protected]>
* Bug fix to reset sequence parallelism * Update seq par reset/restore * Add nested loop --------- Signed-off-by: Markel Sanz Ausin <[email protected]> Co-authored-by: Markel Sanz Ausin <[email protected]> Signed-off-by: hsiehjackson <[email protected]>
* Bug fix to reset sequence parallelism Signed-off-by: Markel Sanz Ausin <[email protected]> * Update seq par reset/restore Signed-off-by: Markel Sanz Ausin <[email protected]> * Add nested loop Signed-off-by: Markel Sanz Ausin <[email protected]> --------- Signed-off-by: Markel Sanz Ausin <[email protected]>
What does this PR do ?
Fixes sequence parallelism reset function to set the value to False instead of None.
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use this
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