Skip to content

Commit 0b6bbe5

Browse files
committed
Update masking_utils.py
1 parent 17fc71a commit 0b6bbe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transformers/masking_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ def _ignore_causal_mask_sdpa(
759759
not is_tracing
760760
# only cases when lower and upper diags are the same, see https://github.com/pytorch/pytorch/issues/108108
761761
and (query_length == 1 or kv_length == query_length)
762-
# in this case we need to add special patterns to the mask so cannot be skipped
762+
# in this case we need to add special patterns to the mask so cannot be skipped otherwise
763763
and (local_attention_size is None or kv_length < local_attention_size)
764-
# In this case, we need to add padding to the mask, so cannot be skipped
764+
# In this case, we need to add padding to the mask, so cannot be skipped otherwise
765765
and (padding_mask is None or padding_mask.all())
766766
):
767767
return True

0 commit comments

Comments
 (0)