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
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.
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.
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.
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.
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
| Generation | Released | Sizes | Context | Modalities | Licence |
|---|---|---|---|---|---|
| Gemma 4 Current | Mar 31, 2026 | E2B, E4B, 12B, 26B A4B, 31B | 128K–256K | Text, image, audio, video | Apache 2.0 |
| Gemma 3n | Jun 26, 2025 | E2B, E4B | 32K | Text, image, audio | Gemma Terms |
| Gemma 3 | Mar 10, 2025 | 270M, 1B, 4B, 12B, 27B | 32K–128K | Text, image | Gemma Terms |
| Gemma 2 | Jun 27, 2024 | 2B, 9B, 27B | 8K | Text | Gemma Terms |
| Gemma 1 | Feb 21, 2024 | 2B, 7B | 8K | Text | Gemma 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 2026Text diffusion instead of autoregression - generates 256 tokens per forward pass, up to 4× faster. Strong at code infilling and in-line editing.
TranslateGemma
Jan 2026Dedicated machine translation across the full Gemma language range. Beats general models of the same size on translation quality.
MedGemma 1.5
Jan 2026Medical imaging and clinical text. A research starting point, explicitly not a diagnostic tool - read the model card's limitations.
FunctionGemma
Dec 2025A tiny tool-calling router. Cheap enough to sit in front of a bigger model and decide which function to invoke.
T5Gemma v2
Dec 2025Encoder-decoder architecture, for summarisation and translation-style tasks where a decoder-only model is awkward.
VaultGemma
Sep 2025Trained with differential privacy - built to resist memorising and regurgitating individual training examples.
EmbeddingGemma
Sep 2025Text embeddings for retrieval, RAG and semantic search. Small and fast enough to run on CPU at scale.
MedGemma
May 2025The original medical release. Superseded by MedGemma 1.5 for the 4B, but 27B remains the largest medical Gemma.
ShieldGemma 2
Mar 2025Safety classification for text and images - filtering violent, explicit or otherwise unwanted content in a pipeline.
PaliGemma 2
Dec 2024Vision-language models for captioning, VQA and OCR. Largely superseded by Gemma 4's native multimodality.
Gemma-APS
Oct 2024Abstractive proposition segmentation - breaking text into self-contained factual claims, useful for fact-checking pipelines.
DataGemma
Sep 2024Grounds responses in Google's Data Commons statistical database to reduce numerical hallucination.
Gemma Scope v2
Dec 2025Interpretability tooling, not a chat model - for researchers inspecting what features a Gemma model has learned.
CodeGemma
Apr 2024Code completion and infilling. Now largely obsolete - Gemma 4 scores far higher on code benchmarks at comparable size.
RecurrentGemma
Apr 2024Built on the Griffin architecture rather than a standard transformer, for constant-memory inference over long sequences.
SignGemma · DolphinGemma
ResearchSign language translation and dolphin vocalisation analysis. Research projects - availability differs from the general releases.
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
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
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
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
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
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
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" )
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
B, and E2B/E4B for edge models.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:
| Precision | 12B size | Quality | When to use it |
|---|---|---|---|
| BF16 full | 26.7 GB | Reference | Fine-tuning, or when you have memory to spare and want the ceiling. |
| SFP8 / MXFP8 | 13.4 GB | Near-identical | Excellent middle ground on modern NVIDIA GPUs. Half the memory, almost no loss. |
| QAT Q4_0 Best 4-bit | 6.7 GB | Very good | The default recommendation. Trained to be quantised, so it holds up far better than post-hoc 4-bit. |
| Q4_K_M community | ~7.6 GB | Good | The usual community quant. Fine, but the official QAT build is better at a similar size. |
| Q3 | ~5.5 GB | Degraded | Noticeably worse at reasoning and code. Prefer a smaller model at Q4. |
| Q2 | ~4.5 GB | Poor | Loads, but rarely worth running. Use E4B at Q4 instead. |
-qat-q4_0-gguf on the google/ namespace.
Every Gemma 4 checkpoint
| Model | Instruction-tuned | Base | Official QAT GGUF | Ollama |
|---|---|---|---|---|
| 31B Dense | gemma-4-31B-it | gemma-4-31B |
gemma-4-31B-it-qat-q4_0-gguf | gemma4:31b |
| 26B A4B MoE | gemma-4-26B-A4B-it | gemma-4-26B-A4B |
gemma-4-26B-A4B-it-qat-q4_0-gguf | gemma4:26b |
| 12B Unified | gemma-4-12B-it | gemma-4-12B |
gemma-4-12B-it-qat-q4_0-gguf | gemma4:12b |
| E4B Edge | gemma-4-E4B-it | gemma-4-E4B |
gemma-4-E4B-it-qat-q4_0-gguf | gemma4:e4b |
| E2B On-device | gemma-4-E2B-it | gemma-4-E2B |
gemma-4-E2B-it-qat-q4_0-gguf | gemma4: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.
Want the full link directory rather than the explanation? Go to the downloads page →
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.
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 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
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)) "
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.
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.