Update modelling_RW.py
Browse files- modelling_RW.py +1 -1
modelling_RW.py
CHANGED
@@ -521,7 +521,7 @@ class RWModel(RWPreTrainedModel):
|
|
521 |
combined_attention_mask = None
|
522 |
device = attention_mask.device
|
523 |
_, src_length = input_shape
|
524 |
-
|
525 |
combined_attention_mask = _make_causal_mask(
|
526 |
input_shape, device=device, past_key_values_length=past_key_values_length
|
527 |
)
|
|
|
521 |
combined_attention_mask = None
|
522 |
device = attention_mask.device
|
523 |
_, src_length = input_shape
|
524 |
+
if src_length > 1:
|
525 |
combined_attention_mask = _make_causal_mask(
|
526 |
input_shape, device=device, past_key_values_length=past_key_values_length
|
527 |
)
|