Skip to content

Commit a85b8aa

Browse files
committed
Show version warning only for llama and gpt-bigcode
1 parent c885a54 commit a85b8aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimum/exporters/openvino/model_patcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def patch_model_with_bettertransformer(model):
4141
+ COLOR_RESET
4242
)
4343

44-
if is_transformers_version(">=", "4.38") and is_openvino_version("<", "2024.1.0-14612"):
44+
if getattr(model.config, "model_type") in {"gpt_bigcode", "llama"} and is_transformers_version(">=", "4.38") and is_openvino_version("<", "2024.1.0-14612"):
4545
log.warn(
4646
COLOR_RED + f"[WARNING] Stateful models are not supported with Transformers {_transformers_version} and "
4747
"this OpenVINO version. For good performance, consider using a nightly OpenVINO build: "

0 commit comments

Comments
 (0)