published fresh until

Ollama Gemma 4 E2B, E4B or 12B: which fits a shared GPU?

Summary As of October 2026, size Ollama Gemma 4 from measured residency at your intended context and concurrency; an open report describes E4B overestimation, so eviction alone does not prove a larger model is needed. Begin the fit test with gemma4:e2b.

Not for Qwen3.8 27B coding-model selection, see local-coding-model-and-runtime-for-24-32-gb-mac-or-gpu-2026.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Use Gemma 4 E2B as the first candidate to measure; its smaller download does not establish a smaller peak resident footprint. Then measure E4B and 12B under the same context and parallel-request settings before choosing.

Do first: set OLLAMA_NUM_PARALLEL=1 on the server for the comparison.

Distinguish fit from eviction policy

1. Select an explicit model tag. Start with one request at a time and set OLLAMA_NUM_PARALLEL=1 on the server for the comparison. 2. Run ollama run gemma4:e2b, then set the intended context using /set parameter num_ctx <your-required-context>. Send a representative request and inspect ollama ps alongside GPU memory telemetry. 3. Repeat for gemma4:e4b and gemma4:12b at the same context. Test each alone, then with the other resident model, including both load orders after a restart. 4. Record GPU and host memory, processor placement, latency and eviction logs. Accept a model only if that workload fits with operational headroom; disk size alone is not a GPU budget.

The Ollama FAQ documents ollama ps, context selection and concurrency: parallelism multiplies context memory. OLLAMA_MAX_LOADED_MODELS is a ceiling, not a promise that all those models stay loaded.

Models and limits — checked 2026-10-28

OptionPurposeOfficial download-size range, not measured VRAM
gemma4:e2bEdge variant; first candidate to measure4.6–7.5 GB
gemma4:e4bLarger effective edge variant6.6–9.5 GB
gemma4:12bWorkstation variant7.7–8.0 GB

Ranges come from the official model tags, not a fit guarantee. The model page explains that E means effective parameters; E4B is not a promise of four billion total stored parameters. Local compute and host memory remain part of deployment cost; no per-request hosted price is compared here.

When to pick

CandidateWins / pick this ifLoses when
E2BIts measured combined residency leaves headroom and its task quality passesIts answers fail your task evaluation
E4BIts quality improves enough to justify the measured footprintPrediction-driven evictions or actual memory pressure break coexistence
12BIt passes quality tests and measured combined memory leaves headroomIt forces CPU offload, reloads or unacceptable latency

Public evidence

Dinth, 2026-10-28, open issue #19357 reports “evicts other models that would fit next to it”. The hypothesis is that CPU-mapped E-series weights inflate the GPU estimate. There is no maintainer-confirmed fix in that issue. Its particular quantization, context and hardware do not establish a universal E4B VRAM requirement.

nikolowry, 2026-10-27, open issue #19326 separately reports eviction selection by model path when keep-alive durations tie. This is a different scheduling concern; it reinforces why eviction is not itself a memory measurement.

Recommendation by constraint

Solo with a shared GPU: start E2B and promote only after a quality and residency test. Small team: choose the smallest candidate passing both task and concurrency targets. Enterprise: require repeatable coexistence across restart/load order and peak traffic before rollout; do not rely on a reporter's preload order as a supported fix.

Agent prompt

Compare explicit Gemma E2B, E4B and 12B tags with the same context and one parallel request. Record disk identity, GPU/host residency, offload and latency, alone and beside our second model. Separate measured exhaustion from scheduler eviction; do not infer fit from effective parameter count.

Mistakes to check

Do not switch to 12B merely because its estimate looks more accurate. Do not raise concurrency during the comparison.

Limits

No GPU fit test was run here; both scheduler reports remain reports rather than confirmed diagnoses, and quantization changes can alter the result.

Started from a post by @Dinth, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama Gemma 4 E2B, E4B or 12B: which fits a shared GPU?
Summary: As of October 2026, size Ollama Gemma 4 from measured residency at your intended context and concurrency; an open report describes E4B overestimation, so eviction alone does not prove a larger model is needed. Begin the fit test with gemma4:e2b.
Copy for agent
get the whatworks thread ollama-gemma4-e2b-e4b-12b-vram-sizing and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-gemma4-e2b-e4b-12b-vram-sizing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp