Upload folder using huggingface_hub
Browse files- modeling_intern_vit.py +1 -0
- modeling_internvl_chat.py +1 -0
modeling_intern_vit.py
CHANGED
@@ -368,6 +368,7 @@ class InternVisionEncoder(nn.Module):
|
|
368 |
|
369 |
class InternVisionModel(PreTrainedModel):
|
370 |
main_input_name = 'pixel_values'
|
|
|
371 |
config_class = InternVisionConfig
|
372 |
_no_split_modules = ['InternVisionEncoderLayer']
|
373 |
|
|
|
368 |
|
369 |
class InternVisionModel(PreTrainedModel):
|
370 |
main_input_name = 'pixel_values'
|
371 |
+
_supports_flash_attn_2 = True
|
372 |
config_class = InternVisionConfig
|
373 |
_no_split_modules = ['InternVisionEncoderLayer']
|
374 |
|
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 |
_no_split_modules = ['InternVisionModel', 'LlamaDecoderLayer', 'Phi3DecoderLayer']
|
39 |
|
40 |
def __init__(self, config: InternVLChatConfig, vision_model=None, language_model=None):
|
|
|
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', 'Phi3DecoderLayer']
|
40 |
|
41 |
def __init__(self, config: InternVLChatConfig, vision_model=None, language_model=None):
|