Local Reasoning Model Token Cost — thinking ON/OFF Measured
I ran 13 questions on gemma4:12b with thinking ON and OFF. Reasoning got one more right while spending 68x the output tokens and 19x the wall-clock.
Tags
7 posts
I ran 13 questions on gemma4:12b with thinking ON and OFF. Reasoning got one more right while spending 68x the output tokens and 19x the wall-clock.
My local agent kept ignoring its system prompt on long inputs. Past num_ctx, Ollama silently trims the front of the prompt — no error. I measured where it breaks.
After idling, my agent's first reply dragged. I pulled Ollama's load_duration across model sizes: 1.5s for 2GB up to 9.7s for 9.6GB, and split it by keep_alive.
A 9,700-token prompt took 55s to its first token, then 65ms on the identical second call. I split Ollama's timings into prefill vs generation to see why.
I sent the same prompt to local Gemma 4 dozens of times. temperature=0 was deterministic, and even at higher temperature a fixed seed collapsed output to one line.
A hands-on guide to Ollama's JSON schema enforcement with Pydantic for type-safe local LLM responses. Measured: 6x faster with near-100% parse success.
Run an offline AI tool pipeline with Ollama, Gemma 4, and FastMCP, no internet needed. Built for medical, legal, and finance where data stays on the premises.