Skip to content

Conversation

@jplu
Copy link
Contributor

@jplu jplu commented Feb 19, 2021

What does this PR do?

This PR reworks the AMP of XLNet to remove some useless casts for better and less confusing AMP compliancy.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering since there are bfloat16 tests here. Does the mixed precision handle bfloat16 on TPUs? If not aren't we removing this functionality here?

@jplu
Copy link
Contributor Author

jplu commented Feb 19, 2021

Yes, bfloat16 is only for TPU. Hence, we cannot really test it elsewhere than inside a TPU context. I have added the bfloat16 condition only if XLNet is run on TPU because we were handling a specific case when the model is run under AMP.

@LysandreJik LysandreJik merged commit cdcdd5f into huggingface:master Feb 24, 2021
@jplu jplu deleted the tf-xlnet-amp branch February 25, 2021 10:14
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