Google Gemma

Google Gemma

Open Source

Google DeepMind's open-weight LLM family — self-host on any hardware, from phones to workstations.

LLM
Open-weight

Scores

Popularity
4/5
Learning Curve
2/5
Flexibility
5/5
Performance
4/5
Portability
5/5

About

Google Gemma is Google DeepMind's family of open-weight large language models built on the same research and architecture that powers the proprietary Gemini models. Unlike Gemini, Gemma weights are publicly released and can be downloaded, self-hosted, fine-tuned, and deployed freely — making it the open-source counterpart to Google's closed API offering.

Model Families

Gemma 1 (February 2024)

The original release, available in 2B and 7B parameter sizes. Established Gemma as competitive with similarly sized open models on standard benchmarks.

Gemma 2 (June–July 2024)

Available in 2B, 9B, and 27B sizes with an 8K token context window. Introduced significant quality improvements over Gemma 1 and became widely adopted for fine-tuning experiments. Compatible with Hugging Face Transformers, JAX, PyTorch, TensorFlow via Keras, vLLM, llama.cpp, and Ollama.

Gemma 3 (March 2025)

A major generational step, released in 1B, 4B, 12B, and 27B sizes:

  • 1B: Text-only, 32K token context — optimised for constrained environments
  • 4B, 12B, 27B: Multimodal (text + image input), 128K token context window, support for 140+ languages

Gemma 3 models were trained on 2T–14T tokens (scaling with model size) using Google TPUs and JAX. Post-training used distillation, reinforcement learning from human feedback, and model merging. Benchmarks placed the 27B instruction-tuned variant near the top of its parameter class on MMLU, HumanEval, and math reasoning tasks.

Gemma 3n (June 2025)

Edge-optimised variants (E2B, E4B) with a novel per-layer embedding architecture that reduces active memory footprint during inference — enabling near-zero-latency inference on mobile phones and Raspberry Pi-class hardware.

Gemma 4 (March 2026)

The current generation, released under Apache 2.0 (replacing the earlier Gemma Terms of Use), available in four sizes:

  • E2B (~2B, for phones and microcontrollers)
  • E4B (~4B, for edge devices and laptops)
  • 26B MoE (Mixture of Experts; only ~3.8B parameters active per token — fits on a single RTX 3090/4090, delivers ~97% of the 31B's quality at 8x less compute)
  • 31B Dense (for workstations and cloud deployment)

All Gemma 4 models support multimodal input (text, image, video; audio on smaller variants), a 256K token context window, 140+ languages, function calling, and structured output. The 31B achieves 85.2% on MMLU Pro and 89.2% on AIME 2026.

Specialised Variants

  • PaliGemma / PaliGemma 2 — Vision-language models combining SigLIP (image encoder) with Gemma, available in 3B, 10B, and 28B sizes. Designed for visual question answering, image captioning, and document understanding. Fine-tuning-friendly for vision tasks.
  • CodeGemma — Code-specialised variant (7B base and instruction-tuned), optimised for code completion, generation, and understanding. Runs in editors via Ollama or compatible local inference servers.
  • ShieldGemma — Safety-classification model for filtering harmful content in LLM pipelines.
  • MedGemma — Healthcare-domain fine-tune for clinical reasoning tasks.
  • EmbeddingGemma — Lightweight 308M embedding model for semantic search and RAG pipelines.

Access Methods

Self-hosting (primary use case)

Weights are freely available on Hugging Face (google/gemma-*) and Kaggle. Run locally with:

  • Ollama — one-command local inference: ollama run gemma3
  • llama.cpp / Gemma.cpp — GGUF quantised models for CPU/GPU inference on consumer hardware
  • vLLM — high-throughput serving for production deployments
  • Hugging Face Transformers / Keras — standard Python integration

Hardware requirements are modest: the 2B model runs on 8GB RAM; the 7B/9B on a single 16–24GB GPU; the 27B on a workstation GPU or multi-GPU setup.

Google AI Studio

Free browser-based inference for Gemma models via the Google AI Studio playground — useful for testing and prototyping without local hardware.

Google Cloud Vertex AI

Managed deployment through the Vertex AI Model Garden — supports Gemma fine-tuning, managed endpoints, and enterprise-grade scaling with GCP infrastructure.

Third-party Providers

Gemma models are available for inference on Together AI, Fireworks AI, Amazon Bedrock, and NVIDIA AI Foundry (with TensorRT-LLM acceleration).

License

Gemma 1–3 were released under the Gemma Terms of Use — a custom, permissive-but-not-OSI-approved licence that allows most commercial use but includes a Prohibited Use Policy, a flow-down clause for downstream users, and reserved rights for Google to restrict usage. Gemma 4 switched to a standard Apache 2.0 licence, removing all custom restrictions and enabling fully unrestricted commercial use, including fine-tuning and redistribution of derivative models.

Key Features

  • Full model family from 1B to 31B: Gemma 1, 2, 3, and 4 covering edge, consumer, and server-grade hardware
  • Gemma 4 Apache 2.0 licence — fully open for commercial use, fine-tuning, and redistribution
  • Self-hosting via Ollama, llama.cpp, vLLM, and Hugging Face Transformers — runs on consumer GPUs and even phones
  • Weights freely available on Hugging Face and Kaggle — no API key or subscription required
  • Gemma 3 & 4: multimodal (text + image/video input), 128K–256K token context windows
  • Specialised variants: PaliGemma (vision), CodeGemma (code), MedGemma (healthcare), EmbeddingGemma (RAG)
  • Gemma 4 26B MoE: only 3.8B active parameters per token — near-27B quality on a single RTX 3090/4090
  • Free inference via Google AI Studio; managed deployment via Vertex AI; third-party availability on Together AI, Fireworks, and Amazon Bedrock
  • 140+ language support and function calling in Gemma 3 and Gemma 4

Pros

  • Best-in-class performance for their parameter count — Gemma 2 and 3 consistently outperform similarly sized open models
  • Gemma 4's MoE architecture gives near-31B reasoning quality with only 3.8B active parameters — dramatically reduces inference cost
  • Truly portable: runs on phones, laptops, consumer GPUs, and cloud without modification
  • Gemma 4 Apache 2.0 licence removes all commercial restrictions — fine-tune, redistribute, and productise freely
  • Broad ecosystem support: Ollama, vLLM, llama.cpp, Hugging Face, Keras, JAX, PyTorch — integrates with existing ML stacks
  • Free Google AI Studio inference for prototyping without local hardware
  • Specialised variants (PaliGemma, CodeGemma, MedGemma) provide task-optimised starting points for fine-tuning

Cons

  • Gemma 1–3 use a custom Gemma Terms of Use (not OSI-approved) with prohibited-use flow-down clauses — Gemma 4 resolves this with Apache 2.0, but older versions remain restricted
  • Largest open variant is 31B — teams needing 70B+ class reasoning must look to Meta Llama or other families
  • On-device deployment requires hardware expertise; quantisation tuning and memory management add friction compared to cloud APIs
  • CodeGemma and PaliGemma lag newer specialised alternatives (e.g. DeepSeek Coder, LLaVA successors) on task-specific benchmarks
  • Google's release cadence is rapid, meaning Gemma 1 and 2 models are increasingly obsolete; tracking the current best version requires active monitoring
  • Fine-tuning large variants (27B, 31B) still requires substantial GPU memory even with LoRA

Pricing

Open Source

Learning Resources

No resources yet — check back soon.

Vendor

Tags

Open SourceSelf-hostableWeb

Details

Maintained
Yes