diff --git a/optimum/exporters/openvino/convert.py b/optimum/exporters/openvino/convert.py index 8c49994874..dfca80f001 100644 --- a/optimum/exporters/openvino/convert.py +++ b/optimum/exporters/openvino/convert.py @@ -293,7 +293,7 @@ def export_pytorch( logger.info(f"Using framework PyTorch: {torch.__version__}") output = Path(output) - if ensure_export_task_support_stateful(config.task): + if stateful: # Trigger bettertransformer together with stateful model because OpenVINO HW-dependent transformations expect # both of them are applied to demonstrate the best performance. # TODO: Consider applying bettertransformer regardless of stateful flag -- requires additional validation.