Gemma 4 Download Hub

Download
Gemma 4
Open Models

The most capable open model family, built from Gemini 3 research. Now in five sizes — with Multi-Token Prediction drafters for faster inference. Frontier intelligence, free, Apache 2.0, running on your own hardware.

5 sizes
E2B · E4B · 12B · 26B · 31B
256K
Max context window
150M+
Gemma 4 downloads
140+
Supported languages
Model Variants
Choose your size
Gemma 4 E2B
Dense · Edge Series
On-Device Effective 2B
Context
128K
Min RAM
4 GB
VRAM
2 GB
Vision
✓ Yes
Audio
✓ Yes
Thinking
✓ Yes
Perfect for phones, Raspberry Pi, and offline apps. Near-zero latency on-device with native audio and vision. Runs fully without a network connection.
Gemma 4 E4B
Dense · Edge Series
Edge / Laptop Effective 4B
Context
128K
Min RAM
8 GB
VRAM
6–8 GB
Vision
✓ Yes
Audio
✓ Yes
Thinking
✓ Yes
Sweet spot for developer laptops and Jetson Orin. Strong multimodal performance including native audio — and it outperforms the previous-gen Gemma 3 27B on math and agentic tasks. Ideal for local prototyping.
Gemma 4 31B
Dense · Server Grade
#3 Open 31B Dense
Context
256K
Min RAM
64 GB
VRAM
80 GB (bf16)
Vision
✓ Yes
Audio
— No
Thinking
✓ Yes
Ranked #3 open model globally on Arena AI. Maximum quality for enterprise workloads, complex reasoning, and 256K document processing. Unquantized bf16 weights fit on a single 80 GB H100; quantized versions run on 24 GB consumer GPUs.
Latest & Specialized Releases
New in 2026
MTP Drafters
Multi-Token Prediction drafters now ship for E2B, E4B, 12B, 26B & 31B — speculative decoding that verifies several tokens per forward pass for significantly faster inference with no quality loss.
# Enabled automatically in supported runtimes
🌐
TranslateGemma
A dedicated translation family in 4B, 12B & 27B sizes, built for high-quality translation across a wide range of languages — a translation-first companion to the core Gemma 4 models.
# google/translategemma on Hugging Face
🩺
MedGemma 1.5
A 4B model for health-AI development — analysing clinical text and medical imagery. For research and development only; not a medical device and not for clinical decisions.
# google/medgemma on Hugging Face
🧩
Gemma Skills
An official Skills repository so agents can build with the latest Gemma advancements — reusable capabilities designed for agentic workflows.
$ explore the Gemma cookbook & skills
Platforms & Runtimes
10+ supported
🤗
Hugging Face
Official model weights in Safetensors, GGUF & PyTorch. Direct integration with Transformers, TRL, and Candle.
pip install transformers accelerate
🦙
Ollama
One-line install for Mac, Linux & Windows. Handles quantization automatically. Best for local prototyping.
$ ollama run gemma4:26b
🖥️
LM Studio
GUI desktop app. No coding required. Supports all Gemma 4 sizes with a built-in quantization selector.
# Search "google/gemma-4" in model browser
📊
Kaggle
Official Google distribution with free GPU notebooks. Great for experiments and prototyping without local setup.
$ kaggle models instances versions download google/gemma-4
🚀
vLLM
High-throughput production inference. Best for serving 26B / 31B models at scale with an OpenAI-compatible API.
$ vllm serve google/gemma-4-26b-it --dtype auto
⚙️
llama.cpp
CPU-first quantized inference. Runs Gemma 4 GGUF models on any hardware. No GPU required for small models.
$ ./llama-cli -m gemma-4-e4b-it-q4_k_m.gguf -i
↗ GitHub
🍎
MLX (Apple Silicon)
Optimised for M1/M2/M3/M4 chips. Best performance on macOS with unified memory. Supports 4-bit quantization.
$ mlx_lm.generate --model mlx-community/gemma-4-e4b-4bit
💚
NVIDIA NIM
Containerised deployment for Jetson and data-centre GPUs. Production-grade with health checks and monitoring.
$ docker run --gpus all nvcr.io/nim/google/gemma-4-26b-it
☁️
Vertex AI
Google Cloud managed serving on TPUs and GPUs. Enterprise SLAs, VPC, and compliance guarantees.
$ gcloud ai models deploy gemma4-26b --region=us-central1
Quickstart Code
Copy & run
Shell · Ollama
# Install Ollama (Mac / Linux)
curl -fsSL https://ollama.com/install.sh | sh

# Pull and run Gemma 4 — choose your size
ollama run gemma4:e2b    # 2B  — phones, Pi
ollama run gemma4:e4b    # 4B  — laptop
ollama run gemma4:12b    # 12B unified — laptop ★ balanced
ollama run gemma4:26b    # 26B MoE — workstation ★ recommended
ollama run gemma4:31b    # 31B dense — server / H100

# REST API (once running)
curl http://localhost:11434/api/chat \
  -d '{"model":"gemma4","messages":[{"role":"user","content":"Hello!"}]}'
Python · Hugging Face Transformers
from transformers import AutoProcessor, AutoModelForImageTextToText
import torch

# Load model — swap model_id for your chosen size
model_id = "google/gemma-4-26b-it"   # or e2b-it / e4b-it / 12b-it / 31b-it

processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [{
    "role": "user",
    "content": [{"type": "text", "text": "Explain quantum entanglement."}]
}]

inputs = processor.apply_chat_template(
    messages, tokenize=True,
    return_dict=True, return_tensors="pt",
    add_generation_prompt=True,
    enable_thinking=True,           # ← thinking mode!
).to(model.device)

output = model.generate(**inputs, max_new_tokens=2048)
print(processor.decode(output[0], skip_special_tokens=True))
Python · Gemini API (Google AI Studio)
# pip install google-genai
from google import genai

client = genai.Client(api_key="YOUR_API_KEY")

response = client.models.generate_content(
    model="gemma-4-31b-it",       # or gemma-4-26b-it / 12b-it
    contents="Write a haiku about open-source AI.",
)
print(response.text)

# ── REST equivalent ─────────────────────────────────
# curl "https://generativelanguage.googleapis.com/v1beta/
#   models/gemma-4-31b-it:generateContent?key=YOUR_KEY" \
#   -H 'Content-Type: application/json' -X POST \
#   -d '{"contents":[{"parts":[{"text":"Hello!"}]}]}'
Shell + Python · vLLM Production Server
# Install vLLM
pip install vllm

# Start OpenAI-compatible server
vllm serve google/gemma-4-26b-it \
  --dtype auto \
  --max-model-len 65536 \
  --tensor-parallel-size 2    # for multi-GPU

# Query via OpenAI SDK
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="none",
)

resp = client.chat.completions.create(
    model="google/gemma-4-26b-it",
    messages=[{"role":"user","content":"Hello Gemma!"}],
)
print(resp.choices[0].message.content)
Shell · MLX (Apple Silicon M1–M4)
# Install MLX LM
pip install mlx-lm

# Run inference (4-bit quantized)
mlx_lm.generate \
  --model mlx-community/gemma-4-e4b-it-4bit \
  --prompt "Explain transformers simply." \
  --max-tokens 512

# Or 26B at 4-bit for M2 Max / M3 Max (≥64 GB)
mlx_lm.generate \
  --model mlx-community/gemma-4-26b-it-4bit \
  --prompt "Write a Python quicksort." \
  --max-tokens 1024

# Python API
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/gemma-4-e4b-it-4bit")
response = generate(model, tokenizer, prompt="Hello!", max_tokens=256)
print(response)
Shell · Docker / NVIDIA NIM
# NVIDIA NIM — containerised, production-ready
docker run --gpus all \
  -p 8000:8000 \
  nvcr.io/nim/google/gemma-4-26b-it:latest

# Unsloth Fine-tune Studio (Mac / Linux / WSL)
pip install unsloth

# Dockerfile snippet for custom build
FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04
RUN pip install vllm transformers
COPY serve.py /app/serve.py
CMD ["python", "/app/serve.py"]
Gemma 4 31B · reported
Benchmark What it measures Gemma 4 31B
AIME 2026 ★ Math Competition mathematics
89.2
MMLU Pro Knowledge & reasoning
85.2
GPQA Diamond Graduate-level science reasoning
84.3
LiveCodeBench v6 Code generation
~80
On the industry-standard Arena AI open-model text leaderboard, the 31B Dense ranks #3 and the 26B MoE ranks #6 — outcompeting models up to 20× their size. Figures are drawn from Google's Gemma 4 disclosures and are indicative; exact numbers vary by evaluation setup, so verify against the official model card before relying on them.
What is Gemma 4?
The essentials

🔮 What's Gemma 4?

Gemma 4 is Google DeepMind's most capable family of open-weight AI models, launched on April 2, 2026 and built from the same research as the frontier Gemini 3 models. It's designed to deliver frontier-level reasoning small enough to run on your own hardware.

It ships in five sizes — E2B, E4B, the 12B Unified, a 26B Mixture-of-Experts, and a 31B Dense flagship — all under a permissive Apache 2.0 license. The models are multimodal (text, image and video input, with native audio on E2B, E4B and 12B), fluent in 140+ languages, support up to 256K context, and include configurable thinking mode, function calling, and MTP drafters for faster inference.

🎯 Who is Gemma 4 best for?

📱
Mobile & on-device developers — E2B / E4B run offline on phones, Raspberry Pi, and Jetson with near-zero latency.
💻
Laptop & local builders — the 12B Unified powers coding assistants and private multimodal apps on 16 GB.
🖥️
Best value / workstations — the 26B MoE gives flagship-class quality on a single RTX 4090.
🏢
Enterprises & researchers — the 31B Dense targets maximum quality, fine-tuning, and 256K-document RAG on H100/TPU.
🎓
Students & hobbyists — it's free, Apache 2.0, and runs on consumer hardware with no usage caps.
How to Download & Install
Step by step
1

Pick your size

Match the model to your hardware and use case — E2B/E4B for phones and laptops, 12B for balanced local use, 26B/31B for workstations and servers. See the Model Variants above for specs.

2

Choose a platform

Easiest is Ollama (one command). Prefer a GUI? Use LM Studio. Want raw weights for Python? Use Hugging Face or Kaggle. On a Mac, MLX is fastest; for CPU or any hardware, llama.cpp.

3

Accept the license

Gemma 4 is gated: click Accept once on the Hugging Face or Kaggle model card (or authenticate with a token in scripts). It's Apache 2.0 — commercial use is allowed. Ollama and LM Studio handle this for you.

4

Download & run

Install a runner and pull the model. With Ollama: ollama run gemma4:12b. With Transformers: pip install transformers then load google/gemma-4-12b-it. The weights download automatically on first run, then work fully offline.

Requirements
Before you start
Hardware (4-bit)
E2B ~2 GB · E4B ~6–8 GB · 12B ~16 GB · 26B / 31B ~24 GB GPU. Full bf16 31B needs an 80 GB H100.
Software
A runner — Ollama, LM Studio, or llama.cpp — or Python 3.10+ with Transformers. CPU works (slower); GPU wants CUDA, ROCm, or Apple Metal.
License
Apache 2.0 — accept once on the model card. Commercial use, modification, and redistribution allowed; the trademark "Gemma" is not granted.
Disk & network
From ~2 GB (quantized edge) to 60 GB+ (full-precision flagship). Internet needed to download; runs offline afterwards.
Model Overview
Architecture · memory · QAT
▶ "What's new in Gemma 4" — official overview from Google

Gemma is a family of generative AI models for tasks like question answering, summarization, and reasoning. The models are provided with open weights and permit responsible commercial use, so you can tune and deploy them in your own projects. Gemma 4 spans four distinct architectures across five sizes, each tuned for specific hardware:



📱 Small (E2B & E4B)

Effective 2B and 4B dense models built for ultra-mobile, edge, and browser deployment (think Pixel and Chrome). They use Per-Layer Embeddings (PLE) to squeeze maximum capability out of a tiny on-device footprint.

🔮 Unified (12B)

A 12B encoder-free multimodal model that replaces separate vision and audio encoders with direct linear projections of the input — feeding images and audio straight into the LLM backbone.

🧩 Mixture-of-Experts (26B A4B)

A highly efficient 26B MoE built for high-throughput, advanced reasoning. It activates only ~4B parameters per token, so it delivers fast tokens-per-second while keeping flagship-class quality.

🚀 Dense (31B)

A powerful 31B dense model that bridges server-grade performance and local execution — the top pick for maximum quality and a strong base for fine-tuning.



Capabilities

Reasoning: every model is a capable reasoner with configurable thinking modes. Extended multimodality: all sizes process text and images (variable aspect ratio and resolution) plus video, with native audio on E2B, E4B, and 12B. Context: 128K on the small models, 256K on the medium ones. Coding & agents: notable coding gains with built-in function calling for autonomous agents. Native system prompts: first-class support for the system role. Multi-Token Prediction: every size ships a dedicated draft model for speculative decoding — significantly faster inference with no quality loss.



Inference Memory Requirements

Gemma 4 comes in five sizes (E2B, E4B, 12B, 26B A4B, 31B), usable at default 16-bit precision or lower via quantization. Approximate memory to load the weights (with ~20% overhead) is below — mobile figures use LiteRT-LM:

ModelBF16 (16-bit)SFP8 (8-bit)Q4_0 (4-bit)MobileMobile (text-only)
Gemma 4 E2B11.4 GB5.7 GB2.9 GB1.1 GB0.84 GB
Gemma 4 E4B17.9 GB8.9 GB4.5 GB2.5 GB2.2 GB
Gemma 4 12B26.7 GB13.4 GB6.7 GB
Gemma 4 26B A4B57.7 GB28.8 GB14.4 GB
Gemma 4 31B69.9 GB34.9 GB17.5 GB

Figures cover static weights only and may change with your inference tool and environment. Note: PLE makes the small models' load memory higher than their effective-parameter count suggests; the 26B MoE must load all 26B params even though only ~4B are active per token; and the KV cache for long context adds VRAM on top. Fine-tuning needs far more memory than inference — use PEFT methods like LoRA to keep it manageable.



Quantization-Aware Training (QAT)

For maximum efficiency with minimal quality loss, Google ships official QAT checkpoints. Unlike post-training quantization (which compresses a finished model and can degrade quality), QAT bakes quantization simulation into training itself, so the model learns to compensate for the precision loss — yielding small models that perform nearly identically to their full-precision baselines. Pick the right variant for your engine:

Target engineDownload suffixPrimary use case
llama.cpp / LM Studio{model}-qat-q4_0-ggufZero-setup local on CPU, Apple Silicon, or consumer GPUs
vLLM / SGLang{model}-qat-w4a16-ct (server) · {model}-qat-mobile-ctHigh-throughput 4-bit weights with 16-bit activations
Speculative decoding{model}-qat-q4_0-unquantized + -assistant drafterPrimary model plus its MTP draft model for faster generation
Other formats (e.g. MLX){model}-qat-q4_0-unquantizedUnquantized weights for converting to other formats
Mobile (Transformers){model}-qat-mobile-transformersEdge-optimized weights; reference for other mobile formats

Official QAT collections live on Hugging Face (google/gemma-4-qat-q4-0 and google/gemma-4-qat-mobile) and Kaggle — covering GGUF, unquantized/assistant, compressed-tensors (w4a16-ct), and mobile builds. Mobile checkpoints use a custom wNa8o8 schema with targeted 2-bit decode layers and optimized KV caches for edge RAM limits.

Download FAQ
Quick answers
Is Gemma 4 free to download? +
Yes. Every size ships as open weights under the Apache 2.0 license — free to download, run, modify, and use commercially, with no monthly active-user caps. You only pay for the hardware you run it on, or optional hosted API usage.
How big is the Gemma 4 download (download size)? +
It depends on size and quantization. As a guide, the download roughly matches the memory-to-load figures in the Model Overview table — for example 4-bit (Q4_0): E2B ≈ 2.9 GB, E4B ≈ 4.5 GB, 12B ≈ 6.7 GB, 26B A4B ≈ 14.4 GB, 31B ≈ 17.5 GB. Full bf16 ranges from ~11 GB (E2B) to ~70 GB (31B). Check the model card for exact file sizes.
Can I download Gemma 4 on Windows? +
Yes. Ollama, LM Studio, and llama.cpp all run on Windows (LM Studio is the no-code option). Install your runner, then pull a model — e.g. ollama run gemma4:12b. An NVIDIA GPU with recent CUDA drivers speeds things up, but CPU-only works for the smaller sizes.
Can I run Gemma 4 on Mac? +
Yes, and Apple Silicon is well supported. Use Ollama or LM Studio for the simplest path, or MLX for the best performance on M1–M4 thanks to unified memory: mlx_lm.generate --model mlx-community/gemma-4-e4b-it-4bit. Leave headroom, since the OS and model share the same memory pool.
Where is Gemma 4 on GitHub? +
The model weights live on Hugging Face and Kaggle, while code — reference implementations, the Gemma Cookbook, and fine-tuning recipes — is on GitHub. Note Gemma 4 is open-weight, not fully open-source: weights and inference code are public, but the training data and full pipeline are not.
How do I download Gemma 4 from Hugging Face? +
Open the Gemma 4 collection, accept the license on the model card, then either pip install transformers and load google/gemma-4-12b-it, or pull files directly with huggingface-cli download google/gemma-4-12b-it. Supported formats include Safetensors, GGUF, and PyTorch.
How do I download and run Gemma 4 with Ollama? +
Install Ollama, then run ollama run gemma4:12b (swap in e2b, e4b, 26b, or 31b). It downloads the weights on first run and drops you into a chat prompt. Ollama also serves a local OpenAI-compatible API on port 11434, so your apps can call it fully offline. See the Ollama library.
What are the minimum requirements to download Gemma 4? +
A runner (Ollama, LM Studio, llama.cpp) or Python 3.10+ with Transformers; disk space from ~2 GB (quantized edge) to 60 GB+ (full flagship); and enough memory for your chosen size (E2B ~2 GB up to 24 GB for 26B/31B at 4-bit). A GPU helps but isn't required for the small models. See Requirements above.
Which Gemma 4 size should I download? +
Pick the smallest that meets your quality bar. Phones/edge → E2B or E4B. Laptops → the 12B Unified (best all-round). A single strong GPU → the 26B MoE (best value). Servers / maximum quality → the 31B Dense. Because every size shares one tokenizer and prompt format, you can start small and scale up by swapping the checkpoint name.