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

fp16 fixes #222

Merged
merged 2 commits into from
Sep 28, 2022
Merged

fp16 fixes #222

merged 2 commits into from
Sep 28, 2022

Conversation

beiwang2003
Copy link

@beiwang2003 beiwang2003 commented Sep 27, 2022

In AMP fp16 mode, overflow issues were observed in several places in the network. To address this, those regions are now converted back to fp32. This change does not introduce significant performance cost which offsets the benefits of mixed precision training. We also disallow the use of memory efficient kernel (use_memory_efficient_kernel=false) in AMP fp16 mode explicitly.

It worth mentioning the debugging tool developed at huggingface for detecting overflow issue: https://huggingface.co/docs/transformers/v4.14.1/en/debugging

@gahdritz gahdritz merged commit 9082c25 into aqlaboratory:main Sep 28, 2022
@gahdritz
Copy link
Collaborator

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

Successfully merging this pull request may close these issues.

2 participants