huggingface / huggingface/optimum-intel
[OpenVINO] Support Gemma 4 12B with model type gemma4_unified
- Dominant language
- Jupyter Notebook
- Stars
- 620
- Forks
- 270
- Avg merge
- 4d 47m
- Merged PRs (30d)
- 25
Description
Following instructions from [PR#1688 [OpenVINO] Support Gemma 4](https://github.com/huggingface/optimum-intel/pull/1688)
pip list
openvino 2026.3.0.dev20260604 22098
openvino-tokenizers 2026.3.0.0.dev20260604
optimum 2.1.0.dev0
optimum-intel 1.27.0.dev0+eac3893
transformers 5.5.0
optimum-cli export openvino -m google/gemma-4-12B ov_gemma4_12 --task=image-text-to-text
optimum-cli export openvino -m google/gemma-4-12B-it ov_gemma4_12it --task=image-text-to-text
optimum-cli export openvino -m google/gemma-4-12B-it-assistant ov_gemma4_12itassistant --task=image-text-to-text
ValueError: The checkpoint you are trying to load has model type `gemma4_unified` 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.
pip install transformers==5.10.2 # installing latest transformers and running optimum-cli export openvino again:
ValueError: Trying to export a gemma4_unified model, that is a custom or unsupported architecture, but no custom export configuration was passed as `custom_export_configs`. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum-intel/issues if you would like the model type gemma4_unified to be supported natively in the OpenVINO export.
@rkazants @aleksandr-mokrov
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing PR#1688 and the three optimum-cli export commands for google/gemma-4-12B variants. Investigate the exporter path that reports gemma4_unified as unsupported; done means native OpenVINO export succeeds without custom_export_configs for these models.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100