| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Yuchen Fan <functionhx@gmail.com>
There was a problem hiding this comment.
Hi @Functionhx,
Thank you for submitting this PR! This looks good to me.
I know this type of bug is very hard to find and fix. I appreciate your continuous contribution.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks for the PR!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fix repeated gradient accumulation scaling when pipeline parallelism is combined with gradient accumulation.
Every pipeline stage registers an output backward hook that scales gradients by gradient_accumulation_steps. The last stage therefore scales the gradient correctly before sending it upstream, but each preceding stage scales the already-scaled gradient again.
Fixes #8152
Changes
Testing