Complete guide Every Gemma model

How to Download Gemma

A step-by-step guide to downloading any model in the Gemma family - from the 270M pocket models to Gemma 4 31B - covering every method, format and licence, plus what to do when a download fails.

No account needed for Ollama or Kaggle · Hugging Face asks you to accept terms once

Step 1

Choose your model

Two questions decide this: how much memory you have, and what the model needs to do. Almost everyone should start with the current generation - Gemma 4 - and only reach for an older one for a specific reason.

A

How much memory can you spare?

Not disk - RAM or VRAM. A model has to fit in memory to run at usable speed. The figure that matters is the quantised size plus roughly 20–30% for the KV cache.

< 2 GBGemma 3 270M, EmbeddingGemma, FunctionGemma
2–4 GBGemma 4 E2B, Gemma 3 1B
4–8 GBGemma 4 E4B, Gemma 3 4B
8–16 GBGemma 4 12B - the sweet spot
16–24 GBGemma 4 26B A4B, Gemma 4 31B
24 GB+Gemma 4 31B at higher precision
B

What does it need to do?

General chat, reasoning and code all point to a core Gemma 4 model. Narrower jobs have a purpose-built variant that will usually beat a general model of the same size.

💬General / chat / codeGemma 4, any size
🖼️Images and videoGemma 4 12B or E4B
🎧Audio inputGemma 4 12B, E4B or E2B
🔍Search / RAG embeddingsEmbeddingGemma 308M
🌐TranslationTranslateGemma 4B/12B/27B
🩺Medical imaging & textMedGemma 1.5
🛡️Content safety filteringShieldGemma 2
Very fast generationDiffusionGemma 26B
💡
Still unsure? Download gemma4:12b-it-qat - 7.2 GB, 256K context, handles text, images and audio, and runs on a 16 GB laptop. It's the best default in the family and you can always move up or down later, since every Gemma 4 model shares the same prompt format and tool-calling interface.
Reference

The complete Gemma family

Every model Google has released under the Gemma name, with dates and sizes. All are downloadable - but note the licence column, because it is not the same across generations.

Core generations

GenerationReleasedSizesContextModalitiesLicence
Gemma 4 Current Mar 31, 2026 E2B, E4B, 12B, 26B A4B, 31B 128K–256K Text, image, audio, video Apache 2.0
Gemma 3nJun 26, 2025E2B, E4B 32KText, image, audioGemma Terms
Gemma 3Mar 10, 2025270M, 1B, 4B, 12B, 27B 32K–128KText, imageGemma Terms
Gemma 2Jun 27, 20242B, 9B, 27B 8KTextGemma Terms
Gemma 1Feb 21, 20242B, 7B 8KTextGemma Terms

Gemma 3 270M arrived later, on August 14, 2025. Gemma 2's 2B size followed the 9B and 27B on July 31, 2024. Gemma 1.1 was a quality refresh on April 5, 2024.

Specialised variants

DiffusionGemma

Jun 2026
26B A4B MoE

Text diffusion instead of autoregression - generates 256 tokens per forward pass, up to 4× faster. Strong at code infilling and in-line editing.

TranslateGemma

Jan 2026
4B · 12B · 27B

Dedicated machine translation across the full Gemma language range. Beats general models of the same size on translation quality.

MedGemma 1.5

Jan 2026
4B

Medical imaging and clinical text. A research starting point, explicitly not a diagnostic tool - read the model card's limitations.

FunctionGemma

Dec 2025
270M

A tiny tool-calling router. Cheap enough to sit in front of a bigger model and decide which function to invoke.

T5Gemma v2

Dec 2025
Various

Encoder-decoder architecture, for summarisation and translation-style tasks where a decoder-only model is awkward.

VaultGemma

Sep 2025
1B

Trained with differential privacy - built to resist memorising and regurgitating individual training examples.

EmbeddingGemma

Sep 2025
308M

Text embeddings for retrieval, RAG and semantic search. Small and fast enough to run on CPU at scale.

MedGemma

May 2025
4B · 27B

The original medical release. Superseded by MedGemma 1.5 for the 4B, but 27B remains the largest medical Gemma.

ShieldGemma 2

Mar 2025
4B

Safety classification for text and images - filtering violent, explicit or otherwise unwanted content in a pipeline.

PaliGemma 2

Dec 2024
3B · 10B · 28B

Vision-language models for captioning, VQA and OCR. Largely superseded by Gemma 4's native multimodality.

Gemma-APS

Oct 2024
2B · 7B

Abstractive proposition segmentation - breaking text into self-contained factual claims, useful for fact-checking pipelines.

DataGemma

Sep 2024
2B

Grounds responses in Google's Data Commons statistical database to reduce numerical hallucination.

Gemma Scope v2

Dec 2025
Sparse autoencoders

Interpretability tooling, not a chat model - for researchers inspecting what features a Gemma model has learned.

CodeGemma

Apr 2024
2B · 7B

Code completion and infilling. Now largely obsolete - Gemma 4 scores far higher on code benchmarks at comparable size.

RecurrentGemma

Apr 2024
2B · 9B

Built on the Griffin architecture rather than a standard transformer, for constant-memory inference over long sequences.

SignGemma · DolphinGemma

Research
Limited release

Sign language translation and dolphin vocalisation analysis. Research projects - availability differs from the general releases.

⚠️
Older isn't smaller. People often download Gemma 2 9B thinking it's a lighter option than Gemma 4 12B. It isn't meaningfully lighter, it has an 8K context instead of 256K, no image or audio input, and it scores far lower. Unless you're reproducing a published result or pinned to a specific checkpoint, prefer the current generation.
Step 2

Choose a download method

Six routes to the same weights. The right one depends on whether you want to chat with the model, build on it, or fine-tune it.

🦙

Ollama

Best for: just wanting it to work
Easiest

Handles downloading, quantisation and serving in one command. No account, no licence click-through, no Python. It runs an OpenAI-compatible API on port 11434 automatically.

# 1. Install from ollama.com, then:
ollama pull gemma4:12b

# 2. Chat immediately
ollama run gemma4:12b

# 3. Or use the API
curl http://localhost:11434/v1/chat/completions \
  -d '{"model":"gemma4:12b","messages":[{"role":"user","content":"Hi"}]}'
💻

LM Studio

Best for: no terminal at all
GUI

A desktop app with a built-in model browser. Search "gemma 4", pick a quantisation from a dropdown that tells you whether it fits your machine, click download. Includes a chat interface and a local server.

# No commands needed:
# 1. Install LM Studio
# 2. Search tab → "gemma 4"
# 3. Pick a quant (green = fits your RAM)
# 4. Download → Chat
🤗

Hugging Face CLI

Best for: full control over files
Standard

The canonical source. Every checkpoint, every format, plus community quantisations. Requires a free account and a one-time licence acceptance on the model page.

pip install -U "huggingface_hub[cli]" hf_transfer
hf auth login
export HF_HUB_ENABLE_HF_TRANSFER=1

# Whole repo
hf download google/gemma-4-12B-it --local-dir ./gemma

# Just the GGUF file
hf download google/gemma-4-12B-it-qat-q4_0-gguf \
  --include "*.gguf" --local-dir ./gguf
🐍

Python / Transformers

Best for: building an application
Code

Downloads happen automatically on first use and cache in ~/.cache/huggingface. This is the path you want if you're fine-tuning or need programmatic control.

from transformers import pipeline
import torch

pipe = pipeline(
    "text-generation",
    model="google/gemma-4-12B-it",
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
# Downloads ~27 GB on first run
⚙️

llama.cpp

Best for: CPU and mixed offload
Efficient

Pulls GGUF files straight from Hugging Face with no separate download step. The best option when you're short on VRAM and need to split layers between GPU and system RAM.

# Downloads and serves in one go
./llama-server \
  -hf google/gemma-4-12B-it-qat-q4_0-gguf \
  --ctx-size 32768 \
  --n-gpu-layers 99
📊

Kaggle

Best for: trying before downloading
Free GPU

Google's own mirror, with Keras, PyTorch and GGUF variations. The real advantage is free GPU notebooks - test a model in the browser before committing bandwidth to it.

# Inside a Kaggle notebook
import kagglehub

path = kagglehub.model_download(
    "google/gemma-4/keras/gemma-4-12b-it"
)
Step 3 · In depth

Gemma 4 downloads, explained properly

Gemma 4 has more download options than any previous generation, and the naming is dense enough that people routinely pull the wrong thing. Here's how to read it.

Reading a Gemma 4 repository name

google/gemma-4-12B-it-qat-q4_0-gguf
google - the official publisher. Community re-uploads live under other usernames.
gemma-4 - the generation.
12B - the size. Case matters: capital B, and E2B/E4B for edge models.
it - instruction-tuned. Omit it and you get the base/pre-trained model, which won't follow instructions.
qat-q4_0-gguf - quantisation-aware trained, 4-bit, GGUF format. Absent means full-precision Safetensors.

Download the -it version

Instruction-tuned. It follows instructions, holds a conversation, calls tools and respects a system prompt. This is what more than 95% of people want, and it's what every quick-start guide assumes.

⚗️

Download the base version only if…

You're doing your own post-training - supervised fine-tuning, RLHF, or domain adaptation from scratch. The base model completes text rather than answering questions, and will feel broken if you chat with it.

The quantisation ladder

Quantisation shrinks the weights by storing them at lower precision. Less memory, slightly lower quality. Gemma 4 sizes at each rung, using the 12B as the example:

Precision12B sizeQualityWhen to use it
BF16 full26.7 GB ReferenceFine-tuning, or when you have memory to spare and want the ceiling.
SFP8 / MXFP813.4 GB Near-identicalExcellent middle ground on modern NVIDIA GPUs. Half the memory, almost no loss.
QAT Q4_0 Best 4-bit6.7 GB Very goodThe default recommendation. Trained to be quantised, so it holds up far better than post-hoc 4-bit.
Q4_K_M community~7.6 GB GoodThe usual community quant. Fine, but the official QAT build is better at a similar size.
Q3~5.5 GB DegradedNoticeably worse at reasoning and code. Prefer a smaller model at Q4.
Q2~4.5 GB PoorLoads, but rarely worth running. Use E4B at Q4 instead.
🎯
The one thing most people get wrong. Google publishes official QAT (quantisation-aware trained) GGUF builds for every Gemma 4 size, and most people never find them - they download a community Q4_K_M instead. The QAT versions were trained with quantisation in the loop rather than compressed afterwards, so they lose noticeably less quality at the same file size. Look for -qat-q4_0-gguf on the google/ namespace.

Every Gemma 4 checkpoint

ModelInstruction-tunedBaseOfficial QAT GGUFOllama
31B Dense gemma-4-31B-itgemma-4-31B gemma-4-31B-it-qat-q4_0-ggufgemma4:31b
26B A4B MoE gemma-4-26B-A4B-itgemma-4-26B-A4B gemma-4-26B-A4B-it-qat-q4_0-ggufgemma4:26b
12B Unified gemma-4-12B-itgemma-4-12B gemma-4-12B-it-qat-q4_0-ggufgemma4:12b
E4B Edge gemma-4-E4B-itgemma-4-E4B gemma-4-E4B-it-qat-q4_0-ggufgemma4:e4b
E2B On-device gemma-4-E2B-itgemma-4-E2B gemma-4-E2B-it-qat-q4_0-ggufgemma4:e2b

All Hugging Face repos are prefixed google/. Each size also has an -it-assistant build (a chat persona baked in) and MTP variants for speculative decoding. The 12B additionally offers -qat-q4_0-unquantized - QAT weights at full precision, if you want to quantise them yourself.

🔄
Re-pull anything from before mid-July 2026. The July 15 refresh changed the weights and chat template without changing the version number. It fixed role-tag leakage in multi-turn conversations and substantially improved tool-calling reliability - the 31B gained 10.1% on Tau2 Telecom, and E4B went from effectively zero to a working score on TB2 agent benchmarks. If your agent produces malformed JSON, this is the most likely cause.
Step 4

Check the licence before you ship

This is the part people skip, and it's the part that matters commercially. Gemma 4 changed the licence - and the change does not automatically apply to older models.

Apache 2.0

Gemma 4 and 2026 variants

A standard, permissive open-source licence. Commercial use, modification, redistribution and proprietary derivatives are all permitted. No custom clauses, no use-restriction carve-outs requiring legal interpretation, and no terms Google can revise later.

  • ✅ Commercial products
  • ✅ Redistribute modified weights
  • ✅ Keep your fine-tunes proprietary
  • ✅ No revenue or user caps
Gemma Terms of Use

Gemma 1, 2, 3, 3n and pre-2026 variants

A custom Google licence. Commercial use is allowed, but it carries prohibited-use restrictions, an obligation to pass the terms on to anyone you distribute to, and terms Google reserved the right to update. Workable, but it's why some legal teams delayed adoption.

  • ✅ Commercial use permitted
  • ⚠️ Prohibited-use policy applies
  • ⚠️ Must pass terms downstream
  • ⚠️ Terms can be updated
⚖️
I could not confirm that the Apache 2.0 change was applied retroactively to Gemma 3 and earlier. Google announced it for Gemma 4 going forward, and I found no source stating older models were relicensed. Check the licence field on the specific model card you're downloading rather than assuming - and if a commercial decision rests on it, have someone qualified read the actual terms. This page is not legal advice.
Step 5

Verify what you downloaded

🔐

Prefer Safetensors

Safetensors can't execute code when loaded. Older pickle-based .bin checkpoints can, in principle, run arbitrary code on load. Every official Gemma 4 repo ships Safetensors.

🏷️

Check the namespace

Official weights live under google/. Community re-uploads are usually fine but can be stale, mislabelled, or quantised more aggressively than the name suggests.

📏

Check the file size

If a "12B Q4" download is 3 GB, it isn't what it claims. Compare against the published sizes - 12B at Q4_0 should be about 6.7 GB.

# Confirm the download completed and is intact
hf download google/gemma-4-12B-it --local-dir ./gemma
ls -la ./gemma/*.safetensors

# Quick functional test - does it actually load and answer?
python -c "
from transformers import pipeline
p = pipeline('text-generation', model='./gemma', device_map='auto')
print(p([{'role':'user','content':'Say OK'}], max_new_tokens=10))
"
When it goes wrong

Troubleshooting

The six failures that account for most download problems.

404 - repository not found

Almost always capitalisation. It's google/gemma-4-12B-it, not gemma-4-12b-it. Edge models use E2B and E4B, and the MoE is 26B-A4B.

The other cause is a gated repo you haven't accepted terms for - open the model page in a browser, accept, then retry.

401 / 403 - authentication or access denied

Run hf auth login and paste a token from your Hugging Face settings. If you've already done that, you probably haven't accepted the model's terms - that's a one-time click on the model page, and it has to be done per model family.

Out of memory when loading

The model doesn't fit. In order of preference: use a smaller quantisation (BF16 → Q4_0 roughly quarters the memory), drop to the next model size down, reduce --ctx-size since the KV cache scales with context length, or offload layers to CPU with llama.cpp's --n-gpu-layers.

Don't reach for Q2 or Q3 to make a big model fit - a smaller model at Q4 will almost always be better.

The download is painfully slow

Install hf_transfer and set HF_HUB_ENABLE_HF_TRANSFER=1. It parallelises chunks and will typically saturate a gigabit connection where the default client won't come close.

Also make sure you're not downloading more than you need - --include "*.gguf" fetches one file instead of an entire repo of formats you'll never load.

Disk fills up unexpectedly

You probably used git clone. Git-LFS stores a second copy inside .git, doubling the footprint - a 70 GB model becomes 140 GB. Use hf download instead.

Also check ~/.cache/huggingface. Transformers caches every model you've ever loaded, and it grows quietly. hf cache scan shows what's there; hf cache delete clears it.

The model replies with strange role tags or broken JSON

Your weights predate the July 15, 2026 refresh, which fixed exactly this. The version number didn't change, so nothing will tell you they're stale. Re-pull the model.

With Ollama: ollama rm gemma4:12b && ollama pull gemma4:12b.

FAQ

Common questions

Do I need a Google account or an API key to download Gemma?

No. Ollama, LM Studio and Kaggle all work without one. Hugging Face requires a free account and a one-time terms acceptance per model family, but no payment and no API key. API keys are only for hosted inference through Google AI Studio or Vertex AI - a completely separate route where you don't download anything at all.

How much disk space do I actually need?

For a single 4-bit model, between 3 GB and 20 GB depending on size. If you plan to try several, budget 50–100 GB. Full-precision BF16 checkpoints are much larger - Gemma 4 31B is roughly 70 GB - and you generally only need those for fine-tuning.

Can I run Gemma offline once it's downloaded?

Yes, completely. That's the main reason to download rather than use an API. After the initial download nothing leaves your machine, which is why Gemma is common in privacy-sensitive and air-gapped deployments. E2B and E4B run entirely on a phone.

Which older Gemma models are still worth downloading?

Honestly, few for general use - Gemma 4 outperforms every previous generation at comparable size. The exceptions are specialised variants with no Gemma 4 equivalent: EmbeddingGemma for retrieval, ShieldGemma 2 for safety classification, VaultGemma if you need differential privacy guarantees, and Gemma Scope for interpretability research.

The other legitimate reason is reproducibility - if you're matching a published result, use the exact checkpoint that paper used.

What's the difference between Gemma 3n and Gemma 4 E2B/E4B?

They're the same idea a generation apart. Gemma 3n introduced the "effective parameter" edge models in June 2025; Gemma 4's E2B and E4B are their successors, with longer context (128K vs 32K), better benchmarks, video input and the Apache 2.0 licence. Unless you're pinned to a specific checkpoint, use the Gemma 4 versions.

Can I fine-tune a downloaded Gemma model?

Yes. LoRA and QLoRA through TRL, PEFT or Unsloth - QLoRA on E4B fits comfortably on a single 24 GB card. Full fine-tuning works via JAX or Keras. For Gemma 4 the Apache 2.0 licence means you own the result and can redistribute or commercialise it. For older Gemma models, the Gemma Terms require you to pass those terms on to anyone you distribute the derivative to.

Do I download the base or the instruction-tuned model?

Instruction-tuned (-it), unless you're doing your own post-training. Base models complete text rather than following instructions - ask one a question and it may continue with more questions instead of answering. This is the single most common download mistake.

Is it safe to download model weights?

Safetensors - the format every official Gemma repo uses - is designed so that loading a file cannot execute code. Older pickle-based .bin checkpoints don't have that guarantee. Stick to the google/ namespace on Hugging Face, or Ollama and Kaggle, and prefer Safetensors or GGUF over .bin.

Ready to download?

Every checkpoint, every mirror and every pull command, in one directory.