Fix Error while `get_input_embeddings()`

#17
Files changed (1) hide show
  1. modeling_internvl_chat.py +1 -0
modeling_internvl_chat.py CHANGED
@@ -35,6 +35,7 @@ def version_cmp(v1, v2, op='eq'):
35
  class InternVLChatModel(PreTrainedModel):
36
  config_class = InternVLChatConfig
37
  main_input_name = 'pixel_values'
 
38
  _supports_flash_attn_2 = True
39
  _no_split_modules = ['InternVisionModel', 'LlamaDecoderLayer', 'InternLM2DecoderLayer']
40
 
 
35
  class InternVLChatModel(PreTrainedModel):
36
  config_class = InternVLChatConfig
37
  main_input_name = 'pixel_values'
38
+ base_model_prefix = 'language_model'
39
  _supports_flash_attn_2 = True
40
  _no_split_modules = ['InternVisionModel', 'LlamaDecoderLayer', 'InternLM2DecoderLayer']
41