Skip to content

Commit 8d2b6b7

Browse files
committed
add check for with past
1 parent 2b186f2 commit 8d2b6b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

optimum/exporters/openvino/convert.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ def export_pytorch(
293293
logger.info(f"Using framework PyTorch: {torch.__version__}")
294294
output = Path(output)
295295

296-
if ensure_export_task_support_stateful(config.task):
296+
task = config.task
297+
if getattr(config, "use_past", False):
298+
task += "-with-past"
299+
if ensure_export_task_support_stateful(task):
297300
# Trigger bettertransformer together with stateful model because OpenVINO HW-dependent transformations expect
298301
# both of them are applied to demonstrate the best performance.
299302
# TODO: Consider applying bettertransformer regardless of stateful flag -- requires additional validation.

0 commit comments

Comments
 (0)