Fix encoder->decoder typo bug in convert_t5x_checkpoint_to_pytorch.py#26587
Merged
ArthurZucker merged 1 commit intoOct 4, 2023
Conversation
sanchit-gandhi
approved these changes
Oct 4, 2023
sanchit-gandhi
left a comment
Contributor
There was a problem hiding this comment.
Indeed it looks like this should be setting the decoder weights - thanks @soyoung97 for the fix!
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
ArthurZucker
approved these changes
Oct 4, 2023
ArthurZucker
left a comment
Collaborator
There was a problem hiding this comment.
I'm a bit surprised this went unnoticed for such a long time 😅 Thanks a lot
Contributor
Author
|
I think it went unnoticed because v1.0 model conversion is not used frequently than v1.1 models. Thanks a lot for the fast review!! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
The convert_t5x_checkpoint_to_pytorch is used to convert t5x models into pytorch models.
However, it contains a typo at line 142: The wi weights in decoder is converted to weights in encoder, and it makes the following errors when we run the script for t5 v1.0 models (where Split MLP layers is false and uses T5DenseActDense(wi) instead of T5DenseGatedActDense(wi_0, wi_1) is run:
The following is the changed part:
When changing the following line from
to
the code works fine.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
Related pull request seems to be this one,
so tagging the original author @basting and the one mentioned in that PR:
@patrickvonplaten
@sanchit-gandhi
@ArthurZucker
@younesbelkada