-
-
Couldn't load subscription status.
- Fork 10.8k
[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
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 <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: charlifu <charlifu@amd.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: gaojc <1055866782@qq.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Purpose
embed_tokensis written aswteincorrectly, but it wasn't caught before because all previously released idefics3-based models havetie_word_embeddings=FalseTest Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.