Standardise weight tying on ParallelLMHead.tie_weights (#52147)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
7553aac77b
commit
80d6d557f3
@@ -539,7 +539,7 @@ class Idefics3ForConditionalGeneration(nn.Module, SupportsMultiModal, SupportsLo
|
||||
prefix=maybe_prefix(prefix, "lm_head"),
|
||||
)
|
||||
if self.config.text_config.tie_word_embeddings:
|
||||
self.lm_head.weight = self.model.text_model.embed_tokens.weight
|
||||
self.lm_head = self.lm_head.tie_weights(self.model.text_model.embed_tokens)
|
||||
self.logits_processor = LogitsProcessor(config.text_config.vocab_size)
|
||||
|
||||
def _parse_and_validate_image_input(self, **kwargs: object) -> ImageInputs | None:
|
||||
|
||||
Reference in New Issue
Block a user