✨ Built from the same research as Gemini 3 · Apache 2.0

Gemma 4 by Google
The Powerful Open AI Model
for Coding, Reasoning & More

Discover Gemma 4 by Google the next-generation open AI language model built for powerful reasoning, coding, content creation, and intelligent applications. Explore its features, model sizes, performance, downloads, and how to run Gemma 4 locally.

$ ollama run gemma4
5
Model sizes
256K
Max context
140+
Languages
150M+
Gemma 4 downloads
Apache 2.0
License
Gemma 4 Latest Updates

New Features, Models, Performance & Release News

The Gemma 4 line has moved fast since launch. Here are the most recent milestones.

July 2026

Google Gemma 4 E2B for TPU: Offline AI for Pixel 10 Explained

Google announces Gemma 4 E2B for TPU, an optimized on-device AI model for the Pixel 10 series. Experience offline AI chat, image recognition, audio transcription, and multimodal capabilities powered by the Tensor G5 TPU. Read More

July 2026

Multi-Token Prediction (MTP) drafters & TranslateGemma

MTP drafters rolled out for the E2B, E4B, 31B, and 26B variants to cut inference latency, alongside a new TranslateGemma family (4B, 12B, 27B) and MedGemma 1.5 for medical use cases.

June 3, 2026

Gemma 4 12B - a unified, encoder-free multimodal model

A new mid-size model that feeds vision and audio directly into the language backbone with no separate encoders. It runs on laptops with 16 GB of RAM and approaches the 26B MoE on benchmarks at under half the memory footprint.

May 2026

Added to Android Bench & the Gemma 4 Good Challenge on Kaggle

Gemma 4 joined the Android Bench LLM leaderboard, and Google opened a Kaggle challenge inviting developers to build products for positive impact.

April 2, 2026

Gemma 4 launches in four sizes under Apache 2.0

The initial release shipped E2B, E4B, a 26B Mixture-of-Experts, and a 31B Dense model - the first Gemma generation under a permissive Apache 2.0 license, with day-one support across the open-source tooling ecosystem.

Gemma 4 Deployment Guide

5 Powerful Ways to Run the Model

Every model shares the same tokenizer and prompt format, so you can start small and scale up by swapping a checkpoint name.

31B

Flagship

Dense model for the hardest reasoning, coding, and agentic orchestration on workstations and servers.

  • TypeDense
  • Context256K
  • InputText + image
  • Arena rank#3 (text)

26B

MoE

Mixture-of-Experts with roughly 4B active parameters - flagship-class quality at a lower serving cost.

  • TypeMoE (A4B)
  • Context256K
  • InputText + image
  • Arena rank#6 (text)

12B

Balanced · New

Unified encoder-free multimodal model with native audio. Runs on a 16 GB laptop with MTP drafters for low latency.

  • TypeDense · unified
  • InputText + image + audio
  • Footprint16 GB RAM
  • ReleasedJun 2026

E4B

Edge

Effective 4B model tuned for edge devices, with native audio input and strong on-device performance.

  • Effective~4.5B
  • Context128K
  • InputText + image + audio
  • TargetEdge / laptop

E2B

On-device

Effective 2B model small enough for phones and embedded hardware via MediaPipe and LiteRT.

  • Effective~2.3B
  • Context128K
  • InputText + image + audio
  • TargetPhones
Get It

Get Gemma 4 Your Way
Download, Deploy, and Run Anywhere

Available through multiple platforms. Choose the method that works best for your workflow.

🤗

Hugging Face

Download the model weights directly from Hugging Face Hub. Supports GGUF, Safetensors, and PyTorch formats.

pip install transformers
Download on Hugging Face →
🐍

Docker

Containerized deployment for production environments. Ensures consistency across development, staging, and production setups.

ai.google.dev/gemma
Docker →
☁️

LM Studio Hub

User-friendly desktop interface for running Gemma 4 locally. No coding required - ideal for beginners and non-technical users.

gcloud ai models upload
LM Studio →
📦

Ollama / Local

Run Gemma 4 locally with Ollama. Optimized for Mac, Linux, and Windows with quantized models.

ollama run gemma4:27b
Run with Ollama →
🔗

GitHub Repository

Access the source code, fine-tuning scripts, and documentation. Contribute to the open ecosystem.

git clone gemma4-repo
View on GitHub →

Kaggle Notebooks

Experiment with Gemma 4 using free GPU notebooks on Kaggle. Great for learning and prototyping.

kaggle models load gemma4
Open on Kaggle →
Product Features

Why Choose Gemma 4

Built from the ground up with cutting-edge research and real-world developer feedback.

🧠

Advanced Reasoning

Multi-step logical reasoning with chain-of-thought capabilities. Solves complex math, science, and logic problems with state-of-the-art accuracy. See the benchmarks.

💻

Expert Code Generation

Write, debug, and refactor code across 50+ programming languages. Supports full project-level understanding and agentic coding workflows.

🌍

100+ Languages

Truly multilingual with native-quality understanding and generation in over 140 languages, including low-resource ones - plus a dedicated TranslateGemma line.

📄

256K Token Context

Process entire books, codebases, or long documents in a single prompt with exceptional recall and attention - up to 256K tokens on the 26B and 31B.

🔒

Built-in Safety

Advanced safety filters, responsible AI guardrails, and fine-grained content moderation built directly into the model architecture.

Optimized Inference

Fast inference with TPUs, GPUs, and even edge devices. Quantized models available for deployment on consumer hardware.

🔧

Easy Fine-Tuning

Full support for LoRA, QLoRA, and full fine-tuning. Pre-built scripts and integrations with popular ML frameworks.

🏗️

Agentic Capabilities

Function calling, tool use, and autonomous agent workflows. Build AI agents that can interact with APIs, databases, and external systems.Try More

📊

Multimodal Ready

Supports text, images, and structured data inputs. Analyze charts, diagrams, and visual content alongside textual reasoning - see the 12B.

Performance

Gemma 4 31B benchmark highlights

Reported scores for the dense 31B flagship. Always validate on your own tasks before deploying.

AIME 2026 (competition math)89.2%
MMLU Pro (knowledge & reasoning)85.2%
LiveCodeBench v6 (code)~80%
Arena AI - text leaderboard#3 open
Comparison

Gemma 4 vs the top LLMs

How Gemma 4 stacks up against the leading open and proprietary models of 2026.

Model Access License Max context Input modalities On-device Best for
Gemma 4
Google DeepMind
Open weights Apache 2.0 Up to 256K Text · image · audio Yes (E2B/E4B) Open, multimodal, on-device deployment across phones to servers
Llama 4
Meta
Open weights Community license Up to ~10M (Scout) Text · image Partial Ultra-long context and very large-scale MoE models
Qwen 3.6
Alibaba
Open weights Apache 2.0 256K+ Text · image Some sizes Agentic coding, tool use, and long-horizon software workflows
DeepSeek
DeepSeek
Open weights MIT-style ~128K Text (image on VL) No (large) Cost-efficient reasoning and math at frontier quality
GPT-5
OpenAI
Proprietary Commercial API Large (~256K+) Text · image · audio No Broad frontier capability via a managed API
Gemini 3
Google
Proprietary Commercial API 1M+ Text · image · audio · video No Highest-capability multimodal reasoning with huge context
Claude (Opus 4.x)
Anthropic
Proprietary Commercial API 200K+ Text · image No Coding, long-form reasoning, and safety-focused deployments

Figures are approximate and reflect mid-2026 public information; frontier-model specs change often. Only Gemma 4, Llama 4, Qwen, and DeepSeek offer downloadable weights - the rest are API-only. Verify current details against each provider's documentation.

Get Started

Get Started with Gemma 4 in Seconds

Pull the weights from Hugging Face, Kaggle, or Ollama and run locally, or deploy on Google Cloud.

# Run locally with Ollama
ollama run gemma4

# Or load with Hugging Face Transformers
from transformers import pipeline
pipe = pipeline("text-generation", model="google/gemma-4-12b-it")
print(pipe("Explain what makes Gemma 4 an open model."))
Deploy

Run, Train & Deploy Gemma 4 with Ease

Take Gemma 4 from development to production with flexible deployment options. Choose the platform that matches your infrastructure needs and scale requirements.

JAX

High-performance numerical computing library optimized for machine learning research. Ideal for custom training loops, distributed computing, and cutting-edge experimentation with maximum flexibility.

Install JAX for CPU, GPU or TPU
Installation on JAX →
☁️

Vertex AI

Google Cloud's unified ML platform for building, training, and deploying models at scale. Features automated ML, MLOps tools, and seamless integration with Google Cloud services.

ai.google.dev/gemma
Vertex AI →
🧩

Keras

User-friendly deep learning framework with intuitive APIs. Perfect for rapid prototyping, educational purposes, and standard neural network architectures with minimal code.

import keras_hub
Keras →
📱

Google AI Edge

Deploy Gemma 4 on mobile and edge devices with LiteRT (TensorFlow Lite). Optimize for on-device inference with reduced latency and enhanced privacy for iOS and Android applications.

Deploy across mobile, web & embedded
Google AI Edge →
☸️

Google Kubernetes Engine (GKE)

Enterprise-grade container orchestration for scalable deployments. Auto-scaling, load balancing, and high availability for production workloads serving millions of users.

Run Gemma with Kubernetes Engine
Google Kubernetes Engine (GKE) →
🦙

Ollama

Lightweight local deployment for development and testing. Run Gemma 4 on your machine with minimal setup, perfect for prototyping before scaling to cloud infrastructure.

Run Gemma with Ollama
Ollama →
Explore

Everything You Need to Know About Gemma 4

Quick answers to the most common questions - downloads, code, install, cost, and how it stacks up.

💸 Gemma 4 download free

Yes - Gemma 4 is genuinely free. Every model in the family ships as open weights under the Apache 2.0 license, so you can download, run, modify, and even use it commercially at no licensing cost. There are no monthly active-user caps and no acceptable-use paywall.

Grab the weights from Hugging Face, Kaggle, or Ollama. The only thing you pay for is the compute you run it on - your own GPU, or a hosting provider if you'd rather not self-host.

🔍 Search: Gemma 4 download free →

🐙 Gemma 4 GitHub

Google DeepMind publishes Gemma's reference implementations, inference examples, and the Gemma Cookbook on GitHub, alongside integrations maintained by the wider community. It's the place to find sample code, fine-tuning recipes, and tooling.

Note the distinction: the model weights live on Hugging Face and Kaggle, while GitHub hosts the code. Gemma 4 is open-weight, not fully open-source - the weights and inference code are public, but the training data and full pipeline are not released.

🔍 Search: Gemma 4 GitHub →

⚙️ Gemma 4 install

The fastest path is Ollama: install it, then run ollama run gemma4 and the weights download automatically. For Python workflows, pip install transformers and load the model from Hugging Face.

Other supported runners include llama.cpp (GGUF files, CPU or GPU), LM Studio (a friendly desktop GUI), and MLX for Apple Silicon. On phones and edge devices, the E2B and E4B variants install via MediaPipe and LiteRT.

🔍 Search: Gemma 4 install →

🏷️ Gemma 4 pricing

The weights themselves cost nothing. "Pricing" only enters the picture in two ways: the hardware you run it on when self-hosting, or per-token fees if you use a hosted API instead of running it yourself.

Hosted options include Google Cloud (Vertex AI, Cloud Run, GKE) and third-party providers like OpenRouter, Together, and Fireworks. Per-token rates for open models in this class are typically well under a dollar per million tokens, but they vary by provider and change often - always check current rates before budgeting.

🔍 Search: Gemma 4 pricing →

🤖 Gemma 4 model

Gemma 4 is Google DeepMind's open-weight model family, built from the same research as Gemini 3 and released under Apache 2.0. It's designed for advanced reasoning and agentic workflows, with the emphasis on intelligence-per-parameter.

The family spans five sizes - E2B and E4B for edge, the new 12B unified multimodal model, a 26B Mixture-of-Experts, and a 31B dense flagship - all sharing one tokenizer and prompt format, with text, image, and (on several variants) audio input.

🔍 Search: Gemma 4 model →

📱 Gemma 4 Android

Gemma 4 is built to run on Android hardware. The compact E2B and E4B models run on-device through Google AI Edge (including the AI Edge Gallery app) and the ML Kit GenAI Prompt API, so apps can use them offline without a cloud round-trip.

For developers, Gemma 4 can power Agent Mode in Android Studio, and Google added the family to the Android Bench LLM leaderboard - a signal of its growing role in on-device and Android-specific development.

🔍 Search: Gemma 4 Android →

⚔️ Gemma 4 vs Qwen 3.6

These are the two headline open-weight families of 2026, both under Apache 2.0 and released within weeks of each other (Gemma 4 on April 2; Qwen 3.6 shortly after in mid-April). They're built around different priorities, so the "winner" depends entirely on your workload rather than a single leaderboard.

Gemma 4 tends to lead on: native multimodality (image, audio, and video input across the family), breadth of deployment from phones to servers, Google-ecosystem integration, ease of fine-tuning, and strong general-chat rankings (its 31B and 26B placed #3 and #6 on Arena's text leaderboard). Qwen 3.6 tends to lead on: agentic coding, tool use, and very long-context software workflows, with Mixture-of-Experts efficiency that can make it faster and cheaper per token.

A reasonable rule of thumb: pick Gemma 4 for multimodal, on-device, and local-first products across varied hardware; pick Qwen 3.6 if coding agents and long-horizon repo work are your center of gravity. Note that specific benchmark numbers vary widely between sources and the two families publish on largely non-overlapping suites, so validate on your own tasks before deciding.

🔍 Search: Gemma 4 vs Qwen 3.6 →
Complete Guide

The Complete Gemma 4 Guide
Models, Downloads, Benchmarks, Fine-Tuning & Comparisons

The full deep dive - models, downloads, benchmarks, fine-tuning, and how it compares to Gemini, Qwen, and Llama.

01 · OVERVIEW

Google Gemma 4

GemmaFeb 2024 Gemma 2Jun 2024 Gemma 3Mar 2025 Gemma 4Apr 2026
The Gemma lineage - Gemma 4 is the fourth generation, built from Gemini 3 research.

Gemma 4 is Google DeepMind's most capable family of open-weight models, launched on April 2, 2026. It is built from the same research and technology as Google's frontier Gemini 3 models, but distilled into smaller checkpoints you can download, run, and modify yourself. The headline theme is intelligence-per-parameter: frontier-class reasoning packaged small enough to run on everything from phones to workstations.

A major change from earlier generations is licensing. Where Gemma 1 through 3 shipped under a custom Google license, Gemma 4 is released under the permissive Apache 2.0 license, removing most enterprise legal friction. The family is natively multimodal, fluent in 140+ languages, and purpose-built for reasoning and agentic workflows.

🔍 Search: Google Gemma 4 →
02 · GET IT

Gemma 4 download

Gemma 4 is free to download from three main sources: Hugging Face, Kaggle, and Ollama. Because the weights are open under Apache 2.0, there's no cost for the model itself - you only pay for the hardware you run it on.

The simplest route is a local runner that fetches the weights for you on first run. If you're building a pipeline, pull the checkpoint explicitly instead. You'll accept the license once (a one-click step on the model card, or a token in automated environments) before the download begins.

# Easiest - Ollama downloads on first run
ollama run gemma4

# Explicit pull from Hugging Face
huggingface-cli download google/gemma-4-12b-it --local-dir ./gemma-4-12b
🔍 Search: Gemma 4 download →
03 · THE FAMILY

Gemma 4 model

E2BPhones · effective 2B E4BEdge / laptop · effective 4B 12BUnified multimodal · native audio 26BMoE · ~4B active 31BDense flagship
Five sizes, one family - every variant shares the same tokenizer and prompt format.

"The Gemma 4 model" really means a family. It ships in five sizes so you can pick the smallest model that clears your quality bar: E2B and E4B for edge and on-device, the new 12B unified multimodal model, a 26B Mixture-of-Experts, and a 31B dense flagship. Most sizes come in a base (pretrained) and an instruction-tuned flavor.

Because the whole family shares one tokenizer and chat template, moving between sizes is mostly swapping a checkpoint name - your prompts, evaluation harness, and serving code stay the same.

🔍 Search: Gemma 4 model →
04 · FLAGSHIP

Gemma 4 31B

Dense - every parameter active on every token
The 31B is fully dense: all 31 billion parameters fire on every token for maximum reliability.

The 31B Dense model is the flagship. Every parameter is active on every token, which trades speed for consistency and top-end quality. It's the pick when reasoning quality is the absolute priority and you have the hardware - a single high-end data-center GPU handles it at production latency, and in 4-bit quantization it can fit on a 16 GB consumer GPU.

On public leaderboards the 31B reached around #3 on Arena's open-model text leaderboard, competing with models many times its size, and it supports text and image input with up to a 256K context window.

🔍 Search: Gemma 4 31B →
05 · MIXTURE OF EXPERTS

Gemma 4 26B

MoE - a router activates only a few experts per token (~4B active) router expert ✓ idle idle expert ✓ idle idle expert ✓
The 26B routes each token to a small subset of experts - flagship-class quality at a fraction of the active compute.

The 26B is a Mixture-of-Experts (MoE) model - often written 26B A4B, meaning roughly 4B parameters are active per token even though the full model is larger. A learned router sends each token to a handful of specialized experts while the rest sit idle and cost nothing, so you get quality approaching the dense 31B at meaningfully lower serving cost.

It supports the same 256K context and text-plus-image input, and per active parameter it's one of the most efficient reasoning models in the open-weight field, landing around #6 on Arena's text leaderboard.

🔍 Search: Gemma 4 26B →
06 · UNIFIED MULTIMODAL

Gemma 4 12B

🖼️ image 🔊 audio LLM backboneno separate encoders text out
The 12B feeds vision and audio straight into the language backbone - no bolt-on encoders.

Released on June 3, 2026, the 12B is a mid-size model with a novel unified, encoder-free architecture: image and audio inputs flow directly into the LLM backbone instead of passing through separate encoders first. It's the first mid-sized Gemma with native audio input, and it ships with Multi-Token Prediction (MTP) drafters to cut latency.

Practically, it bridges the edge-friendly E4B and the heavier 26B MoE: it runs on a laptop with 16 GB of RAM yet approaches the 26B on benchmarks at under half the memory footprint - the best all-round pick for local assistants and RAG.

🔍 See the full Gemma 4 12B page →
07 · EDGE

Gemma 4 E4B

💻📱🤖🎧 LaptopPhoneRoboticsVoice
E4B targets edge hardware - running on as little as 6–8 GB of VRAM.

The E4B ("Effective 4B", around 4.5B parameters) is the larger of the two edge models. The "effective" naming reflects a Per-Layer Embedding design that maximizes capability per unit of memory. It takes text, image, and audio input, supports a 128K context, and runs comfortably on laptops and modest GPUs - reportedly on as little as 6–8 GB of VRAM, while still outperforming the previous-generation Gemma 3 27B on math and agentic tasks.

Alongside it, the even smaller E2B targets phones and embedded devices via MediaPipe and LiteRT. Together they open on-device categories - offline assistants, voice apps, robotics - that weren't viable with earlier open models.

🔍 Search: Gemma 4 E4B →
08 · ACCESS

Gemma 4 API

You can use Gemma 4 without hosting it yourself. Google exposes it through Google AI Studio and Google Cloud (Vertex AI, Cloud Run, GKE), and third-party providers such as OpenRouter, Together, and Fireworks serve it via OpenAI-compatible endpoints. If you self-host, tools like vLLM and llama.cpp's server also expose an OpenAI-style API so your existing client code just works.

# OpenAI-compatible call against a self-hosted or provider endpoint
curl $BASE_URL/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -d '{"model":"gemma-4-12b-it","messages":[{"role":"user","content":"Hi"}]}'
🔍 Search: Gemma 4 API →
09 · HUGGING FACE

Gemma 4 Hugging Face

Hugging Face is the primary home for the weights and the day-one integration point for the Python ecosystem - Transformers, TRL, Transformers.js, and Candle all support Gemma 4. The models are gated: click Accept on the model card (or authenticate with a token) once, and you're set.

from transformers import pipeline
pipe = pipeline("text-generation", model="google/gemma-4-12b-it")
print(pipe("Explain what makes Gemma 4 open."))
🔍 Search: Gemma 4 Hugging Face →
10 · PREREQUISITES

Gemma 4 requirements

Beyond hardware (covered in §19), getting started needs only a few things:

Software: a runner - Ollama, LM Studio, llama.cpp, or Python with Transformers (Python 3.10+). GPU acceleration wants recent NVIDIA CUDA, AMD ROCm, or Apple Metal drivers; CPU-only works too, just slower.

License: accept the terms once on the model card. Gemma 4 is Apache 2.0, so commercial use, modification, and redistribution are permitted - but note the license does not grant trademark rights, so you can't brand your product as "Gemma".

Disk: budget from a couple of gigabytes for a quantized edge model up to tens of gigabytes for a full-precision flagship checkpoint.

🔍 Search: Gemma 4 requirements →
11 · HOW-TO

How to run Gemma 4 locally

1Install a runner 2Pull the model 3Chat / integrate
Three steps from zero to a local Gemma 4 chat.

The friendliest path is Ollama: install it, run one command, and it downloads and serves the model. Prefer a GUI? LM Studio gives you a chat window and a local server. Want maximum portability or CPU support? llama.cpp runs GGUF files anywhere. On a Mac, MLX takes advantage of unified memory.

# Ollama - the fastest local path
ollama run gemma4

# llama.cpp - portable, CPU or GPU, offload all layers with -ngl 99
./llama-cli -m gemma-4-12b-it-Q4_K_M.gguf -ngl 99 -c 8192 -p "Hello"
🔍 Search: how to run Gemma 4 locally →
12 · COMPARISON

Gemma 4 vs Gemini

Gemma 4 Open weights · runs on your hardware Apache 2.0 · on-device · you own it Downloadable · self-hostable Gemini Proprietary frontier · managed API Highest capability ceiling Cloud-only · not downloadable
Same research lineage, opposite distribution models.

These aren't really competitors so much as two ends of one strategy. Gemini is Google's proprietary frontier line (Gemini 3, and newer Flash tiers) - the most capable models, delivered as a managed API you reach through Google's cloud. You can't download the weights or run them offline. Gemma 4 is the open-weight sibling, built from the same research, that you can download, fine-tune, and run inside your own infrastructure.

Pick Gemini when you want the highest possible capability and are happy with a hosted service; pick Gemma 4 when you need data control, offline or on-device deployment, custom fine-tuning, or predictable self-hosted costs.

🔍 Search: Gemma 4 vs Gemini →
13 · COMPARISON

Gemma 4 vs Qwen

Gemma 4 leans Multimodal (image · audio · video) Broad deployability · on-device Strong general-chat rankings Qwen leans Agentic coding · tool use Very long context MoE efficiency · lower cost/token
Both open and Apache 2.0 - they optimize for different workloads.

Alibaba's Qwen family (the 3.5 / 3.6 generation) is Gemma 4's closest open-weight rival - both released in 2026 under Apache 2.0. The two publish on largely non-overlapping benchmark suites, so a clean apples-to-apples score is hard. In broad strokes: Gemma 4 leads on native multimodality, deployment breadth from phones to servers, ease of fine-tuning, and general-chat rankings, while Qwen leads on agentic coding, tool use, and very long context, with MoE routing that can make it faster and cheaper per token.

Rule of thumb: Gemma 4 for multimodal, on-device, and local-first products; Qwen if coding agents and long-horizon repo work are your center of gravity. Validate on your own tasks - specific numbers vary a lot between sources.

🔍 Search: Gemma 4 vs Qwen →
14 · COMPARISON

Gemma 4 vs Llama

Gemma 4 wins on On-device · runs on 6–16 GB Multimodal · 140+ languages Apache 2.0 · no MAU cap Llama 4 wins on Ultra-long context (Scout ~10M) Raw scale (Maverick 400B MoE) …if you have datacenter hardware
Gemma 4 is the accessibility pick; Llama 4 is the scale-and-context pick.

Meta's Llama 4 (Scout and Maverick, released April 5, 2026) takes a very different shape. Its models are large - Scout is a 17B-active/109B MoE, Maverick a 17B-active/400B MoE - and they ship under Meta's Community License, which restricts apps above 700M monthly active users and requires "Built with Llama" branding. They take text and image only, with roughly a dozen languages.

Independent write-ups generally give Gemma 4 the edge on reasoning, math, and coding benchmarks at comparable sizes, plus native audio/video, 140+ languages, unrestricted Apache 2.0 licensing, and true on-device deployment (the E4B runs on 6–8 GB of VRAM). Llama 4's standout advantages are Scout's headline ~10M-token context and Maverick's raw scale for maximum reasoning - both of which need serious multi-GPU hardware. Choose Gemma 4 for laptops, edge, and licensing simplicity; choose Llama 4 when you genuinely need extreme context or the largest open model.

🔍 Search: Gemma 4 vs Llama →
15 · PERFORMANCE

Gemma 4 benchmarks

AIME 2026 (math) 89.2% GPQA Diamond 84.3% MMLU Pro (knowledge) 85.2% LiveCodeBench v6 (code) ~80% Arena AI (text, open) #3
Reported Gemma 4 31B figures. Benchmarks are indicative - validate on your own tasks.

On disclosed benchmarks the 31B flagship is strong on reasoning and math - reported around 89.2% on AIME 2026, 85.2% on MMLU Pro, roughly 80% on LiveCodeBench v6, and a notably high 84.3% on GPQA Diamond (graduate-level reasoning) - and it placed about #3 on Arena's open-model text leaderboard, with the 26B MoE around #6.

⚠️ Read benchmarks carefully. Figures come from vendor cards and third-party write-ups that don't always agree, and public suites can leak into training data. The only score that truly matters is a held-out evaluation on your own workload with fixed prompts and decoding settings.
🔍 Search: Gemma 4 benchmarks →
16 · COST

Gemma 4 pricing

WeightsFree · Apache 2.0 Self-hostPay for compute Hosted APIPer-token fees
The model is free; cost only comes from how you choose to run it.

The weights cost nothing - Apache 2.0, no licensing fees, no monthly-user caps. "Pricing" enters only two ways: the hardware you run it on when self-hosting, or per-token fees if you use a hosted API instead of running it yourself.

Hosted options include Google Cloud (Vertex AI, Cloud Run, GKE) and providers like OpenRouter, Together, and Fireworks. Per-token rates for open models in this class typically land well under a dollar per million tokens, but they vary by provider and change often - always check current rates before budgeting.

🔍 Search: Gemma 4 pricing →
17 · CUSTOMIZE

Gemma 4 fine-tuning

Base weights ❄️ + LoRA adapters Your data Tuned model ✓
LoRA freezes the base weights and trains small adapters - cheap enough for a single GPU.

Gemma 4 is designed to be adapted. Full fine-tuning updates every weight and needs heavy hardware, so most people use parameter-efficient methods: LoRA freezes the base model and trains small adapter matrices, and QLoRA loads the frozen base in 4-bit so even a 12B model tunes on a single consumer GPU. Libraries like Unsloth make this fast; Google also supports fine-tuning via Colab, Vertex AI Training, and Keras.

Data quality beats quantity - a few thousand clean, correctly-formatted examples usually beat a large noisy set. Match the model's chat template exactly, use a low learning rate, and hold out a validation set. When done, keep the adapter or merge and export to GGUF or MLX for deployment.

Note on Gemma 3 adapters: Gemma 4 uses a new ~262K-token vocabulary and is not weight-compatible with Gemma 3 fine-tunes - plan to re-tune rather than port old adapters.
🔍 Search: Gemma 4 fine-tuning →
18 · LOCAL RUNNER

Gemma 4 Ollama

$ ollama run gemma4 pulling manifest ... success >>> Send a message (/? for help)
One command downloads and serves the model - that's the whole setup.

Ollama is the easiest way to run Gemma 4. Install it, then ollama run gemma4 pulls the weights and drops you into a chat prompt. It also runs a local HTTP server on port 11434 with an OpenAI-compatible endpoint, so apps and scripts can talk to it just like a cloud API - fully offline.

ollama run gemma4              # default (12B) chat
ollama run gemma4:e4b          # pick a specific size
ollama pull gemma4:27b         # download without chatting
🔍 Search: Gemma 4 Ollama →
19 · HARDWARE

Gemma 4 system requirements

Approximate memory to run (4-bit quantization) E2B~2 GB E4B~6–8 GB 12B~9–16 GB 26B MoE~16–24 GB 31B~20–24 GB+
Indicative 4-bit footprints - long contexts add KV-cache memory on top.

Hardware needs scale with model size and precision. As a rough guide at 4-bit quantization: the E2B runs on phones and ~2 GB; E4B on ~6–8 GB (a modest laptop GPU or even CPU); the 12B on a 16 GB laptop; the 26B MoE and 31B on a 24 GB consumer GPU. At full precision the larger models want a data-center GPU (e.g., a single H100 handles the 31B at production latency).

Two reminders: these figures are for weights only - long contexts add significant KV-cache memory, so budget headroom or quantize the cache. And on Apple Silicon, unified memory is shared between the OS and the model, so leave room for both.

🔍 Search: Gemma 4 system requirements →
20 · Gemma 4 E2B for TPU

Google Gemma 4 E2B for TPU: Offline AI Powers the Pixel 10 Series

Google has officially introduced Gemma 4 E2B for TPU, a new optimized version of its open AI model family designed specifically for the Tensor G5 TPU in the Pixel 10 lineup. Announced during Google I/O Connect India, the model delivers fast, private, and multimodal AI experiences directly on-device without requiring an internet connection.

Built as part of Google's open Gemma family, Gemma 4 E2B demonstrates how advanced AI can run efficiently on smartphones while keeping user data private.


FAQ

Frequently asked questions

Quick answers to the questions people ask most about Gemma 4.

What is Gemma 4? +

Gemma 4 is Google DeepMind's open-weight family of AI models, launched on April 2, 2026. It's built from the same research as the frontier Gemini 3 models but distilled into smaller checkpoints you can download, run, and modify yourself. The focus is intelligence-per-parameter: strong reasoning and agentic capability in models small enough to run from phones to workstations.

Is Gemma 4 free, and can I use it commercially? +

Yes. Gemma 4 is released under the permissive Apache 2.0 license, so the weights are free to download and you can use, modify, and redistribute them - including for commercial products - with no monthly active-user caps. The one limit: the license doesn't grant trademark rights, so you can't brand your own product as "Gemma".

What model sizes does Gemma 4 come in? +

Five: E2B and E4B for edge and on-device use, a 12B unified multimodal model, a 26B Mixture-of-Experts, and a 31B dense flagship. Every size shares the same tokenizer and prompt format, so you can start small and scale up by swapping a checkpoint name.

How do I run Gemma 4 locally? +

The fastest path is Ollama - install it and run ollama run gemma4, and it downloads and serves the model for you. Other options include LM Studio (a desktop GUI), llama.cpp (portable, CPU or GPU, uses GGUF files), and MLX on Apple Silicon. See the Run locally section of the guide for details.

What are the system requirements? +

It depends on the size and quantization. As a rough guide at 4-bit: the E2B runs in ~2 GB, E4B in ~6–8 GB, the 12B on a 16 GB laptop, and the 26B and 31B on a 24 GB consumer GPU. Full precision on the larger models wants a data-center GPU. Long contexts add KV-cache memory on top of the weights.

Is Gemma 4 multimodal? What context length does it support? +

Yes - every model takes text and image input, and native audio input is supported on the E2B, E4B, and 12B. Output is text. Context windows reach 128K on the edge models and up to 256K on the 26B and 31B.

Where can I download Gemma 4? +

From Hugging Face, Kaggle, or Ollama. You'll accept the license once on the model card (or with an access token in automated setups), then download either the full checkpoint or a single quantized file. See the Download section for commands.

How does Gemma 4 compare to Gemini, Qwen, and Llama? +

vs Gemini: Gemini is Google's proprietary frontier line (cloud-only, highest capability); Gemma 4 is the open sibling you can self-host. vs Qwen: both open and Apache 2.0 - Gemma 4 leans multimodal and on-device, Qwen leans coding-agents and long context. vs Llama 4: Gemma 4 wins on accessibility, multimodality, and licensing; Llama 4 wins on extreme context and raw scale. The guide has full side-by-side sections.

Can I fine-tune Gemma 4? +

Yes, and it's designed for it. Most people use parameter-efficient methods - LoRA and QLoRA - which let you tune even the 12B on a single consumer GPU. Libraries like Unsloth make this fast, and Google supports Colab, Vertex AI Training, and Keras. Note Gemma 4 uses a new tokenizer and is not weight-compatible with Gemma 3 adapters.

Does Gemma 4 run on Android and mobile devices? +

Yes. The compact E2B and E4B models run on-device through Google AI Edge and the ML Kit GenAI Prompt API, so apps can use them offline. Gemma 4 can also power Agent Mode in Android Studio, and it's listed on the Android Bench LLM leaderboard.

What's the difference between Gemma 4 and Gemma 3? +

Gemma 4 is the newer generation, built from Gemini 3 research. Compared to Gemma 3 it moves to a permissive Apache 2.0 license, adds native audio input and a unified multimodal design (on the 12B), introduces a Mixture-of-Experts size, and uses a larger ~262K-token vocabulary - which means it is not weight-compatible with Gemma 3 fine-tunes.

How much does it cost to use Gemma 4? +

The weights are free. Cost only enters if you pay for your own compute when self-hosting, or per-token fees on a hosted API (Google Cloud, or providers like OpenRouter, Together, and Fireworks). Per-token rates for open models in this class are usually well under a dollar per million tokens, but they vary by provider - check current rates before budgeting.

Ecosystem

Works with your favorite tools

Day-one support across the open-source and cloud stack.

Hugging Face Ollama llama.cpp MLX vLLM Unsloth LM Studio SGLang NVIDIA NIM & NeMo Keras TRL Vertex AI Cloud Run GKE LiteRT-LM Kaggle

Start building with Gemma 4 today

Download the weights, spin up the demo, or compare model sizes to find your fit.