-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Adding [T5/MT5/UMT5]ForTokenClassification #28443
Merged
ArthurZucker
merged 12 commits into
huggingface:main
from
hackyon:t5-for-token-classification
Feb 1, 2024
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4b0c1ae
Adding [T5/MT5/UMT5]ForTokenClassification
hackyon ca6d1c4
Add auto mappings for T5ForTokenClassification and variants
hackyon 2144ef1
Adding ForTokenClassification to the list of models
hackyon c18f1fc
Adding attention_mask param to the T5ForTokenClassification test
hackyon c016666
Remove outdated comment in test
hackyon 97f3929
Adding EncoderOnly and Token Classification tests for MT5 and UMT5
hackyon 3c83e28
Fix typo in umt5 string
hackyon 5837782
Add tests for all the existing MT5 models
hackyon 22f4136
Fix wrong comment in dependency_versions_table
hackyon 3ca71fa
Reverting change to common test for _keys_to_ignore_on_load_missing
hackyon 73ff089
Removing _keys_to_ignore_on_missing from MT5 since the key is not use…
hackyon 6e36f95
Add fix-copies to MT5ModelTest
hackyon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bit surprised by this change, could we leave it as is? (for BC)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this because of a test failure in test_model_weights_reload_no_missing_tied_weights():
transformers/tests/test_modeling_common.py
Line 1956 in 415e9a0
The reason it is failing is that "decoder.block.0.layer.1.EncDecAttention.relative_attention_bias.weight" is a key that will never exist in the model (for the current version of the code), which causes that test to fail. It's expecting the missing key to be in state of the reloaded model.
I believe we should be OK with backwards compatibility because the current version of the code is hard-coded not to have that key:
transformers/src/transformers/models/mt5/modeling_mt5.py
Line 481 in de13a95
WDYT? The other option would be to find a way to disable that test for the MT5model.