Jinja templates that fix issues with some models
For llama.cpp
Updated: Aug 14, 2026
gemma-4-26B-A4B-it-update-thinkfix3.jinja
For: Gemma 4 26B A4B (incl. QAT, Heretic etc.)
Fixes:
- full context reprocess when thinking is toggled on/off mid-conversation
Notes:
- might potentially change outputs when reasoning is disabled (I haven't noticed so it's rather theoretical)
Qwen3.6-35B+27B+Bonsai-dirtyfix.jinja
For:
- Qwen 3.6 35B A3B
- Qwen 3.6 27B
- Bonsai 27B (binary/ternary)
- possibly other Qwen 3.6 variants or finetunes
Fixes:
- full response reprocess in case the model emitted a non-standard new line at the end of the thinking block
Notes:
- extra white spaces are no longer trimmed; if the model goes crazy and starts multiplying them, there's no stopping it
- if you don't use preserve-thinking, you've not encountered the issue so you don't need this
- can be used with KAT-Coder-V2.5-Dev too, but this model seems to be more disciplined with new lines, so it doesn't need it
LFM2.5-1.2B-thinkfix.jinja
For: LFM2.5 1.2B Thinking
Fixes:
- thinking block correctly rendered/parsed in llama.cpp
Notes:
- thinking toggle doesn't work (never did); use the instruct variant if you don't want it to think, I suppose
nanbeige4.1-thinkfix_dirty.jinja
For: Nainbeige 4.1 3B
Notes:
- not a fix, but disables thinking completely
- model doesn't respect thinking toggle, and its reasoning is garbage anyway, so no big loss
Ring-mini-2.0-lingcopy.jinja
For: Ring Mini 2.0 (16B A1.4B)
Fixes:
Notes:
- just an unchanged template from Ling Mini 2.0 - seems to work fine