Skip to content

Commit 255405d

Browse files
authored
Update transformers version warning for gemma
1 parent 8880d2e commit 255405d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

optimum/exporters/openvino/model_patcher.py

+4-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,10 @@ 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 + f"[WARNING] Stateful models are not supported for Llama, Gemma and GPTBigCode with Transformers "
7373
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
74+
"https://docs.openvino.ai/2024/get-started/install-openvino.html. For gpt-bigcode and llama models, "
75+
"it is also an option to downgrade transformers: `pip install transformers==4.37.2`" + COLOR_RESET
7676
)
7777

7878
# model already has required SDPA implementation

0 commit comments

Comments
 (0)