Image-Text-to-Text
Transformers
Safetensors
gemma3
conversational
Eval Results
text-generation-inference
Instructions to use google/gemma-3-27b-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-3-27b-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="google/gemma-3-27b-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-3-27b-it") model = AutoModelForImageTextToText.from_pretrained("google/gemma-3-27b-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
- Local Apps
- vLLM
How to use google/gemma-3-27b-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "google/gemma-3-27b-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-3-27b-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-3-27b-it
- SGLang
How to use google/gemma-3-27b-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-3-27b-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-3-27b-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-3-27b-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-3-27b-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-3-27b-it with Docker Model Runner:
docker model run hf.co/google/gemma-3-27b-it
Request: DOI
1
#109 opened 20 days ago
by
rsrao
Status on Gemma 4?
1
#107 opened about 2 months ago
by
Tralalabs
Please open-source Gemini 1.0 Nano-1 (1.8B) 🙏
1
#106 opened 2 months ago
by
Tralalabs
status on gemma 3.5?
#105 opened 2 months ago
by
Tralalabs
Gemma 4 vs Qwen3.5 27b
1
#104 opened 2 months ago
by
EvilinaMaller
Add SWE-Bench Pro evaluation results
#103 opened 3 months ago
by
nielsr
Performance evaluation of Gemma 3-27b-it with different quantization methods (4-bit vs 8-bit)
2
#102 opened 3 months ago
by
Ryan1007
Please release now Gemma 3.5
3
#101 opened 3 months ago
by
Tralalabs
Status on Gemma 4?
🔥 6
9
#100 opened 3 months ago
by
Dampfinchen
Request: DOI
1
#99 opened 4 months ago
by
Karthickweb7773
Request: DOI
1
#96 opened 6 months ago
by
talha06
Config.json using illegal math, Echolabz will help you fix it..
2
#94 opened 6 months ago
by
djkillerbee
ValueError: Number of images does not match number of special image tokens in the input text. Got 256 image tokens in the text but 256 tokens from image embeddings.
5
#91 opened 9 months ago
by
zml31415
gemma-3-27b-it-FP8 sometimes crashes
➕ 1
2
#90 opened 9 months ago
by
mondaylord
Support QLoRA Training on AWQ Quantized Models
1
#89 opened 9 months ago
by
s3171103
Is there a minimum CUDA and/or BitsAndBytes version requirement?
1
#88 opened 9 months ago
by
deathknight0
Update config file
#87 opened 10 months ago
by
rishirath
therapeuticsgemma3
#86 opened 10 months ago
by
mdordevic
Gemma 3 hyperparameters
1
#84 opened 10 months ago
by
Augustas17
How Instructions, Tools and MCP terms are related
3
#83 opened 11 months ago
by
jvoid
Model Parameters number vs Quantization level tradeoff
5
#82 opened 11 months ago
by
jvoid
Suffix meaning IT vs PT
7
#81 opened 11 months ago
by
jvoid
No output / Repeated outputs when using Gemma 3 12B/27B on vLLM
7
#79 opened 11 months ago
by
sanchitahuja205
Genn
#78 opened 11 months ago
by
ezelhan959
Specification
2
#76 opened 12 months ago
by
zarifhaikal01
Too much VRAM in vLLM
4
#75 opened 12 months ago
by
cbrug
Gemma-3-27B-it not loading on multi-GPU setup
1
#74 opened 12 months ago
by
glawyer
Passing pictures as arrays to the model (Pytorch or Numpy)
2
#73 opened 12 months ago
by
artyomboyko
Update config.json
➕ 1
#71 opened about 1 year ago
by
olegshulyakov
vllm and "gemma-3-27b-it" dont work
➕ 9
11
#70 opened about 1 year ago
by
nastyafairypro
How to eval the video/image sequences?
3
#69 opened about 1 year ago
by
lkllkl
Wrong context length limit for HuggingChat?
2
#68 opened about 1 year ago
by
vesjolovam
Undesired output texts
1
#67 opened about 1 year ago
by
Waisullah
Add reasoning capabilities for gemma 3
4
#66 opened about 1 year ago
by
devopsML
Getting 401 unaauthorized when trying to use google/gemma-3-27b-it
2
#65 opened about 1 year ago
by
Milinddurugkar
pad output?
2
#63 opened about 1 year ago
by
juniworld
Wrong answer by gemma3-27b-it : what is the difference betweem each: google/gemma-3-27b-it, google/gemma-3-27b-pt
4
#62 opened about 1 year ago
by
Waisullah
Example of a wrong answer from an Image analysis
3
#61 opened about 1 year ago
by
vince62s
Test using M1 Max (64G) and Word
2
#60 opened about 1 year ago
by
gptlocalhost
what does "it" in the model name represent?
3
#59 opened about 1 year ago
by
jdsouza
Update README.md
#58 opened about 1 year ago
by
denizzhansahin
Gemma3ForCausalLM has no prepare_4d_causal_attention_mask_with_cache_position
1
#57 opened about 1 year ago
by
buckeye17-bah
Inference speed slow?
👍 2
4
#56 opened about 1 year ago
by
banank1989
Internal Server Error for url using vllm
1
#55 opened about 1 year ago
by
panyupj
Could not find the transformer layer class SiglipMultiheadAttentionPoolingHead in the model.
👍 3
5
#54 opened about 1 year ago
by
neilwu
Keeps repeating itself.
➕ 1
4
#53 opened about 1 year ago
by
RealBiggly
Why MLP so tiny but vision part of the model works quite well
2
#52 opened about 1 year ago
by
CCRss
Using google/gemma-3-4b-it as asssitant model for speculative decoding does not work
➕ 1
1
#51 opened about 1 year ago
by
sayambhu
Update README.md
1
#50 opened about 1 year ago
by
beita6969