Skip to content

Commit

Permalink
Update transformers version warning for gemma
Browse files Browse the repository at this point in the history
  • Loading branch information
helena-intel authored Mar 14, 2024
1 parent 8880d2e commit 255405d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions optimum/exporters/openvino/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def patch_model_with_bettertransformer(model):
)

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

# model already has required SDPA implementation
Expand Down

0 comments on commit 255405d

Please sign in to comment.