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

Enable Flan-T5 inference in float16 #296

Merged
merged 21 commits into from
Apr 24, 2023

Conversation

hmellor
Copy link
Member

@hmellor hmellor commented Mar 24, 2023

What does this PR do?

  • Enable floating point exceptions (probably temporarily) so we can track down the source of over/underflows
  • Fix overflow coming from attention masking
  • Fix overflow coming from tanh approximation of GeLU
  • Fix overflow coming from pre-norm residual structure
  • Fix overflow coming from FeedForward down projection

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 24, 2023

The documentation is not available anymore as the PR was closed or merged.

@hmellor hmellor mentioned this pull request Apr 13, 2023
3 tasks
@hmellor hmellor marked this pull request as ready for review April 17, 2023 12:31
@hmellor hmellor changed the title Address T5 float16 precision issues Enable Flan-T5 inference in float16 Apr 17, 2023
@hmellor hmellor force-pushed the t5-numerical-issues branch from c40be80 to 9116d9d Compare April 18, 2023 13:34
@jimypbr jimypbr merged commit 5a68bc6 into huggingface:main Apr 24, 2023
@jimypbr jimypbr deleted the t5-numerical-issues branch April 24, 2023 12:11
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.

4 participants