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

TF: unpack inputs on Convbert, GPTJ, LED, and templates #16491

Merged
merged 4 commits into from Mar 30, 2022

Conversation

gante
Copy link
Member

@gante gante commented Mar 30, 2022

What does this PR do?

This PR implements the @unpack_inputs decorator on Convbert, GPTJ, LED, and templates, as per #16051.

The diff is big, but the changes are all trivial:

  1. Replace input_processing() calls by the @unpack_inputs decorator
  2. Replace inputs["foo"] by foo (thank god regex exists 🙏 )
  3. (SLOW tests were run locally, all passing)

Only one PR remains to close the issue linked above -- implement the change in the encoder_decoder architectures. I've decided to create a separate PR for that one as the changes are not as trivial, and will require a review from a core maintainer.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 30, 2022

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

@@ -376,6 +375,7 @@ def _prune_heads(self, heads_to_prune):
"""
raise NotImplementedError

@unpack_inputs
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems like this one was forgotten :D

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gante gante merged commit c2f8eaf into huggingface:main Mar 30, 2022
@gante gante deleted the finalize_unpack_inputs branch March 30, 2022 16: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.

None yet

3 participants