Skip to main content
Back

Google DeepMind's Gemma 3 27B Matches Gemini 1.5 Pro on a Single GPU

Google DeepMind's 27B open-weight multimodal model brings vision, 128K context, and 140+ languages to a single GPU.

Pro

  • Google DeepMind released Gemma 3 27B IT, an open multimodal model that fits on a single H100.
  • 128K context, 140+ languages, and SigLIP-based vision input at 896x896 resolution.
  • Comparable to Gemini 1.5 Pro on benchmarks; ranked top-10 on LM Arena.
  • Trained on 14T tokens with distillation, RL, and model merging on Google TPUs.
  • KV-cache reduced via more local attention layers, enabling long context on small hardware.
  • Supported by Transformers, vLLM, SGLang, Ollama, and llama.cpp out of the box.

Google DeepMind has released Gemma 3 27B IT, the largest instruction-tuned model in the new Gemma 3 family, and it has quickly become one of the most downloaded open-weight models on Hugging Face. The model handles both text and images, ships with a 128K token context window, and fits on a single H100 while landing in the same performance range as models an order of magnitude larger.

Google's pitch is straightforward: Gemini-adjacent capabilities you can download, fine-tune, and self-host. The Gemma 3 lineup was trained with distillation and beats Gemma 2 across pre-trained and instruction-tuned versions, and a reworked post-training recipe puts the 27B-IT variant in the same benchmark neighborhood as Gemini 1.5 Pro.

What actually shipped

Gemma 3 adds vision-language input with text output, extends context to 128K tokens, covers over 140 languages, and improves math, reasoning, and chat behavior including structured outputs and function calling. It comes in four sizes (1B, 4B, 12B, 27B), each as a pre-trained checkpoint you can fine-tune and as a general-purpose instruction-tuned version.

The 27B instruction-tuned variant is the flagship. Key specs:

  • 27B parameters, BF16 weights, based on the google/gemma-3-27b-pt pre-trained checkpoint
  • 128K token input context, 8192 token output
  • Vision input at 896x896 resolution, encoded to 256 tokens per image
  • Open weights under the Gemma license (accept terms on Hugging Face)
  • Runs in Transformers 4.50+, vLLM, SGLang, Ollama, llama.cpp, and LM Studio

The architecture trick that makes 128K work

Long context on a small model is usually bottlenecked by the KV cache, the memory that stores attention keys and values for every previous token. Left alone, it grows linearly with sequence length and eats your GPU. Gemma 3 raises the ratio of local to global attention layers and keeps the local attention span short, which caps how much cache each layer accumulates.

In plain terms: most attention layers only look at a small nearby window of tokens, and only a few do full global attention. The cache stays small while the model can still reason across long documents.

Vision is handled by a shared SigLIP encoder, frozen during training and identical across the 4B, 12B, and 27B variants. That lets Gemma analyze images and video frames, answer questions about a picture, compare images, identify objects, and read text embedded in an image. The encoder was built for 896x896 inputs, but an adaptive windowing algorithm segments larger or non-square images so Gemma 3 can handle high-resolution material without losing detail.

How it was trained

Training ran on Google TPUs (TPUv4p, TPUv5p, and TPUv5e) using JAX and ML Pathways. A new tokenizer improves multilingual coverage across 140+ languages. Token budgets scaled with model size: 2T tokens for the 1B, 4T for the 4B, 12T for the 12B, and 14T for the 27B.

The corpus mixes web text, code, math, and images. Most of the quality gains come from post-training, which combines distillation, reinforcement learning, and model merging to sharpen math, coding, and instruction following.

Benchmark numbers

The instruction-tuned 27B posts strong results across reasoning, STEM, code, multilingual, and multimodal suites. Here are the pre-trained 27B scores from the model card:

BenchmarkMetricGemma 3 PT 27B
MMLU5-shot78.6
MMLU Pro (CoT)5-shot52.2
GSM8K8-shot82.6
MATH4-shot50.0
HumanEval0-shot48.8
MBPP3-shot65.6
BIG-Bench Hardfew-shot77.7
DocVQA (val)-85.6
MMMU-56.1
ChartQA-76.3
MGSM (multilingual math)-74.3

Community reaction has focused on how far the 27B punches above its weight. It sits in the top 10 on LM Arena as of April 12, 2025, ahead of much larger open models and with a significantly higher Elo than Gemma 2. On Chatbot Arena, where estimated H100 requirements are plotted alongside Elo, Gemma 3 27B ranks highly while needing a single GPU against competitors that require up to 32.

Getting it running

The path of least resistance is Transformers. Once you accept the license on Hugging Face:

from transformers import pipeline
import torch
pipe = pipeline(
    "image-text-to-text",
    model="google/gemma-3-27b-it",
    device="cuda",
    torch_dtype=torch.bfloat16,
)
messages = [{"role": "user", "content": [
    {"type": "image", "url": "https://.../bee.jpg"},
    {"type": "text", "text": "Describe this image."},
]}]
print(pipe(text=messages, max_new_tokens=200)[0]["generated_text"][-1]["content"])

For serving, vllm serve google/gemma-3-27b-it exposes an OpenAI-compatible endpoint out of the box, and SGLang and Docker Model Runner work the same way. Community quantizations (over 140 on the Hub) put the model within reach of consumer GPUs through llama.cpp, Ollama, or LM Studio.

What it is good and bad at

Sweet spots based on the benchmarks and design goals:

  • Long-document QA and summarization thanks to the 128K window
  • Multilingual work across 140+ languages, especially translation and cross-lingual reasoning
  • Document understanding (DocVQA 85.6, ChartQA 76.3) and general image analysis
  • Math and grade-school reasoning (GSM8K 82.6, MGSM 74.3)
  • Self-hosted chatbots and assistants where a single-GPU footprint matters

Weak spots are worth flagging too. GPQA (24.3) is poor, HumanEval (48.8) trails frontier coding models, and third-party evaluations put it at 11.38 on SWE-Bench Pro, so this is not the model to hand a large agentic codebase task. Google also filtered training data for personal and sensitive information and publishes a Prohibited Use Policy, with reporting mechanisms and developer guidance around misuse.

Why it matters

A genuinely useful multimodal model with a 128K context now fits on one accelerator. Gemma 3 outperforms its Gemma 2 counterparts across linguistic, coding, reasoning, and vision-language assessments, and the 4B-IT is already competitive with Gemma 2 27B-IT. That generational jump, paired with open weights, makes self-hosted alternatives to closed APIs increasingly practical for production workloads.

If you have held off migrating internal tools off a paid API because open models felt a step behind on vision or long context, the Gemma 3 technical report and developer guide are worth a read. This release closes a lot of that gap in one shot.