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 bug for fp16 + delay_scale_loss_scale + sharding_stage1_overlap #8314

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

FeixLiu
Copy link
Contributor

@FeixLiu FeixLiu commented Apr 23, 2024

PR types

Others

PR changes

Others

Description

fix bug for fp16 + delay_scale_loss_scale + sharding_stage1_overlap

Copy link

paddle-bot bot commented Apr 23, 2024

Thanks for your contribution!

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 55.33%. Comparing base (e67fd78) to head (801815c).
Report is 2 commits behind head on develop.

Files Patch % Lines
paddlenlp/trainer/trainer.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8314      +/-   ##
===========================================
- Coverage    55.33%   55.33%   -0.01%     
===========================================
  Files          614      614              
  Lines        95341    95342       +1     
===========================================
  Hits         52753    52753              
- Misses       42588    42589       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1013,6 +1013,7 @@ def _inner_training_loop(
self.timers and self.timers("optimizer-step").start()

if self.args.gradient_accumulation_steps > 1 and self._enable_delay_scale_loss():
paddle.device.synchronize()
Copy link
Collaborator

Choose a reason for hiding this comment

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

不会影响性能吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不会,这块必须不能有overlap。这儿需要有个同步,不然可能出现这个grad还没通讯完就做scale的问题。

@wawltor wawltor merged commit eaca5b2 into PaddlePaddle:develop Apr 24, 2024
8 of 11 checks passed
FeixLiu added a commit to FeixLiu/PaddleNLP that referenced this pull request Apr 24, 2024
FeixLiu added a commit to FeixLiu/PaddleNLP that referenced this pull request Apr 24, 2024
wawltor pushed a commit that referenced this pull request Apr 24, 2024
wawltor pushed a commit that referenced this pull request Apr 24, 2024
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