Skip to content

Commit

Permalink
Show version warning only for llama and gpt-bigcode
Browse files Browse the repository at this point in the history
  • Loading branch information
helena-intel committed Mar 11, 2024
1 parent c885a54 commit a85b8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/openvino/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def patch_model_with_bettertransformer(model):
+ COLOR_RESET
)

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

0 comments on commit a85b8aa

Please sign in to comment.