Gemma 4 12B harness

“thought thought thought…” A free set of files for your coding agent, written against what people report Gemma 4 12B getting wrong. Users’ reports, not our measurements; not benchmarked.

Why it is built this way

Bright in a short chat, lost under a long system prompt.

  • A short playbook

    A 7,800-token agent prompt with ten tools sent it into a loop in 3 of 5 trials.

  • Exact paths

    It changed the case of folder names; a build with quantised embeddings was to blame.

How to serve it

  • vLLM

    The family's parser flags on this model; lower --max-model-len to fit your memory vllm serve google/gemma-4-12B-it --served-model-name gemma-4-12B --…

Published builds of Gemma 4 12B

What it gets wrong, and what this does about it

  • Loops on long agent prompts

    With a long system prompt and ten tools it repeats “thought” until the limit, about 60% of the time.

  • Ignores the result it asked for

    It calls a tool and does not seem to know the result is the answer. Its siblings do.

  • Changes the case of paths

    Seen on quants with quantised embeddings; the full-precision file was clean.

  • Repeats in long tool runs

    Earlier thoughts are put back into the prompt and can collapse into repetition. A template fix worked for one user; another says lists are the real t…

  • Drifts when quantised

    Measured divergence from model and cache quantisation.

  • Stops after one call

    It makes at most one good tool call and then replies, even when its reasoning shows it wants another. Rooted in how the template handles several roun…

  • Reports work that never ran

    When the tool list does not reach it, it writes call-shaped text and later cites invented output. Google says this is the client sending no schemas.

  • Thinks less as context grows

    Past about 30,000 tokens it often skips thinking altogether.

  • <pad> under concurrency

    Concurrent tool requests on vLLM can return nothing but . The same requests in sequence always work.

Tune it

Connect a GitHub repository and Loreto writes your own history into this harness for $5, once.