google-research / google-research/sam

Accelerated training with floating point fp16

Open
#3 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
646
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Thanks for the work!
I'd like to know if the optimizer SAM is also applicable to accelerated training, i.e. using automatic mixed precision like fp16. I tried to adopt SAM in my own training codes with fp16 on Pytorch, but Nan loss happens and the computed grad norm is Nan. Regular training using SGD gives no error. So I'm wondering if it is caused by some error in the Pytorch reimplementation or is it due to the limitation of SAM?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.