Skip to content
Open

untie? #42237

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/transformers/models/internvl/modeling_internvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ class InternVLForConditionalGeneration(InternVLPreTrainedModel, GenerationMixin)
r"^multi_modal_projector": "model.multi_modal_projector",
r"^language_model.lm_head": "lm_head",
}
_tied_weights_keys = {"lm_head.weight": "model.language_model.embed_tokens.weight"}
_tied_weights_keys = None

def __init__(self, config: InternVLConfig):
super().__init__(config)
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/internvl/modular_internvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@ class InternVLCausalLMOutputWithPast(LlavaCausalLMOutputWithPast):


class InternVLForConditionalGeneration(LlavaForConditionalGeneration):
_tied_weights_keys = None

def forward(**super_kwargs):
r"""
Example:
Expand Down