Testing a reasoning-effort fix on a local Qwen 27B for build-fix tasks
- Hardware
- Mac with 24 GB of memory
- Models & engines
- Ollama running Qwen3.8 27B (GGUF) with a 49,152-token context
- Key gotcha
- Editing the Modelfile TEMPLATE did not change what the server sent for this model; the lever had to be on the request side
What they built
The author runs a harness of 10 build-fix tasks from their own repositories against Qwen3.8 27B in Ollama on a Mac. The GGUF's embedded chat template inserts a reasoning-effort paragraph by default, and an earlier attempt to remove it by editing the Ollama Modelfile TEMPLATE changed nothing the server sent, so that run was voided.
A daytime probe sent the same short message several ways and read prompt_tokens: a top-level reasoning_effort of medium dropped it from 61 to 23, while chat_template_kwargs was ignored. The retry used that field and a pre-registered check that prompt overhead had to be about 14 on every task.
The overnight run on November 16 took 5 h 32 m and was valid, with overhead 14 on all 10 tasks. Only 4 of 10 patches applied, under the 5/10 threshold, so the hypothesis was rejected and the author moved further 27B experiments to a machine with more memory.
Setup
- Mac with 24 GB of memory
- Ollama running Qwen3.8 27B (GGUF) with a 49,152-token context
- 10 build-fix tasks from the author's repositories
- Temperature 0.6, top_p 0.95, max_tokens 12,288, seed 0
How it works
- A probe compares prompt_tokens for the same message with and without each effort field
- The run script repeats the probe after loading the model and refuses to start unless medium is effective
- Validity is checked first (prompt overhead per task), then patches are scored by whether git apply succeeds and tests run
Results & numbers
- Applicable patches: 4/10, below the pre-registered 5/10, so rejected
- Reported only: pass@1 4/10 against 2/10 for the baseline, and all 4 applied patches passed
- On one task completion tokens fell from 7,965 to 3,310; 3 of the 8 tasks that ran out of budget before now finished
- 5 of 10 tasks still hit the 12,288-token budget; all 4 tasks from one repository failed
Gotchas
- Editing the Modelfile TEMPLATE did not change what the server sent for this model; the lever had to be on the request side
- chat_template_kwargs with reasoning_effort was ignored
- More output budget would need a larger context whose KV cache might not fit in 24 GB
- During the run swap peaked at 20.6 GB and Ollama peaked at 12.5 GB resident
“Valid and better are separate questions”— hexisteme
Do it yourself
- Send one short message with and without the effort field and compare prompt_tokens
- Write down the validity check and the pass threshold before running
- Re-run the probe right after loading the model and abort if the change isn't effective
- Check validity on every task before reading the score
- Don't treat a single-seed improvement as an effect size
Similar setups
Cutting a local Qwen coding agent's wait on a 16GB Mac with a memory hook
A developer running a coding agent on qwen3.5:9b through Ollama replaced its always-loaded memory index with a hook that attaches only relevant memory lines, and cut median answer time from 90.4s to 56.4s.
OzAI: a self-hosted ChatGPT on a 16 GB MacBook with Ollama, LiteLLM and Open WebUI, and what broke
A DevOps engineer served Qwen3 8B and Qwen2.5-Coder 3B from one M1 Pro laptop as a small private platform with per-user keys, rate limits, local web search and IDE chat, and documented seven silent failures.
Getting OpenCode to work with a local Ollama model by fixing the 4,096-token context
OpenCode on a local Ollama model ignored files, invented tasks or looped, because each ~23k-token request was silently cut to fit Ollama's default 4,096-token context on a 16 GB GPU.
PatchPal TinyAgent: a coding agent on a 4B model and a 6GB laptop GPU
WiseProbe adapted its PatchPal coding agent to run Gemma 4 E4B or Qwen3.5 4B through Ollama on a 6GB RTX A1000, using handoff-note compaction and capped file reads to work inside a 16K or 32K window.