-
Notifications
You must be signed in to change notification settings - Fork 31.3k
OPT-fix #17229
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
Merged
+2
−2
Merged
OPT-fix #17229
Changes from all commits
Commits
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 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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 don't understand very well why it is expected to be
512.Fomr config, I see
So any special reason for
last_hidden_stateto be512? It looks unusual if it is intended to be so - therefore a comment would be very helpful in this casee.Uh oh!
There was an error while loading. Please reload this page.
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.
If my understanding is correct, for some particular cases in OPT - the word embeddings have a different size than the dimension of the internal hidden states. That is why in the config file you have the
word_embed_proj_dimarg.So basically the hidden states that are computed here including the last hidden states will have a dimension of
word_embed_proj_dim. The conversion fromhidden_sizetoword_embed_proj_dimis ensured by theself.project_outandself.project_inmodules. Basically this happens only whenhidden_sizeis different thanword_embed_proj_dimwhich is the case in OPT-350m.Uh oh!
There was an error while loading. Please reload this page.
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.
Thank you @younesbelkada , I understand very well now 😄. I still think it would be a very good idea to add a (short) comment about what you mentioned above.
Regarding this, I personally think it would be much better to have something like:
and use this for OPTDecoder/OPTModel.
I will leave @patrickvonplaten and @LysandreJik to judge though, they have much more experience than me.
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.
@younesbelkada is right here I think :-) But always good to double check!
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.
Well, I still expect a comment to be included in the code 😢