Skip to content

Commit 68c179e

Browse files
committed
fix patch
1 parent 83cb210 commit 68c179e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

onnx_diagnostic/torch_export_patches/patches/patch_transformers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,4 +1180,6 @@ def forward(
11801180
if output_attentions:
11811181
attn_weights = None
11821182

1183+
if pv.Version(transformers.__version__) < pv.Version("4.53.99"):
1184+
return attn_output, attn_weights, past_key_value
11831185
return attn_output, attn_weights

0 commit comments

Comments
 (0)