hcwei commited on
Commit
1cd86d9
·
verified ·
1 Parent(s): f9ad0a1

Update modeling_internvl_chat.py

Browse files
Files changed (1) hide show
  1. modeling_internvl_chat.py +2 -2
modeling_internvl_chat.py CHANGED
@@ -1125,8 +1125,8 @@ class Qwen2Model(Qwen2PreTrainedModel):
1125
  attention_mask, inputs_embeds, cache_position, past_key_values, output_attentions
1126
  )
1127
  #TODO Motify
1128
- if causal_mask.shape[-1] == causal_mask.shape[-2]:
1129
- causal_mask[:, :, -1, :-1] = causal_mask[:, :, -1, :-1] + causal_mask[:, :, 0, -1]
1130
 
1131
 
1132
  hidden_states = inputs_embeds
 
1125
  attention_mask, inputs_embeds, cache_position, past_key_values, output_attentions
1126
  )
1127
  #TODO Motify
1128
+ #if causal_mask.shape[-1] == causal_mask.shape[-2]:
1129
+ # causal_mask[:, :, -1, :-1] = causal_mask[:, :, -1, :-1] + causal_mask[:, :, 0, -1]
1130
 
1131
 
1132
  hidden_states = inputs_embeds