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

[tt-train] Add kahan summation in AdamW #15518

Merged
merged 3 commits into from
Dec 2, 2024
Merged

[tt-train] Add kahan summation in AdamW #15518

merged 3 commits into from
Dec 2, 2024

Conversation

rfurko-tt
Copy link
Contributor

@rfurko-tt rfurko-tt commented Nov 27, 2024

Problem description

bfloat16 has wide range, but is not as precise as float32. Some of the parameters are not updated due to small magnitude of the gradients (after multiplication by learning rate), as an example: gamma in LayerNorm.

What's changed

Add kahan summation flag to enable kahan summation when update weights.

Checklist

image

@rfurko-tt rfurko-tt merged commit 070a226 into main Dec 2, 2024
9 checks passed
@rfurko-tt rfurko-tt deleted the rfurko/kahan_adamw branch December 2, 2024 22:43
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.

2 participants