We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b186f2 commit 8d2b6b7Copy full SHA for 8d2b6b7
optimum/exporters/openvino/convert.py
@@ -293,7 +293,10 @@ def export_pytorch(
293
logger.info(f"Using framework PyTorch: {torch.__version__}")
294
output = Path(output)
295
296
- if ensure_export_task_support_stateful(config.task):
+ task = config.task
297
+ if getattr(config, "use_past", False):
298
+ task += "-with-past"
299
+ if ensure_export_task_support_stateful(task):
300
# Trigger bettertransformer together with stateful model because OpenVINO HW-dependent transformations expect
301
# both of them are applied to demonstrate the best performance.
302
# TODO: Consider applying bettertransformer regardless of stateful flag -- requires additional validation.
0 commit comments