The Techno-WitchWe read the fine print so you don't have to.

Consult the almanac

Turning the pages…

Arrow keys to move, Enter to open, Esc to close. Every answer links to a dated page.



Local AI · The Hearth

Gemma 4 12B, 31B and E4B: Memory, License and Setup

Gemma 4 comes in five sizes, from E2B (2.9 GB at 4-bit) to 31B (17.5 GB), all Apache 2.0. Memory per size, how to run it and the local cost math.

Some links on this site may earn us a commission. It never changes a price, a verdict or what we tell you to skip. How we make money.

In this story (8 sections)
  1. Gemma 4 sizes, from pocket familiar to desk heavyweight
  2. System requirements for each Gemma 4 size
  3. Text, images, audio and the thinking switch
  4. What changed from Gemma 3
  5. How to run Gemma 4 on a PC, Mac or phone
  6. Why run it locally, and the honest downsides
  7. Local vs cloud cost: the worked math
  8. Which Gemma 4 size to pick

Gemma 4 is Google's open-weight model family in five sizes, from the phone-sized E2B to the 31B, and every size is released under Apache 2.0. At 4-bit, Google's own table puts the weights at 2.9 GB for E2B and 17.5 GB for 31B (Google's estimates, which exclude the context window).

Facts and prices here are as of November 30, 2026.

Gemma 4 sizes, from pocket familiar to desk heavyweight

Google announced Gemma 4 on April 2, 2026, calling it "the first in the Gemmaverse to be released under the OSI-approved Apache 2.0 license". The 12B arrived later. The 31B model card lists the lineup:

Size Parameters Context window
E2B 2.3B effective (5.1B with embeddings) 128K tokens
E4B 4.5B effective (8B with embeddings) 128K tokens
12B 11.95B 256K tokens
26B A4B mixture of experts, 25.2B total, 3.8B active 256K tokens
31B 30.7B, dense 256K tokens

The "E" means effective parameters, via per-layer embeddings.

System requirements for each Gemma 4 size

Memory figures come from Google's Gemma 4 page. Google says they include about 20% overhead for loading additional things but don't include the context window (KV cache) or supporting software, so real use runs higher. Download sizes are Google's official QAT Q4_0 GGUF files (see the 31B repo), and a download size isn't VRAM.

Model VRAM or unified memory (Q4_0 / 8-bit, Google's estimate, no context) System RAM Download size (Q4_0 GGUF) OS License and commercial use
Gemma 4 E2B 2.9 GB / 5.7 GB at least 4 GB (LM Studio) 3.35 GB not stated Apache 2.0; commercial use allowed
Gemma 4 E4B 4.5 GB / 8.9 GB not stated 5.15 GB not stated Apache 2.0; commercial use allowed
Gemma 4 12B 6.7 GB / 13.4 GB not stated 6.98 GB not stated Apache 2.0; commercial use allowed
Gemma 4 26B A4B 14.4 GB / 28.8 GB not stated 14.44 GB not stated Apache 2.0; commercial use allowed
Gemma 4 31B 17.5 GB / 34.9 GB up to 19 GB (LM Studio) 17.65 GB not stated Apache 2.0; commercial use allowed

Each GGUF repo adds a projector file (0.18 GB to 1.2 GB) for image input. Google's page says the models permit "responsible commercial use". The RAM figures come from LM Studio's Gemma 4 page, which says "To run the smallest Gemma 4, you need at least 4 GB of RAM" and that the largest "may require up to 19 GB". For the full memory explainer, including quantization, see how much VRAM a local LLM needs.

Text, images, audio and the thinking switch

Every size reads text and images. Audio input works natively on E2B, E4B and 12B only, capped at 30 seconds per input. Video goes in as "sequences of frames". One catch: Ollama lists text and image input only for its gemma4 tags, so don't count on audio there.

Thinking mode is a toggle. The E4B card says "Thinking is enabled by including the <|think|> token at the start of the system prompt", and removing the token turns it off. In Ollama, every size except E2B and E4B still prints an empty thought block when thinking is off.

What changed from Gemma 3

Per Google's 31B card, Gemma 4 adds:

  • native support for the system role
  • 128K context on the small models and 256K on the medium ones
  • audio on E2B, E4B and 12B
  • a switch from the custom Gemma terms to Apache 2.0

The license change is the real prize. Gemma 3 repos such as gemma-3-27b-it use custom terms and manual gating, while the Gemma 4 repos aren't gated. Google's own table compares Gemma 4 31B with Gemma 3 27B, thinking off: MMLU Pro 85.2% vs 67.6%, LiveCodeBench v6 80.0% vs 29.1%, and AIME 2026 89.2% vs 20.8%. Those are Google's numbers, not an independent ranking.

How to run Gemma 4 on a PC, Mac or phone

The card says to "use this model in llama.cpp, Ollama, LM Studio, or any compatible app". The ritual is short.

  • Ollama: the gemma4 library page lists download sizes of e2b 4.6-7.5GB, e4b 6.6-9.5GB (also the latest tag), 12b 7.7-8.0GB, 26b 16-19GB and 31b 19-20GB, plus -mlx tags for Macs. Ollama's quickstart recommends "8 GB of available VRAM, or unified memory on a Mac".
  • LM Studio: downloads run from 4.20 GB (e2b) to 19.00 GB (31b).
  • Python: Transformers needs the latest version, and vLLM serves it with vllm serve google/gemma-4-31B-it.

To choose an app, read Ollama vs LM Studio, and on a Mac see running an LLM on a Mac.

For phones, Google says E2B and E4B are built for "ultra-mobile, edge, and browser deployment (e.g., Pixel, Chrome)". Its mobile-optimized versions use 1.1 GB (E2B) and 2.5 GB (E4B) of memory in LiteRT-LM. No specific phone model requirement is stated.

Why run it locally, and the honest downsides

The upside:

  • Privacy: prompts, images and files stay on your machine.
  • Offline use: once downloaded, it runs with no connection.
  • No caps: there's no per-message meter on your own hardware.
  • Control: you pick the size, the quantization and the thinking setting.
  • License: Apache 2.0, with commercial use allowed.

The downsides are real. Setup takes some fiddling, especially the Python route. Speed and model size depend on your hardware, and the memory table leaves out the context window, so long chats need more. There's no vendor support desk either. When something breaks, you're reading forum threads. For the general case, see local AI vs cloud AI.

Local vs cloud cost: the worked math

Start with the awkward part: Google's hosted Gemma 4 costs nothing. The AI Studio pricing page lists Gemma 4 input as "Free of charge" on the free tier, with the paid tier "Not available". Ollama Cloud also lists gemma4:cloud tags (see Ollama Cloud for plans). So the real comparison is against a general chat plan such as ChatGPT Plus at $20 a month.

Assumptions

  • 2 hours of use a day, 30 days a month (60 hours).
  • The card's full rated power for the whole time, GPU only (the rest of the PC isn't counted).
  • Electricity at 18.17 cents per kWh, the EIA US residential average for September 2026.
  • GPU prices are NVIDIA's launch prices (MSRP), one-time. Street prices vary.

Tier 1: hardware you already own. If E4B or 12B fits your machine, you pay only for power.

Tier 2: RTX 5070 Ti (16 GB, 300 W, $749 one-time MSRP). That fits 12B at 8-bit (13.4 GB). Electricity: 300 ÷ 1000 × 60 hours × $0.1817 = about $3.27 a month. Savings vs Plus: $20 − $3.27 = about $16.73 a month. Payback: $749 ÷ $16.73 = about 45 months.

Tier 3: RTX 5090 (32 GB, 575 W, $1,999 one-time MSRP). That fits 31B at Q4_0 (17.5 GB) with room for context. Electricity: 575 ÷ 1000 × 60 hours × $0.1817 = about $6.27 a month. Savings vs Plus: $20 − $6.27 = about $13.73 a month. Payback: $1,999 ÷ $13.73 = about 146 months, or roughly 12 years.

Renting instead: RunPod lists the RTX 5090 at $1.39 an hour on Secure Cloud. At 60 hours that's about $83.40 a month, more than four Plus subscriptions.

Our verdict: a GPU bought just for Gemma 4 rarely pays off against a $20-a-month plan for light use. It makes sense if you own the hardware already, need privacy or offline use, or would buy the card anyway. More in is local AI cheaper.

Which Gemma 4 size to pick

These are our picks, based on Google's memory table.

  • Phone, or a laptop with 8 GB: E2B or E4B at 4-bit. Google built these two for phones and browsers.
  • 12 to 16 GB graphics card: 12B. It's the largest size that keeps audio input, and 8-bit (13.4 GB) fits a 16 GB card.
  • 24 GB or more, or a big-memory Mac: 31B at Q4_0, or 26B A4B if you want fewer active parameters.
  • Just curious: try Gemma 4 free in AI Studio before you download anything.

For how Gemma 4 stacks up against other families, see the best local LLM, Qwen3 and gpt-oss.

Receipts

Official pages behind this story, read Nov 30, 2026
  1. huggingface.co
    What Gemma 4 sizes exist and what are the parameter counts? · What context length does each Gemma 4 size have?
  2. opensource.googleblog.com
    When was Gemma 4 released? · What is the Gemma 4 license, and is commercial use allowed?
  3. gemma.ai
    What memory does Google state for each Gemma 4 size? · What does Google say about phones and on-device use?
  4. huggingface.co
    What are the HF file sizes for Gemma 4 (instruction-tuned BF16)?
  5. huggingface.co
    What are Google's official QAT Q4_0 GGUF file sizes?
  6. ollama.com
    What does Ollama list for gemma4? · Is Gemma 4 on Ollama Cloud?
6 more receipts
  1. lmstudio.ai
    What does LM Studio list for Gemma 4?
  2. huggingface.co
    How does thinking mode work in Gemma 4?
  3. huggingface.co
    What were Gemma 3's sizes and license (for the 'gemma 3' keyword)?
  4. aistudio.google.com
    Does Google's Gemini API / AI Studio list Gemma 4 with a price?
  5. huggingface.co
    How popular are Gemma 4 repos on HF?
  6. docs.ollama.com
    OS and system RAM requirements for Gemma 4 in Ollama/LM Studio?

Only pages the company publishes itself are listed. How we check: our method. Spotted a wrong number? Corrections.

Filed under

Local AI: The Hearth“gemma 4 12b”

Front page