This repository contains
Gemma4-26B-A4B exported to OpenVINO IR format with INT4 weight compression, ready to serve via
OpenVINO Model Server (OVMS) 2026.2 as an OpenAI-compatible VLM endpoint.
1mkdir -p ~/ovms_models
2cd ~/ovms_models
3
4huggingface-cli download spandey2/gemma-4-26b-a4b-int4-ov \
5 --local-dir google/gemma-4-26B-A4B \
6 --exclude "*.md" ".gitattributes"
1# Single model (Gemma4 only)
2cat > config.json << 'EOF'
3{
4 "model_config_list": [],
5 "mediapipe_config_list": [
6 {
7 "name": "gemma4-26b",
8 "base_path": "google/gemma-4-26B-A4B"
9 }
10 ]
11}
12EOF
1cat > config.json << 'EOF'
2{
3 "model_config_list": [],
4 "mediapipe_config_list": [
5 {
6 "name": "gemma4-26b",
7 "base_path": "google/gemma-4-26B-A4B"
8 },
9 {
10 "name": "gpt-oss-20b",
11 "base_path": "gpt-oss-20b"
12 }
13 ]
14}
15EOF
1cd ~/ovms_models
2
3docker run -d -p 9001:9001 --rm \
4 --name ovms-gemma4 \
5 --user $(id -u):$(id -g) \
6 -v $(pwd):/models:rw \
7 --device /dev/dri \
8 --group-add=$(stat -c "%g" /dev/dri/render* | head -n 1) \
9 openvino/model_server:2026.2-gpu \
10 --config_path /models/config.json \
11 --rest_port 9001 \
12 --allowed_local_media_path /models \
13 --allowed_media_domains all \
14 --log_level INFO
1docker logs -f ovms-gemma4
2# Wait for: Mediapipe: gemma4-26b state changed to: AVAILABLE
1curl http://localhost:9001/v3/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "gemma4-26b",
5 "messages": [{"role": "user", "content": "What is 7 times 8?"}],
6 "max_tokens": 50,
7 "temperature": 0.1,
8 "skip_special_tokens": true
9 }'
1# Copy your image into the models directory (container maps /models → ovms_models/)
2cp /path/to/your/image.jpg ~/ovms_models/test_image.jpg
3
4curl http://localhost:9001/v3/chat/completions \
5 -H "Content-Type: application/json" \
6 -d '{
7 "model": "gemma4-26b",
8 "messages": [{
9 "role": "user",
10 "content": [
11 {"type": "image_url", "image_url": {"url": "/models/test_image.jpg"}},
12 {"type": "text", "text": "Respond in English only. What is in this image?"}
13 ]
14 }],
15 "max_tokens": 150,
16 "temperature": 0.1
17 }'
1IMAGE_B64=$(base64 -w0 /path/to/image.jpg)
2
3# image_url first, then text — same ordering rule applies
4curl http://localhost:9001/v3/chat/completions \
5 -H "Content-Type: application/json" \
6 -d "{
7 \"model\": \"gemma4-26b\",
8 \"messages\": [{
9 \"role\": \"user\",
10 \"content\": [
11 {\"type\": \"image_url\", \"image_url\": {\"url\": \"data:image/jpeg;base64,${IMAGE_B64}\"}},
12 {\"type\": \"text\", \"text\": \"Respond in English only. Describe this image.\"}
13 ]
14 }],
15 \"max_tokens\": 150,
16 \"temperature\": 0.1
17 }"
1curl http://localhost:9001/v3/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "gemma4-26b",
5 "messages": [{"role": "user", "content": "Explain photosynthesis briefly."}],
6 "max_tokens": 200,
7 "stream": true,
8 "skip_special_tokens": true
9 }'
1curl http://localhost:9001/v3/models
2# Returns: {"data":[{"id":"gemma4-26b","object":"model",...}],...}
OpenWebUI can use this server directly as an OpenAI-compatible backend.
For image uploads via OpenWebUI to work, OVMS receives the image as base64 in the request body — this works automatically when you attach an image in the chat interface.
1# Clone OVMS export tools
2git clone --branch releases/2026/2 \
3 https://github.com/openvinotoolkit/model_server.git
4cd model_server/demos/common/export_models
5
6pip install -r requirements.txt
7
8python export_model.py text_generation \
9 --source_model google/gemma-4-26B-A4B \
10 --pipeline_type VLM \
11 --weight-format int4 \
12 --target_device GPU \
13 --model_repository_path ./ovms_models \
14 --config_file_path ./ovms_models/config.json
Gemma model weights are subject to the
Gemma Terms of Use.
This repository contains only the OpenVINO-converted weights with no modifications to model parameters.