Skip to content

Quickstart

Gemma is a family of lightweight, state-of-the-art open models built from the same research and technology used to create the Gemini models. Developed by Google DeepMind and other teams across Google, Gemma is named after the Latin gemma, meaning precious stone. The Gemma model weights are supported by developer tools that promote innovation, collaboration, and the responsible use of artificial intelligence (AI).

The latest in the Gemma family is Gemma 4 featuring multimodal (text, image, audio) inputs.

New to Gemma?

To learn more about the Gemma family of models, visit the model family page for a tour.

Choose a model

Gemma 4 ships in five sizes. They share a tokenizer and prompt format, so you can start small and move up without rewriting anything.

Size Input ➔ Output Context Intended Platform
E2B Text, Image, Audio, Video ➔ Text 128K Mobile devices
E4B Text, Image, Audio, Video ➔ Text 128K Mobile devices and laptops
12B Text, Image, Audio, Video ➔ Text 256K Laptops, desktop computers and small servers
26B A4B Text, Image, Video ➔ Text 256K Desktop computers and small servers
31B Text, Image, Video ➔ Text 256K Large servers or server clusters

Run your first inference

Install transformers, then run:

from transformers import pipeline

pipe = pipeline(
    "text-generation",
    model="google/gemma-4-12B-it",
    device_map="auto"
)
output = pipe("Explain quantum computing simply:", max_new_tokens=150)
print(output[0]["generated_text"])

Install llama.cpp, then run:

llama-cli -hf google/gemma-4-12B-it-qat-q4_0-gguf --prompt "Write a poem about the Kraken."

Install ollama, then run:

ollama run gemma4:12b "Explain quantum computing simply:"

Install MLX LM, then run:

mlx_lm.generate --model mlx-community/gemma-4-12B-it-qat-4bit \
    --prompt "Explain quantum computing simply:"

Install vLLM, then run:

vllm serve google/gemma-4-26B-A4B-it

Install LMStudio, then run:

lms chat google/gemma-4-12b

Using a coding agent?

Install the gemma-dev skill so your agent stays current with the latest models:

npx skills add google-gemma/gemma-skills --skill gemma-dev --global

Providers

If you want to run Gemma 4 on a different stack, you can choose from the following:

Get the weights

Every size ships full-precision weights plus Quantization-Aware Training (QAT) checkpoints, which hold up far better at 4-bit than a generic post-training quant.

Where What's there
Hugging Face Safetensors, GGUF and QAT collections
Kaggle The same checkpoints, mirrored
Ollama Prebuilt tags, pulled on first run

Checkpoint names follow google/gemma-4-{SIZE}-it{SUFFIX} — pick the suffix your engine wants:

Running on Suffix
llama.cpp, LM Studio, Ollama -qat-q4_0-gguf
vLLM, SGLang -qat-w4a16-ct
Mobile -qat-mobile-transformers, -qat-mobile-ct

What's next