#38346·openvino

[Docs]: docs for generative ai are outdated

Author: alosslessdevCreated Sep 22, 2026Updated Sep 28, 2026
Labelssupport_request

Documentation link

https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-genai/inference-with-genai-on-npu.html

Description

trying to run https://huggingface.co/google/gemma-4-E4B-it intel's openvino libraries do not support a recent version of transformers that support gemma. relevant logs:

Downloading transformers-4.57.6-py3-none-any.whl (12.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 19.8 MB/s eta 0:00:00 Using cached huggingface_hub-0.36.2-py3-none-any.whl (566 kB) Downloading tokenizers-0.22.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 21.5 MB/s eta 0:00:00 Installing collected packages: huggingface_hub, tokenizers, transformers Attempting uninstall: huggingface_hub Found existing installation: huggingface_hub 1.32.0 Uninstalling huggingface_hub-1.32.0: Successfully uninstalled huggingface_hub-1.32.0 Attempting uninstall: tokenizers Found existing installation: tokenizers 0.23.2 Uninstalling tokenizers-0.23.2: Successfully uninstalled tokenizers-0.23.2 Attempting uninstall: transformers Found existing installation: transformers 5.17.0 Uninstalling transformers-5.17.0: Successfully uninstalled transformers-5.17.0 Successfully installed huggingface_hub-0.36.2 tokenizers-0.22.2 transformers-4.57.6 (npu-env) asdf@asdf:~$ optimum-cli export openvino -m google/gemma-4-E4B-it --weight-format int4 --sym --ratio 1.0 --group-size -1 gemma-4-E4B-it NNCF version 2.19 or higher is required to use NNCF-based quantization. Please upgrade your NNCF installation. The current version of NNCF is 2.18.0. Traceback (most recent call last): File "/home/asdf/npu-env/lib/python3.14/site-packages/transformers/models/auto/configuration_auto.py", line 1360, in from_pretrained config_class = CONFIG_MAPPING[config_dict["model_type"]] ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/asdf/npu-env/lib/python3.14/site-packages/transformers/models/auto/configuration_auto.py", line 1048, in getitem raise KeyError(key) KeyError: 'gemma4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/asdf/npu-env/bin/optimum-cli", line 8, in sys.exit(main()) ~~~~^^ File "/home/asdf/npu-env/lib/python3.14/site-packages/optimum/commands/optimum_cli.py", line 219, in main service.run() ~~~~~~~~~~~^^ File "/home/asdf/npu-env/lib/python3.14/site-packages/optimum/commands/export/openvino.py", line 469, in run main_export( ~~~~~~~~~~~^ model_name_or_path=self.args.model, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<12 lines>... # **input_shapes, ^^^^^^^^^^^^^^^^^ ) ^ File "/home/asdf/npu-env/lib/python3.14/site-packages/optimum/exporters/openvino/main.py", line 282, in main_export task = infer_task( task, ...<6 lines>... trust_remote_code=trust_remote_code, ) File "/home/asdf/npu-env/lib/python3.14/site-packages/optimum/exporters/openvino/main.py", line 114, in infer_task config = AutoConfig.from_pretrained( model_name_or_path, ...<4 lines>... trust_remote_code=trust_remote_code, ) File "/home/asdf/npu-env/lib/python3.14/site-packages/transformers/models/auto/configuration_auto.py", line 1362, in from_pretrained raise ValueError( ...<8 lines>... ) ValueError: The checkpoint you are trying to load has model type gemma4 but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command pip install --upgrade transformers. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command pip install git+https://github.com/huggingface/transformers.git (npu-env) asdf@asdf:~$ ^C

Issue submission checklist

  • I'm reporting a documentation issue. It's not a question.

Source: openvinotoolkit/openvino