Skip to content

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

@paddle-bot
Copy link

paddle-bot bot commented Apr 23, 2024

Thanks for your contribution!

@codecov
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.

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
Contributor

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
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
@FeixLiu FeixLiu deleted the fix_fp16_overlap_bug branch November 27, 2024 05:09
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