Skip to content

Commit f03b356

Browse files
authored
Update transformers version warning for gemma (#609)
1 parent 8880d2e commit f03b356

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

optimum/exporters/openvino/model_patcher.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def patch_model_with_bettertransformer(model):
6060
)
6161

6262
if (
63-
getattr(model.config, "model_type") in {"gpt_bigcode", "llama"}
63+
getattr(model.config, "model_type") in {"gpt_bigcode", "llama", "gemma"}
6464
and is_transformers_version(">=", "4.38")
6565
and is_openvino_version("<", "2024.1.0-14612")
6666
):
@@ -69,10 +69,11 @@ def patch_model_with_bettertransformer(model):
6969
_openvino_version.split("-")[0] if is_openvino_version("<=", "2024.0.0-14509") else _openvino_version
7070
)
7171
log.warn(
72-
COLOR_RED + f"[WARNING] Stateful models are not supported for Llama and GPTBigCode with Transformers "
72+
COLOR_RED
73+
+ f"[WARNING] Stateful models are not supported for Llama, Gemma and GPTBigCode with Transformers "
7374
f"{_transformers_version} and OpenVINO {display_version}. For good performance, consider using a nightly OpenVINO build: "
74-
"https://docs.openvino.ai/2024/get-started/install-openvino.html. For models that do not need transformers "
75-
"4.38+, it is also an option to downgrade transformers: `pip install transformers==4.37.2`" + COLOR_RESET
75+
"https://docs.openvino.ai/2024/get-started/install-openvino.html. For gpt-bigcode and llama models, "
76+
"it is also an option to downgrade transformers: `pip install transformers==4.37.2`" + COLOR_RESET
7677
)
7778

7879
# model already has required SDPA implementation

0 commit comments

Comments
 (0)