Instructions to use google/gemma-4-26B-A4B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-26B-A4B-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="google/gemma-4-26B-A4B-it") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("google/gemma-4-26B-A4B-it") model = AutoModelForImageTextToText.from_pretrained("google/gemma-4-26B-A4B-it") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
- Local Apps
- vLLM
How to use google/gemma-4-26B-A4B-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "google/gemma-4-26B-A4B-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-26B-A4B-it", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/google/gemma-4-26B-A4B-it
- SGLang
How to use google/gemma-4-26B-A4B-it with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "google/gemma-4-26B-A4B-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-26B-A4B-it", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "google/gemma-4-26B-A4B-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "google/gemma-4-26B-A4B-it", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use google/gemma-4-26B-A4B-it with Docker Model Runner:
docker model run hf.co/google/gemma-4-26B-A4B-it
Add MMMU-Pro evaluation result
#44 opened 7 days ago
by
SaylorTwift
[Showcase] Running Gemma-4-26B-A4B-it on 8GB RAM Smartphone
#43 opened 8 days ago
by
InfiniteVoid
Fix: Chat_template.jinja - Add Generation prompt
#40 opened 21 days ago
by
ilayt
GGUF available — Cerebellum v3 (11 GB, ablation-guided mixed-precision)
❤️ 1
2
#37 opened 25 days ago
by
deucebucket
add newlines and thinking tokens to template to avoid having to compute 3 extra tokens per generation in chat completion+reasoning
👍 2
#35 opened 28 days ago
by
quasar-of-mikus
Very bad results with model quant and KV cache quant, only BF16 works well
👍👀 5
4
#34 opened 29 days ago
by
qenme
Fix chat_template: emit empty <|channel>thought\n<channel|> wrapper for existing asst turns
👍 1
#33 opened about 1 month ago
by
flotherxi
[Bug] chat_template: missing <|channel>thought\n<channel|> wrapper for non-thinking SFT / multi-turn
#32 opened about 1 month ago
by
flotherxi
Release the 124B parent weights... We know you have it.
#31 opened about 1 month ago
by
Dureka
tfhe_ntt::prime32::Plan::try_new
#30 opened about 1 month ago
by
milezdeep13
Add ParseBench evaluation results
#29 opened about 1 month ago
by
boyang-runllama
Thinking Mode doesn't work properly on gemma-4-26B-A4B-it.
#27 opened about 1 month ago
by
michaelkopf1981
Fix missing thinking channel in Gemma 4 chat template when using continue_final_message
#26 opened about 1 month ago
by
CalinR
Your 260k dictionary is breaking Gemma 4's back.
8
#25 opened about 1 month ago
by
phil111
fix: embed chat_template in tokenizer_config.json
#24 opened about 1 month ago
by
NERDDISCO
fix: function calling formatting in chat template
👍 1
4
#20 opened about 2 months ago
by
RyanMullins
Vertex AI & vLLM Deployment Guide for Gemma 4 26B-A4B-it (MoE) + Known Limitations
🚀❤️ 3
1
#19 opened about 2 months ago
by
Manzela-D
Thank you Google!
2
#18 opened about 2 months ago
by
KngRnZ
[Appreciation] Incredible performance of Gemma 4-26b on consumer hardware — 90 t/s even on an older DDR3 system!
🚀 2
5
#17 opened about 2 months ago
by
MightyLoraLord
Excellent release, Google. Gemma 4 is good.
❤️ 3
2
#16 opened about 2 months ago
by
DorkMckork1
Fantastic release!
👍 7
4
#15 opened about 2 months ago
by
Dampfinchen
Significant Otter! ❤
🔥 3
2
#14 opened about 2 months ago
by
MrDevolver
THANK YOU! Google
❤️👍 7
1
#13 opened about 2 months ago
by
E7Reine
Are you guys going to add other MoE stuff?
🤗 3
2
#11 opened about 2 months ago
by
Nesy1
Verified Commit?
2
#9 opened about 2 months ago
by
stephenrawls
please fp8
2
#8 opened about 2 months ago
by
huang123chuan
First community NVFP4 quantization of Gemma 4 26B-A4B-it (49GB → 16.5GB)
👍 2
2
#7 opened about 2 months ago
by
marioiseli
Add AIME 2026 evaluation result
#5 opened about 2 months ago
by
SaylorTwift
add eval results
#3 opened about 2 months ago
by
merve
error when batch size >1
#1 opened 2 months ago
by
loulou2