File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,13 @@ def __init__(
66
66
},
67
67
ignore_index = - 100 ,
68
68
image_token_index = 32000 ,
69
+ tie_word_embeddings = False ,
69
70
** kwargs ,
70
71
):
71
72
super ().__init__ (** kwargs )
72
73
self .ignore_index = ignore_index
73
74
self .image_token_index = image_token_index
74
-
75
+ self . tie_word_embeddings = tie_word_embeddings
75
76
attn_implementation = kwargs .pop ("attn_implementation" , None )
76
77
77
78
# Set the default attention implementation to flash_attention_2 if not specified
Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ def get_input_embeddings(self) -> nn.Module:
164
164
def set_input_embeddings (self , value ):
165
165
"""Set the input embeddings for the language model."""
166
166
self .language_model .set_input_embeddings (value )
167
-
167
+
168
168
def get_output_embeddings (self ):
169
169
"""Retrieve the output embeddings from the language model."""
170
170
return self .language_model .get_output_embeddings ()
171
-
171
+
172
172
def set_output_embeddings (self , value ):
173
173
"""Set the output embeddings for the language model."""
174
174
self .language_model .set_output_embeddings (value )
You can’t perform that action at this time.
0 commit comments