teowu commited on
Commit
7817ae3
1 Parent(s): 3a518f4

Update modeling_mplug_owl2.py

Browse files
Files changed (1) hide show
  1. modeling_mplug_owl2.py +2 -0
modeling_mplug_owl2.py CHANGED
@@ -32,6 +32,8 @@ from transformers.modeling_outputs import CausalLMOutputWithPast
32
  from .configuration_mplug_owl2 import MPLUGOwl2Config, MplugOwlVisionConfig, MplugOwlVisualAbstractorConfig
33
  from .visual_encoder import MplugOwlVisionModel, MplugOwlVisualAbstractorModel
34
  from .modeling_llama2 import replace_llama_modality_adaptive
 
 
35
  IGNORE_INDEX = -100
36
  IMAGE_TOKEN_INDEX = -200
37
  DEFAULT_IMAGE_TOKEN = "<|image|>"
 
32
  from .configuration_mplug_owl2 import MPLUGOwl2Config, MplugOwlVisionConfig, MplugOwlVisualAbstractorConfig
33
  from .visual_encoder import MplugOwlVisionModel, MplugOwlVisualAbstractorModel
34
  from .modeling_llama2 import replace_llama_modality_adaptive
35
+ from .modeling_attn_mask_utils import _prepare_4d_causal_attention_mask
36
+
37
  IGNORE_INDEX = -100
38
  IMAGE_TOKEN_INDEX = -200
39
  DEFAULT_IMAGE_TOKEN = "<|image|>"