marko1616 commited on
Commit
71ba3fb
1 Parent(s): 357996b

Fix Error while `get_input_embeddings()`

Browse files

See code in [transformers](https://github.com/huggingface/transformers/blob/0963229e287501bed52ae1dabc17922524de6992/src/transformers/modeling_utils.py#L1789)

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