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

fine-tune with bert models #42

Closed
JaheimLee opened this issue Jan 11, 2021 · 2 comments
Closed

fine-tune with bert models #42

JaheimLee opened this issue Jan 11, 2021 · 2 comments

Comments

@JaheimLee
Copy link

Have you ever tested adabelief for fine-tuning bert models? And what's the recommended hyper-parameters?

@juntang-zhuang
Copy link
Owner

juntang-zhuang commented Jan 11, 2021

@JaheimLee Hi, I did not test with fine-tune bert, bert is too large for me. I tested a small transformer here https://github.com/juntang-zhuang/fairseq-adabelief , it seems the default in adabelief-pytorch==0.2.0 works. eps=1e-16 helps. I'm not so sure about rectify, sometimes it helps sometimes not, perhaps need some tuning. Other hyper-parameters, such as lr, beta, the same value as Adam works.
BTW, if you use fp16 to accelerate, v0.2.0 might be problematic because eps=1e-16 is rounded to 0 in fp16. A by-pass is to forward and backward in fp16, but update parameter in fp32. See the link below #31 (comment), we are considering adding this to the next release

@JaheimLee
Copy link
Author

ok, thanks!

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