Skip to content

feat: Enable amp with autocast (fix poor bf16 convergence on GRPO#26

Merged
SahilJain314 merged 2 commits intomainfrom
sahilj/real_amp
Mar 21, 2025
Merged

feat: Enable amp with autocast (fix poor bf16 convergence on GRPO#26
SahilJain314 merged 2 commits intomainfrom
sahilj/real_amp

Conversation

@SahilJain314
Copy link
Contributor

What does this PR do ?

Uses torch autocast to handle mixed precision instead of the FSDP mixed precision object/flag. Seems to work significantly better
image
purple/pink- new amp
light green - fp32 pure (had convergence issues too due to off-policy)
teal+light pink - old amp, pure bf16

ignore dark green

Signed-off-by: Sahil Jain <sahilj@nvidia.com>
@parthchadha parthchadha self-requested a review March 21, 2025 22:36
@SahilJain314 SahilJain314 enabled auto-merge (squash) March 21, 2025 22:36
@SahilJain314 SahilJain314 merged commit 6b3dc31 into main Mar 21, 2025
1 check passed
@SahilJain314 SahilJain314 deleted the sahilj/real_amp branch March 21, 2025 22:49
KiddoZhu pushed a commit that referenced this pull request May 6, 2025
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