"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "f32cfd7d979796fbe1af4bdce3bc3b7bfe512607"
Unverified Commit 231c2c63 authored by Isotr0py's avatar Isotr0py Committed by GitHub
Browse files

[Bugfix] Fix idefics3 `tie_word_embeddings` (#25454)


Signed-off-by: default avatarIsotr0py <mozf@mail2.sysu.edu.cn>
parent 4322c553
...@@ -608,7 +608,7 @@ class Idefics3ForConditionalGeneration(nn.Module, SupportsMultiModal, ...@@ -608,7 +608,7 @@ class Idefics3ForConditionalGeneration(nn.Module, SupportsMultiModal,
prefix=maybe_prefix(prefix, "lm_head"), prefix=maybe_prefix(prefix, "lm_head"),
) )
if self.config.text_config.tie_word_embeddings: if self.config.text_config.tie_word_embeddings:
self.lm_head.weight = self.model.text_model.wte.weight self.lm_head.weight = self.model.text_model.embed_tokens.weight
self.logits_processor = LogitsProcessor(config.text_config.vocab_size) self.logits_processor = LogitsProcessor(config.text_config.vocab_size)
def _parse_and_validate_image_input( def _parse_and_validate_image_input(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment