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

[zero] revert PR #3166, it disabled grad clip for bf16 #3790

Merged
merged 29 commits into from
Jul 3, 2023
Merged

Conversation

jeffra
Copy link
Contributor

@jeffra jeffra commented Jun 22, 2023

#3166 inadvertently disabled gradient clipping when using bf16. The original intention was to remove grad scaling when using bf16, however when using bf16 the loss scale is forced to 1.0 which will result in no grad scaling occurring.

HeyangQin and others added 6 commits June 21, 2023 11:51
* fix conv_flops_compute when padding is a str when stride=1

* fix error

* change type of paddings to tuple

* fix padding calculation

* apply formatting check

---------

Co-authored-by: Cheng Li <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
* Update profiler.py

* pre-commit run --all-files

* Delete .DS_Store

* Delete .DS_Store

* Delete .DS_Store

---------

Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Cheng Li <[email protected]>
jeffra and others added 16 commits June 22, 2023 11:56
* zeropp chinese blog

* try better quality images

* make title larger

* even larger...

* various fix

* center captions

* more fixes

* fix format
Co-authored-by: Stephen Youn <[email protected]>
Co-authored-by: Arash Bakhtiari <[email protected]>
Co-authored-by: Cheng Li <[email protected]>
Co-authored-by: Ethan Doe <[email protected]>
Co-authored-by: yidoe <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: HeyangQin <[email protected]>
Co-authored-by: GuanhuaWang <[email protected]>
Co-authored-by: cmikeh2 <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Michael Wyatt <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
Co-authored-by: Reza Yazdani <[email protected]>
* zeropp chinese blog

* try better quality images

* make title larger

* even larger...

* various fix

* center captions

* more fixes

* fix format

* add ZeRO++ Japanese blog

* add links

---------

Co-authored-by: HeyangQin <[email protected]>
Co-authored-by: Conglong Li <[email protected]>
* fix autotuner when backward is not called

* fix format

---------

Co-authored-by: Olatunji Ruwase <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Logan Adams <[email protected]>
* Bug fix

* Fixed formatting error

---------

Co-authored-by: Logan Adams <[email protected]>
Co-authored-by: Stephen Youn <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
@guoyejun
Copy link
Contributor

thanks, good catch, yes, this is the grad clip to avoid exploding, no matter which format is used. It is independent with loss scale of fp16.

@tjruwase tjruwase merged commit 691d246 into master Jul 3, 2023
17 checks passed
@mrwyattii mrwyattii deleted the revert-3166 branch July 7, 2023 02:37
zhangir-azerbayev pushed a commit to EleutherAI/DeeperSpeed that referenced this pull request Aug 4, 2023
…osoft#3790)

* zero++ tutorial PR (microsoft#3783)

* [Fix] _conv_flops_compute when padding is a str and stride=1 (microsoft#3169)

* fix conv_flops_compute when padding is a str when stride=1

* fix error

* change type of paddings to tuple

* fix padding calculation

* apply formatting check

---------

Co-authored-by: Cheng Li <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>

* fix interpolate flops compute (microsoft#3782)

* use `Flops Profiler` to test `model.generate()` (microsoft#2515)

* Update profiler.py

* pre-commit run --all-files

* Delete .DS_Store

* Delete .DS_Store

* Delete .DS_Store

---------

Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Cheng Li <[email protected]>

* revert PR microsoft#3166, it disabled grad clip for bf16

* ensure no loss scaling for non-fp16 dtypes

* revert PR microsoft#3611 (microsoft#3786)

* bump to 0.9.6

* ZeRO++ chinese blog (microsoft#3793)

* zeropp chinese blog

* try better quality images

* make title larger

* even larger...

* various fix

* center captions

* more fixes

* fix format

* remove staging trigger (microsoft#3792)

* DeepSpeed-Triton for Inference (microsoft#3748)

Co-authored-by: Stephen Youn <[email protected]>
Co-authored-by: Arash Bakhtiari <[email protected]>
Co-authored-by: Cheng Li <[email protected]>
Co-authored-by: Ethan Doe <[email protected]>
Co-authored-by: yidoe <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>

* ZeRO++ (microsoft#3784)

Co-authored-by: HeyangQin <[email protected]>
Co-authored-by: GuanhuaWang <[email protected]>
Co-authored-by: cmikeh2 <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Michael Wyatt <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
Co-authored-by: Reza Yazdani <[email protected]>

* adding zero++ to navigation panel of deepspeed.ai (microsoft#3796)

* Add ZeRO++ Japanese blog (microsoft#3797)

* zeropp chinese blog

* try better quality images

* make title larger

* even larger...

* various fix

* center captions

* more fixes

* fix format

* add ZeRO++ Japanese blog

* add links

---------

Co-authored-by: HeyangQin <[email protected]>
Co-authored-by: Conglong Li <[email protected]>

* Bug Fixes for autotuner and flops profiler (microsoft#1880)

* fix autotuner when backward is not called

* fix format

---------

Co-authored-by: Olatunji Ruwase <[email protected]>

* Missing strided copy for gated MLP (microsoft#3788)

Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Logan Adams <[email protected]>

* Requires grad checking. (microsoft#3789)

Co-authored-by: Jeff Rasley <[email protected]>

* bump to 0.10.0

* Fix Bug in transform.cu (microsoft#3534)

* Bug fix

* Fixed formatting error

---------

Co-authored-by: Logan Adams <[email protected]>

* bug fix: triton importing error (microsoft#3799)

Co-authored-by: Stephen Youn <[email protected]>
Co-authored-by: Jeff Rasley <[email protected]>

---------

Co-authored-by: Heyang Qin <[email protected]>
Co-authored-by: Bill Luo <[email protected]>
Co-authored-by: Cheng Li <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
Co-authored-by: Guorun <[email protected]>
Co-authored-by: stephen youn <[email protected]>
Co-authored-by: Stephen Youn <[email protected]>
Co-authored-by: Arash Bakhtiari <[email protected]>
Co-authored-by: Ethan Doe <[email protected]>
Co-authored-by: yidoe <[email protected]>
Co-authored-by: GuanhuaWang <[email protected]>
Co-authored-by: cmikeh2 <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: Michael Wyatt <[email protected]>
Co-authored-by: Reza Yazdani <[email protected]>
Co-authored-by: Masahiro Tanaka <[email protected]>
Co-authored-by: Conglong Li <[email protected]>
Co-authored-by: Logan Adams <[email protected]>
Co-authored-by: Joe Mayer <[email protected]>
Co-authored-by: Ramya Ramineni <[email protected]>
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.

None yet