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

post train without fp16 #22

Open
Weiting-Gao opened this issue Aug 26, 2021 · 3 comments
Open

post train without fp16 #22

Weiting-Gao opened this issue Aug 26, 2021 · 3 comments

Comments

@Weiting-Gao
Copy link

Thanks for your work!
I tried to post train the Bert base model using my own data. I encountered some problem when using fp16 (CUDA error: invalid configuration argument), so I tried to train without fp16. However, by doing so, the batch loss are all nan. Do you have any idea about this problem, is it because I didn't use fp16? Thank you!

@howardhsu
Copy link
Owner

howardhsu commented Aug 26, 2021 via email

@Weiting-Gao
Copy link
Author

Thanks for your reply!
I noticed that you mentioned "It is possible to avoid use GPUs that do not support apex (e.g., 1080 Ti), but need to adjust the max sequence length and number of gradient accumulation but (although the result can be better)." in the instruction.
I directly set fp16==False to avoid using apex, but as I said, the batch loss are all nan. It doesn't seem the correct way to do it.
I wonder how to change the code to avoid use GPUs that do not support apex correctly? Thanks!

@howardhsu
Copy link
Owner

howardhsu commented Aug 26, 2021 via email

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

2 participants