Skip to content

Commit 948f99d

Browse files
authored
Apply bettertransformer by default for causallm (#605)
1 parent 334fc10 commit 948f99d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimum/exporters/openvino/convert.py

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

296-
if stateful:
296+
if ensure_export_task_support_stateful(config.task):
297297
# Trigger bettertransformer together with stateful model because OpenVINO HW-dependent transformations expect
298298
# both of them are applied to demonstrate the best performance.
299299
# TODO: Consider applying bettertransformer regardless of stateful flag -- requires additional validation.

0 commit comments

Comments
 (0)