Skip to content

[TFBart] Split TF-Bart#9497

Merged
patrickvonplaten merged 34 commits intohuggingface:masterfrom
patrickvonplaten:split_tf_bart
Jan 12, 2021
Merged

[TFBart] Split TF-Bart#9497
patrickvonplaten merged 34 commits intohuggingface:masterfrom
patrickvonplaten:split_tf_bart

Conversation

@patrickvonplaten
Copy link
Copy Markdown
Contributor

@patrickvonplaten patrickvonplaten commented Jan 10, 2021

What does this PR do?

TF mirror of: #9343

After PR is merged TODO:

  • Open issue about facebook/blenderbot_small-90M tokenizer - cannot download files from hub. Weird issue

Copy link
Copy Markdown
Contributor

@jplu jplu left a comment

Choose a reason for hiding this comment

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

Awesome work!! Just left few smalll comments. I think we should first find a proper fix #9478 and then merging this one. Switching on/off some tests everytime we touch a model is really not a long term solution, I think a proper template as to be stated first and then afterwards we do the models.

Comment thread src/transformers/models/bart/modeling_tf_bart.py Outdated
Comment thread src/transformers/models/bart/modeling_tf_bart.py Outdated
Comment thread tests/test_modeling_tf_bart.py
@patrickvonplaten
Copy link
Copy Markdown
Contributor Author

Awesome work!! Just left few smalll comments. I think we should first find a proper fix #9478 and then merging this one. Switching on/off some tests everytime we touch a model is really not a long term solution, I think a proper template as to be stated first and then afterwards we do the models.

IMO this PR should be merged and the s2s fix should be applied afterward as said offline. This PR is blocking a new release currently

@jplu
Copy link
Copy Markdown
Contributor

jplu commented Jan 11, 2021

IMO this PR should be merged and the s2s fix should be applied afterward as said offline. This PR is blocking a new release currently

Ok, nevermind, I didn't know you wanted to have it in the next release.

Copy link
Copy Markdown
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

LGTM! Left a few nits, but great work all around! Thank you for taking care of this.

Comment thread src/transformers/models/bart/modeling_tf_bart.py Outdated
Comment thread src/transformers/models/bart/modeling_tf_bart.py
Comment thread src/transformers/models/blenderbot/modeling_tf_blenderbot.py
Comment thread src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py Outdated
class TFBartModelIntegrationTest(unittest.TestCase):
def test_inference_no_head(self):
model = TFBartModel.from_pretrained("facebook/bart-large", from_pt=True)
model = TFBartForConditionalGeneration.from_pretrained("facebook/bart-large").model
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not use TFBartModel?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

doesn't work, the weights don't load correctly...this didn't work previously either. Could be dealt with in a future PR

Comment thread tests/test_modeling_tf_bart.py Outdated
Comment thread tests/test_modeling_tf_blenderbot.py Outdated
Comment thread tests/test_modeling_tf_blenderbot_small.py Outdated
Comment thread tests/test_modeling_tf_pegasus.py Outdated
Copy link
Copy Markdown
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.

Thanks a lot for doing this! There are just a few repeated mistakes, that probably come from the templates.

Comment thread src/transformers/models/blenderbot/modeling_tf_blenderbot.py Outdated
Comment thread src/transformers/models/blenderbot/modeling_tf_blenderbot.py
Comment thread src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py Outdated
Comment thread src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py Outdated
Comment thread src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py Outdated
Comment thread src/transformers/models/pegasus/modeling_tf_pegasus.py Outdated
Comment thread src/transformers/models/pegasus/modeling_tf_pegasus.py
Comment thread src/transformers/models/pegasus/modeling_tf_pegasus.py Outdated
Comment thread src/transformers/models/pegasus/modeling_tf_pegasus.py
Comment thread tests/test_modeling_tf_bart.py Outdated
@patrickvonplaten patrickvonplaten merged commit 7f28613 into huggingface:master Jan 12, 2021
@patrickvonplaten patrickvonplaten deleted the split_tf_bart branch January 12, 2021 01:06
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