Models and Pricing 9 min read

Gemma 4 E4B and E2B: Specs, Requirements and How to Run Them

What "E" means, the official specs side by side, the exact Ollama tags and sizes, LM Studio, llama.cpp and Android routes, plus thinking, tool calling and coding. Checked 1 December 2026.

Gemma 4 E4B and E2B explained: what "E" means, parameters, context window, memory needed, tool calling and how to run them in Ollama or LM Studio.

Shabnam Katoch

Growth Head

Gemma 4 E4B and E2B: 4.5B and 2.3B effective parameters, 128K context, text, image and audio input, ollama pull gemma4:e4b-it-qat

Gemma 4 E4B is sold as a 4B model. Then you run ollama pull and the smallest 4-bit build is 6.1 GB.

That's not what a "4B" download usually costs. And that gap is the whole story of the "E".

Once you understand it, choosing between E4B and E2B, picking a quantisation and knowing what your laptop or phone can handle all get much easier.

The short version: Gemma 4 E4B has 4.5B effective parameters (8B including embeddings) and E2B has 2.3B effective (5.1B with embeddings). Both take text, images and audio, output text, and support a 128K context window. On Ollama, gemma4:e4b-it-qat is 6.1 GB and gemma4:e2b-it-qat is 4.3 GB. Both support native function calling and a configurable thinking mode.

What "E" means: effective vs total parameters

Google's model card says it directly: the "E" stands for "effective" parameters.

The trick is Per-Layer Embeddings (PLE). Each decoder layer gets its own small embedding for every token. Those tables are big, but Google notes they're only used for quick lookups, which is why the effective count is much smaller than the total.

So there are two numbers, and both are true:

  • Effective parameters describe the compute per token. That's what makes E4B fast for its quality.
  • Total parameters describe what has to be stored. That's what decides your download size.

E4B runs like a 4.5B model but downloads like something nearer 8B. On phones, Google's LiteRT-LM runtime narrows that gap by memory-mapping the per-layer embeddings.

Effective vs total parameters: Gemma 4 E2B computes like 2.3B but stores 5.1B; Gemma 4 E4B computes like 4.5B but stores 8B, because Per-Layer Embeddings are stored but only used for quick lookups

E4B vs E2B at a glance

All figures from Google's Gemma 4 model card and docs, checked 1 December 2026:

Gemma 4 E2BGemma 4 E4B
Effective parameters2.3B4.5B
Total, including embeddings5.1B8B
Layers3542
Context window128K128K
InputText, image, audioText, image, audio
OutputTextText
LicenceApache 2.0Apache 2.0
Knowledge cutoffJanuary 2025January 2025

Audio clips can be up to 30 seconds, and video is handled as frames, up to 60 seconds at one frame per second.

Google's Android team summed up the choice: E4B is built for harder reasoning tasks, while E2B is about 3x faster. Gemma 4 launched on 2 April 2026; the larger 12B, 26B A4B and 31B sizes get a 256K context.

Comparing these with Qwen's small models? Our Gemma vs Qwen hub lines them up size by size.

How much RAM Gemma 4 E4B needs, by quantisation

We only publish memory figures we've measured. Until our measurements are in, here are the exact Ollama download sizes, which set the floor for what you need.

Ollama download sizes (ollama.com/library/gemma4/tags, 1 December 2026):

QuantisationE2B tag and sizeE4B tag and size
QAT 4-bitgemma4:e2b-it-qat 4.3 GBgemma4:e4b-it-qat 6.1 GB
Q4_K_Mgemma4:e2b-it-q4_K_M 4.6 GBgemma4:e4b-it-q4_K_M 6.6 GB
Q8_0gemma4:e2b-it-q8_0 6.0 GBgemma4:e4b-it-q8_0 9.0 GB
BF16gemma4:e2b-it-bf16 10 GBgemma4:e4b-it-bf16 16 GB
MLX (Apple silicon)gemma4:e2b-mlx 7.5 GBgemma4:e4b-mlx 9.5 GB

A download size isn't memory in use. The context window adds memory on top, and so does everything else running on your machine, so leave headroom.

Download size by quantisation on Ollama: QAT 4-bit 4.3 GB for E2B and 6.1 GB for E4B, Q4_K_M 4.6 and 6.6 GB, Q8_0 6 and 9 GB; download size sets the floor and context adds memory on top

What's QAT, and should you pick it?

QAT stands for quantisation-aware training. Instead of compressing the model after training, QAT simulates the compression during training, which Google says minimises quality loss. Google released Gemma 4 QAT checkpoints on 5 June 2026.

On Ollama, the -it-qat tags are also the smallest downloads, so they're a sensible first try. If you have a dedicated GPU and want something bigger, our 16 GB VRAM guide covers what fits.

Run it locally: Ollama, LM Studio and llama.cpp

Three ways to run Gemma 4 E4B: Ollama with ollama pull and run gemma4:e4b-it-qat (6.1 GB download), LM Studio by searching Gemma 4 E4B and picking a GGUF build, or llama.cpp with llama-server -hf and a recent GGUF

Ollama

ollama pull gemma4:e4b-it-qat
ollama run gemma4:e4b-it-qat

Swap in e2b for the smaller model, or q8_0 if you have memory to spare.

One thing to check: Ollama's tag table lists text and image input for these tags, even though the library page carries an audio badge. If you need audio, test it on your Ollama version first.

Want your agents to use the model you just pulled? BetterClaw Desktop shares local Ollama, LM Studio or llama.cpp models with your BetterClaw agents on a Mac with Apple silicon.

LM Studio and llama.cpp

In LM Studio, search for Gemma 4 E4B and pick a GGUF build. Google publishes its own QAT GGUF checkpoints, and community builds from Unsloth and others are available too. Google's recommended sampling is temperature 1.0, top_p 0.95 and top_k 64.

Recent llama.cpp builds can pull a GGUF straight from Hugging Face. Use an instruction-tuned (-it) build:

llama-server -hf unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL --jinja

Check when you downloaded it. Gemma 4 GGUFs have been re-uploaded several times since launch to fix the chat template and tool calling, starting with an Unsloth update on 11 April. If yours is older, re-download it, or pass a corrected template to llama.cpp with --chat-template-file.

Android and on-device

Try them with no code in Google AI Edge Gallery, target them through the AICore Developer Preview on supported Android devices, or ship them in your own app with LiteRT-LM.

Google publishes measured LiteRT-LM numbers. These are Google's tests, not ours:

Device and backendE2B decodeE2B peak CPU memoryE4B decodeE4B peak CPU memory
Android (S26 Ultra), GPU52 tok/s676 MB22 tok/s710 MB
iPhone 17 Pro, GPU56 tok/s1,450 MB25 tok/s3,380 MB
Raspberry Pi 5 16GB, CPU8 tok/s1,546 MB3 tok/s3,069 MB

Gemma 4 E4B tool calling, thinking mode and context window

Tool calling

Google lists native function calling as a core Gemma 4 feature. Our Ollama tool-calling list lists gemma4 with tools, vision, thinking and audio on Ollama 0.20.0 or newer.

Small models are less reliable at multi-step tool use than big ones. Test the exact tools your agent needs before you rely on E4B in an autonomous loop.

Thinking mode

Gemma 4's thinking mode is switched on by a token. Google's rule: put <|think|> at the start of the system prompt to enable thinking, and remove it to disable it.

In Ollama's API, set "think": false on a request to turn thinking off, or true to turn it on. For quick lookups, leave it off: thinking adds output tokens, so every answer takes longer.

Context window

Both models support 128K tokens. Ollama's tags page lists 128K as the maximum for every E2B and E4B tag, but how much you actually use depends on the context length you set in your runner.

A long prompt costs memory on top of the download size, so test at the context length you actually plan to use.

Is Gemma 4 E4B good for coding?

It's useful for small, contained coding jobs, but it isn't the strongest Gemma 4 for code. That's the 12B, which our Gemma 4 12B vs Qwen 3.5 9B comparison covers in detail. Google's own benchmark numbers (model card) show the gap:

Benchmark (vendor-reported)E2BE4BGemma 4 12B
LiveCodeBench v644.0%52.0%72.0%
Codeforces ELO6339401,659

Those are Google's figures, not our tests. Still, the 12B is a big jump on both, and the download stays modest: gemma4:12b-it-qat is 7.2 GB on Ollama, with a 256K context.

Where E4B fits

E4B makes sense for docstrings, explaining an error, a small refactor or a unit test, especially on a laptop with no GPU. Keep each task small, and check the output before you use it.

It's a weaker fit for tab completion. Editor tools such as Continue recommend models trained on a special fill-in-the-middle format for autocomplete, and advise against thinking models because thinking slows suggestions down. If you do try E4B there, switch thinking off.

The quickest way to judge it is on your own code. Pick three real tasks from your repository, run them on E4B and on the next size up, and compare the diffs. If you're still choosing, our guide to the best local LLM for coding matches models to coding tasks and shows how to test them.

Small model, honest trade-off

E4B and E2B aren't trying to beat the big models. They're trying to run where big models can't: a phone, a Raspberry Pi, a laptop with no GPU.

On that measure, they're impressive. A 2.3B-effective model that hears audio, reads images and calls tools is a genuinely useful building block.

Just size your expectations to the "E": fast like a small model, stored like a medium one, and best at small, well-defined jobs.

If you'd rather run agents without managing local models at all, start free with BetterClaw. The free plan includes 100 credits a month, and you bring your own model key, so you still pay your provider for inference (see full pricing).

Frequently Asked Questions

What is Gemma 4 E4B?

Gemma 4 E4B is Google's small, on-device Gemma 4 model, with 4.5B effective parameters and 8B in total. It takes text, images and audio, outputs text, has a 128K context window, and is released under Apache 2.0. The "E" stands for "effective" parameters.

How does Gemma 4 E4B compare to E2B?

E4B has 4.5B effective parameters and 42 layers; E2B has 2.3B effective and 35 layers. Both share the 128K context and the same inputs. Google says E2B is about 3x faster, while E4B handles harder reasoning and scores higher on coding benchmarks (52.0% vs 44.0% on LiveCodeBench v6).

How do I run Gemma 4 E4B in Ollama?

Run ollama run gemma4:e4b-it-qat, a 6.1 GB download. Other tags include gemma4:e4b-it-q4_K_M (6.6 GB), q8_0 (9.0 GB), bf16 (16 GB) and gemma4:e4b-mlx (9.5 GB) for Apple silicon.

Is Gemma 4 E4B free, and what hardware does it need?

The weights are free under Apache 2.0. The smallest Ollama build is a 6.1 GB download, and you need at least that much free memory plus room for the context window. Google has measured E4B running on a Raspberry Pi 5 and on phones through LiteRT-LM, so a GPU isn't required.

Is Gemma 4 E4B reliable enough for tool calling in an agent?

Google lists native function calling as a core feature, and Ollama tags gemma4 with tool support. Small models are less dependable over long, multi-step tool loops, so test the exact tools your agent uses before you let E4B run unattended.

Want to skip the setup?

BetterClaw does this in 60 seconds. No Docker, no config files.

Start free
Tags:gemma 4 e4bgemma 4 e2bgemma 4 e4b ggufgemma 4 e4b ollamagemma 4 e4b context windowgemma 4 e4b ram requirementsgemma 4 e4b vs e2bgemma 4 e4b tool calling
Shabnam Katoch

Written by

Growth Head

Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.

Share this article
Was this helpful?