Skip to content

fix: gradient should be averaged instead of summed across mbs#86

Merged
parthchadha merged 5 commits intomainfrom
pchadha/loss-scaling
Mar 27, 2025
Merged

fix: gradient should be averaged instead of summed across mbs#86
parthchadha merged 5 commits intomainfrom
pchadha/loss-scaling

Conversation

@parthchadha
Copy link
Copy Markdown
Contributor

@parthchadha parthchadha commented Mar 26, 2025

What does this PR do ?

Gradients were earlier accumulated across mbs instead of using average across mbs.

Add a one line overview of what this PR aims to accomplish.

Issues

Closes #84

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

… size

Signed-off-by: Parth Chadha <pchadha@nvidia.com>
@parthchadha parthchadha enabled auto-merge (squash) March 26, 2025 17:51
@parthchadha parthchadha merged commit d1f0609 into main Mar 27, 2025
11 checks passed
@parthchadha parthchadha deleted the pchadha/loss-scaling branch March 27, 2025 04:03
yfw pushed a commit that referenced this pull request Apr 2, 2025
Signed-off-by: Parth Chadha <pchadha@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
KiddoZhu pushed a commit that referenced this pull request May 6, 2025
Signed-off-by: Parth Chadha <pchadha@nvidia.com>
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.

Gradient scale in HfPolicyWorker.train

2 participants