Update modeling_internvl_chat.py
Browse files
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 |
-
|
| 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
|