-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Bugfix] Fix idefics3 tie_word_embeddings
#25454
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
Conversation
Signed-off-by: Isotr0py <[email protected]>
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.
Code Review
This pull request correctly fixes a bug in the Idefics3 model where an incorrect attribute name wte
was used for tying word embeddings. The change replaces it with embed_tokens
, which is the correct attribute in the underlying LlamaModel
. This ensures that weight tying works as expected for Idefics3 models with tie_word_embeddings=True
. The fix is accurate and necessary.
Thanks for fixing! |
Signed-off-by: Isotr0py <[email protected]>
Signed-off-by: Isotr0py <[email protected]> Signed-off-by: charlifu <[email protected]>
Signed-off-by: Isotr0py <[email protected]> Signed-off-by: yewentao256 <[email protected]>
Signed-off-by: Isotr0py <[email protected]> Signed-off-by: gaojc <[email protected]>
Signed-off-by: Isotr0py <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
Signed-off-by: Isotr0py <[email protected]>
Purpose
embed_tokens
is written aswte
incorrectly, but it wasn't caught before because all previously released idefics3-based models havetie_word_embeddings=False
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.