FreshContext , home
Drawing
02 · Benchmarks
Sheet
2 of 3
Rev
A · 2026-10-01

Model family ← Models

Gemma 4 E2B

The smallest Gemma 4 we ran. Fast, cheap at long context and a good tagger, but poor at admitting what it doesn't know, and it follows instructions planted in what it reads.

Parameters
4.63B
Files tested
3
Scored runs
20
Smallest Mac
8 GB for the file we kept

Made by Google

Overview Should you use it · what it taught us · why we tested it · what happened

How this page was made. The tests run automatically on our Mac Studio, and every score here comes straight from those runs. This overview was written by Claude, an AI model, from the lab's own records: the run log, notes kept at the time, and the working sessions where each decision was made. Quotes are Alan's words, with spelling fixed. How these pages are made.

Should you use it?

For fast, cheap jobs on a small Mac, yes: tagging, picking one tool from a list, or reading long documents. Use Google's 4-bit file; it was trained for that format, so there's nothing to gain by converting it.

Don't use it where it must leave a gap rather than guess, chain tools, weigh sources, or read text from sources you don't trust. For judging sources and saying "I don't know", Gemma 4 12B did much better here, and it also tagged better.

What it taught us

  • Picking one tool is easy; using several in a row is not. Its perfect score on our first tool test is part of why we built harder ones.
  • Part of a model's speed can be its file format. Every Q4_0 file on that day's speed table was a Gemma, so the format and the model couldn't be told apart until we tested the format on its own. Alan: "we have a lever, chase it, measure it, prove it". Q4_0 against Q4_K_M.
  • Not noticing an attack isn't resisting it.
  • Compare a fine-tune with its base on the same file and runtime. Two copies of this model on two runtimes gave different tagging scores, so only a matched test shows what the tuning did. The tagger fine-tune scored below its own base model.

Why we tested it

Alan asked for it on 23 August: "also want to try gemma4 smaller models at full context". He was keen: "I'm REALLY curious about the small model tests".

There was a second reason. Alan's own tagger, a model fine-tuned to add metadata to our stored conversations, is built on a community copy of this model. To know whether the fine-tune helped, we needed its base measured too.

What it took

Nothing unusual. Google publishes a 4-bit file made with quantisation-aware training (the model is trained to cope with being stored at 4 bits), and it ran on standard llama.cpp. For the tagger comparison we also downloaded a community 4-bit copy for MLX, Apple's own framework.

What happened

  • Fast, and cheap at long context. On the day we measured it, it was the fastest of 22 model files on the Mac Studio: about 110 tokens a second writing and 1,363 reading, on a short prompt. At its full 131,072-token context it used 4.06 GB, and it found all 9 facts hidden in documents up to 126,976 tokens long, though reading slowed to about 170 tokens a second at that length. It also handled many requests at once: 95 tokens a second for one, 281 in total for sixteen.
  • It picks tools but can't chain them. It scored 100% on picking the right tool and on choosing among up to 64. Alan had wondered: "even e2b has tool calling so it comes down to context size, reasoning and prompts?". But in a long chain of tool calls it went off course at step 103 of 200, and when it had to keep a running total across the calls it went wrong at the second step, the same in all four runs.
  • A good tagger that rarely says "I don't know". It scored 91.2% on our tagging test and 90.4% when it was allowed to leave fields empty, but 12.5% on saying "I don't know" when the answer wasn't there.
  • It can't judge its sources. It answered plain questions well, but on facts that had been corrected, rested on one source or conflicted, it got 0 of 8 each time.
  • It follows planted instructions. In AgentDojo, a public attack test, instructions hidden in tool results got through in all 9 banking tasks and all 5 Slack tasks. It passed six other attack tests only because it never noticed the attacks.
  • The fine-tune didn't beat it. On the same runtime, Alan's fine-tuned tagger scored below the community copy it was built from.
  • It never got a job. It was recommended twice, as our tagger and as a fourth model to keep loaded, but never launched. Gemma 4 12B took the tagging job, and was also better at picking out named things from text.
The files 3 tested · each has its own page
  • Google QAT Q4_0 GGUF kept

    Still on disk. Google's own 4-bit file, and the one almost all our testing ran on.

    Gemma-4-E2B_q4_0-it.gguf · On disk · 3.3 GB · 18 scored runs · smallest Mac 8 GB

  • mlx-community MLX 4-bit

    A community 4-bit copy for Apple's MLX, and the base of Alan's own tagger. Used to test that tagger, then deleted.

    Gemma-4-e2b-it-4bit · Deleted 11 Oct 2026 · 3.6 GB · 2 scored runs · smallest Mac 8 GB

  • vision projector GGUF

    The vision part that came with it. Never loaded, so its vision is untested here.

    Gemma-4-E2B-it-mmproj.gguf · On disk · 1.0 GB · never scored

Corrections 5 to the record published 21 October 2026
  • Parameters was 2B, now 4.63B. The GGUF header reads 4.63 billion parameters; about 2B is only the effective (E2B) figure.

    Corrected 26 October 2026 · a mechanical fix

  • On the toolcall run of 9 September 2026: build of llama.cpp was 0.2.0-dev (build 10618, commit eb25b7263), now none. This run was served by oMLX, not llama.cpp, so the llama.cpp build stamp was stale and there is no llama.cpp build to record.

    Corrected 26 October 2026 · a mechanical fix

  • On the toolcall run of 9 September 2026: Why it was voided corrected. The MLX 4-bit folder was downloaded from a community repository rather than converted locally; the void stands.

    What it said before

    Why it was voided: served by oMLX from a local MLX 4-bit convert documented upstream as broken: two known-bad variables

    Corrected 26 October 2026 · a mechanical fix

  • Verdict corrected. The 85.8 is the MLX 4-bit file on mlx_lm; the q4_0 GGUF this write-up describes scored 91.2, so the 11.6-point comparison applies to the MLX file only.

    What it said before

    Verdict: 85.8% on tagger. Notable mainly for beating its own fine-tuned descendant by 11.6 points.

    Corrected 26 October 2026 · a headline fix

  • Why it was tested corrected. The fine-tune's base is the community MLX 4-bit build; the QAT GGUF was downloaded separately to try smaller Gemma 4 models at full context.

    What it said before

    Why it was tested: The base model for the tagger fine-tune, and the smallest thing worth measuring.

    Corrected 26 October 2026 · a headline fix

The lab's record Every decision, with its date · the model's specification
Decisions, in order
  • 2026-08-23 10:16Z — bring it in. Alan: "also want to try gemma4 smaller models at full context". QAT GGUF + mmproj downloaded by get.sh; registered in eval/runner.py, ctx_ladder.py (native cap 131,072) and longctx.py (ladder to 126,976).
  • 2026-08-23 11:27Z — context ladder and needles first, E2B leading, after Alan's "one at a time".
  • 2026-08-23 20:59Z — MLX base pulled for a controlled tuned-vs-base A/B rather than comparing the tuned MLX tagger against the GGUF: "pull mlx-community/gemma-4-e2b-it-4bit rather than confound it with a different quant and runtime". Result 21:23Z after two harness fixes: base 49/59 compliant vs tuned 38/59 (a lab note §8).
  • 2026-08-23 22:34Z → 2026-08-24 01:42Z — first board on llama.cpp b10369 (grid, tools, walkgrid, control, enrich, overnight, staircase scripts; Served-as table in the variant doc). Pre-registered by the assistant before the control: "About the same → the suites are too easy. 15/15 everywhere measures nothing." That branch held.
  • 2026-08-24 16:56Z — matched prompt A/B (-ab labels) because the earlier tuned-vs-base tagger comparison "compared MLX 4-bit"... "affine against llama.cpp q4_0 QAT and was written up as controlled; it was not".
  • 2026-08-25 07:30Z — rebuild and re-measure. Alan: "do it"; llama.cpp b10369 → b10618, then the fleet re-run under -b10618 labels, E2B included.
  • 2026-08-25 07:28Z — not the extractor. Against a labelled entity reference, E2B F1 44.5 (current prompt) / 51.6 (nullable) vs gemma4-12b 54.0 / 67.2: "if you want one extractor, 12b is now clearly it, and the earlier 'e2b because it's three times faster' reasoning doesn't survive a 15-point F1 gap".
  • 2026-09-07 21:20Z — the fine-tune verdict, on the MLX base. Same runtime and profile: base 85.8 vs distill 74.2 on tagger; "Distill verdict: don't cut over" (The tagger fine-tune scored below its own base model).
  • 2026-09-09 11:04Z → 17:33Z — oMLX toolcall run struck. 0/60 on oMLX with the MLX file; called "not a finding about gemma", then voided with the other oMLX runs; E2B is "genuinely unmeasured on this suite now". No clean toolcall run was ever made.
  • 2026-09-11 13:17Z — no requant. Alan: "would e2b work what would you quant to?". Assistant: "it already is Q4_0, and QAT at that"... "There's no better format to move it to".
  • 2026-09-13/14 — offered as a seat, never seated. Recommended as a fourth seat "at 8k" and as the tagger in a four-seat plan; Alan asked "so this might end up being a 35b + gemma 4 (tagger) + 9b synthesis + 27b ternary fleet?". No launch, preset or plist for E2B exists on record (git history of fleet-roster, fleet-models.ini, launchd, checked 2026-10-23). The TAG seat went to gemma4-12b.
  • 2026-10-05 14:52Z — provenance test, closed. worldview 16/40, single_source 0/8: "the small Gemmas don't have it". Follow-ups proposed, not run: a provenance-e2b LoRA distilled from the 12B, and a worldview/3 with the tier supplied in the excerpt.
  • 2026-10-11 — MLX file deleted in the Tier A sweep ("nuke tiers a & b", quoted in RESTORE-deleted-20261011-tiersAB.sh; executed by another agent before 08:45Z). The GGUF and mmproj were kept.
What we learned, in the lab's words
  • Tool selection saturates; tool chaining does not. tools/1 15/15 and toolscale/1 40/40 (64 tools offered, no near-miss) under gemma4-e2b, tied with agents-a1-35b — which is why toolscale and chainwalk exist (suite docstring). chainwalk is 0/2 on all four runs; depth before deviation was follow 103/200, accumulate 2/200, identical across four repeats at temperature 0.
  • Tagging yes, abstention no. tagger/2 91.2 and tagger-nullable/1 90.4 against nullschema/1 12.5 and grounding/1 61.6 (runlog). Assistant, 2026-09-12: "A 3.3 GB model matches a 45 GB one at fuzzy judgement over turnpairs, while being 85 points worse at structured absence".
  • The prompt moved epistemics more than the model did. epistemics/3 → /4 (output-format wording only) took E2B 85.4 → 68.8 and inverted its ranking against E4B. Only the /4 run is in the run log.
  • No provenance skill. worldview/2 16/40, with answerable 8/8 and insufficient 8/8 but single_source, superseded and conflicting 0/8 each — identical to gemma4-e4b. The 12B's provenance behaviour is not a family trait.
  • Build bump changed nothing measurable: b10369 vs b10618 gave identical counts on grounding (77/125), nullschema (9/72) and screening (55/60) (runlog).
  • Format, not just weights, separated the two variants: on the same tagger/2 set, the QAT GGUF on llama.cpp scored 91.2 (219/240) and the community MLX 4-bit on mlx_lm 85.8 (206/240); tagger-nullable 90.4 vs 73.8. Two variables (file and runtime) differ, so this is not a runtime finding.
  • Fastest model on the box, and the seed of the Q4_0 lever. llama-bench b10369: pp512 1363.1 / tg128 109.9 t/s; 2026-09-11 tg64 101.55 t/s. That day's table — "Every Q4_0 model reaches 54–71% of peak. Every Q4_K_M model reaches 22–42%" — was flagged as confounded because "Every Q4_0 file here is a gemma", which led directly to the granite requant test and Alan's "we have a lever, chase it, measure it, prove it" (Q4_0 decodes up to 2x faster than Q4_K_M at the same bit-width, and emits valid JSON more reliably).
  • The "92% of ceiling" figure was file-size arithmetic. 2026-08-23 used 3.35 GB × 109.9 t/s = 368 GB/s; the tensor-table count on 2026-09-11 gave 2.76 GB/token and 70% of peak. The 92% figure also predicted E2B would not batch; it did, 95 → 281 t/s at 16 slots, 2.96×.
  • Long context is cheap and works: 4.06 GB resident at 131,072 (3.31 GB at 8,192); needle-in-haystack 9/9 up to 126,976 tokens; prefill falls from ~1000 t/s at 8k to ~170 t/s at 127k. The config-arithmetic KV prediction (3.5 KiB/token) was on target for E2B only.
  • Injection: it is not safe, it is unobservant. It passed all six Toolery adversarial scenarios, but its traces showed it "simply hadn't noticed the injection"; on AgentDojo it completed 9/9 banking and 5/5 slack injection tasks, overall security 2.6%.
  • A metric mix-up inflated its tagger standing for a week (reconstructed). On 2026-09-14 the assistant ranked taggers by the mean per-case partial-credit score field, not the run log's pass rate, giving E2B "98.5% / 98.4%" and recommending it over the 12B ("e2b gets within 0.5 points of the 12b"). Those figures went into fleet plans and are not comparable with the board's 91.2 / 90.4. Separately, on 2026-09-12 the 12B's 97.9 tagger_nullable was twice quoted as E2B's before being corrected, and on 2026-09-20 a table paired the GGUF's tagger 91.2 with the MLX file's tagger_nullable 73.8.
Why it was tested, in the lab's words
  • Alan, 2026-08-23 10:16Z, in the request that opened the day: "can you pull the 3.5 9b and put it through its paces at q8 and then q4? also want to try gemma4 smaller models at full context". Downloads started three minutes later.
  • 11:26Z: "I don't think we should do it all in one run, I'd rather do it one at a time, I'm REALLY curious about the small model tests".
  • The tagger lineage: Alan's production metadata tagger tagger-e2b-v1 is a LoRA distill whose student is mlx-community/gemma-4-e2b-it-4bit (a lab note). Alan, 20:33Z: "I already have a custom tuned tagger - might be in okf, tuned from 31b cloud gemma 4 and my own turn pairs for fresh context naming conventions, deliberately dropped from this test"; 21:07Z: "the 35b can't be tuned which is why I started looking at smaller models with larger context again"; 22:24Z: "tagger was traing on gemma 4 so the family is good.". The MLX 4-bit base was downloaded at 20:59Z so the tuned-vs-base A/B would have "tuning as the only variable".
  • 22:31Z, widening the board: "feel free to try both e2b and e4b too as well as 12b seeing as we're back in gemma territory (this alone fascinates me) it's the bits that folk don't see that are impressive about this model, available context, size etc are quite impressive and leave headroom to play."; 22:40Z: "even e2b has tool calling so it comes down to context size, reasoning and prompts?". The tools suite was then aimed at an independent qualitative report on Gemma 4 E2B tool calling that Alan linked ("interesting https://jcbl.ws/gemma-4-tool-calling", suite docstring).
  • Later roles it was weighed for (no run of its own): co-resident "quarantine"/web model (Alan, 2026-08-27 06:44Z: "It’s frustrating there’s not enough space to run e2b for web stuff co resident"); tagger candidate (Alan, 2026-09-09 16:30Z, queued: "gemma was a tagger candidate"); a small provenance seat replacing gemma4-12b (2026-10-05, after Alan's "gemma my most hungry model which annoys me").
Open questions
  • toolcall/1 has no clean run for any E2B variant (the only one is void). A GGUF run on llama.cpp would answer Alan's "even e2b has tool calling" question on the suite that discriminates.
  • Does supplying the provenance tier in the excerpt lift E2B's worldview single_source/superseded from 0/8?
  • The half-precision QAT control (gemma-4-E2B-it-qat-q4_0-unquantized) was never run, so whether QAT q4_0 costs E2B anything on this board is unknown.
  • Licence and upstream revision are not on record.
  • Whether the mmproj vision path works on current llama.cpp was never tested (a lab note records <channel|> leaks for the larger Gemma 4 models on b10369).
The model in detail
fieldvalue
vendorGoogle (Gemma 4 family)
upstream reposgoogle/gemma-4-E2B-it (created 2026-03-02); google/gemma-4-E2B-it-qat-q4_0-gguf (created 2026-05-01; two files: gemma-4-E2B_q4_0-it.gguf 3.35 GB, gemma-4-E2B-it-mmproj.gguf 0.99 GB); google/gemma-4-E2B-it-qat-q4_0-unquantized (2026-04-29, never downloaded)
community conversion heldmlx-community/gemma-4-e2b-it-4bit (MLX 4-bit affine, group 64)
revisionnot on record (both downloads fetched resolve/main with no pinned revision)
licencenot on record
releasedgoogle/gemma-4-E2B-it repo created 2026-03-02 (HF API listing); the QAT GGUF repo 2026-05-01
parametersGGUF header via llama-bench: 4.63 B parameters, 3.10 GiB; "E2B" = ~2B effective (MatFormer/elastic variant, per-layer embeddings)
text architecture (HF config.json, text_config)35 layers: 28 sliding-attention + 7 full-attention; sliding window 512; 8 attention heads, 1 KV head, head_dim 256 (global 512); hidden 1536; num_kv_shared_layers 20; attention_k_eq_v false; max_position_embeddings 131,072
HF architecture classGemma4ForConditionalGeneration (multimodal), model_type gemma4
native context131,072
runtimes used herellama.cpp at b10369 (6e62ba538), b10618 (eb25b7263) and b10893 (c32d1dabe, via .local/bin/llama-server); mlx_lm server (0.31.3 per run log); in-process mlx_lm.generate; oMLX 0.6.4 (voided)

Known stack quirks: llama.cpp logs special_eog_ids contains '<|tool_response>', removing '</s>' token from EOG list on load — the fix for llama.cpp #21471, not a fault. A lab note (written for the 26B/31B QAT files on b10369) says probability-based metrics on Gemma 4 QAT q4_0 are invalid on that build; the E2B was never perplexity-tested on GGUF, and the 2026-10-05 coherence probe on b10893 returned confident correct top-token probabilities (12/12, top_prob 0.54–0.99; worldview__gemma4-e2b__extraction.manifest.json).