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

Drop in performance when changing dtype to float32 #492

Open
blaisedelattre opened this issue Jun 11, 2024 · 2 comments
Open

Drop in performance when changing dtype to float32 #492

blaisedelattre opened this issue Jun 11, 2024 · 2 comments

Comments

@blaisedelattre
Copy link

Hello everyone, has anyone noticed a drop in performance (test and validation loss) when training with dtype=float32 ? I'm doing training on the Shakespeare dataset with the train_shakespeare_char config file.

I have not changed anything but dtype from the original repo.

It seems related to the use of "torch.amp.autocast" but I don't understand why a higher precision from bfloat16 to float32 would cause a drop in perf.

Thank you for your help !

@kalgoritmi
Copy link

It is just a speculation, but maybe it introduces some form of regularization in the model, given the small size of the data and the model it may actually allow it to generalize better?

@vnsmv
Copy link

vnsmv commented Jul 3, 2024

Hello!
Can you please provide some more context about you problem?
Its possible to share you code and your test/validation losses?

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

No branches or pull requests

3 participants