Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 97f8979

Browse files
committedDec 20, 2024
style
1 parent 35f6fb6 commit 97f8979

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎optimum/exporters/openvino/model_patcher.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ def _llama_gemma_update_causal_mask_legacy(self, attention_mask, input_tensor, c
421421
offset = 0
422422
mask_shape = attention_mask.shape
423423
mask_slice = (attention_mask.eq(0.0)).to(dtype=dtype) * min_dtype
424-
causal_mask[: mask_shape[0], : mask_shape[1], offset : mask_shape[2] + offset, : mask_shape[3]] = (
425-
mask_slice
426-
)
424+
causal_mask[
425+
: mask_shape[0], : mask_shape[1], offset : mask_shape[2] + offset, : mask_shape[3]
426+
] = mask_slice
427427

428428
if (
429429
self.config._attn_implementation == "sdpa"
@@ -2058,9 +2058,9 @@ def _dbrx_update_causal_mask_legacy(
20582058
offset = 0
20592059
mask_shape = attention_mask.shape
20602060
mask_slice = (attention_mask.eq(0.0)).to(dtype=dtype) * min_dtype
2061-
causal_mask[: mask_shape[0], : mask_shape[1], offset : mask_shape[2] + offset, : mask_shape[3]] = (
2062-
mask_slice
2063-
)
2061+
causal_mask[
2062+
: mask_shape[0], : mask_shape[1], offset : mask_shape[2] + offset, : mask_shape[3]
2063+
] = mask_slice
20642064

20652065
if (
20662066
self.config._attn_implementation == "sdpa"

0 commit comments

Comments
 (0)
Please sign in to comment.