Skip to content

Commit e4a2091

Browse files
committed
apply bettertransformer by default for causallm
1 parent 2588077 commit e4a2091

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
@@ -299,7 +299,7 @@ def export_pytorch(
299299
logger.info(f"Using framework PyTorch: {torch.__version__}")
300300
output = Path(output)
301301

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

0 commit comments

Comments
 (0)