Gemma 4 template warning: 26B MoE performance drop and broken reasoning tags (1.117) #2328
Replies: 2 comments 2 replies
|
Update on the issue: I've done some deeper testing regarding why the vision capabilities and MoE performance degrade so hard under this workaround. Here is what's happening under the hood: Since reverting llama.cpp core changes is not an option, could we get an option in KoboldCPP to manually override/force the chat template via the UI or CLI flags? |
|
Thanks for the fast reply! I tried your suggestion and forced the updated official Gemma 4 Jinja template via the GUI. Vision is still blind: Even with the official template forced, the visual mapping (mmproj) is completely broken for these older July GGUF repacks. The model receives empty/garbage visual tokens and completely hallucinates the image contents (spinning into wild poetic/philosophical descriptions instead of performing actual OCR on the text). Severe Performance Hit: Forcing the new official template explicitly triggers the hardware reasoning channels (<|think|>), which drops generation speed on mid-range setups (like my GTX 1660s with CPU offloading) even further - down to a painful 4 t/s (from 8-10 t/s on the fallback template) (for 12b). It looks like early community repacks of Gemma 4 compiled before the final Google spec alignment are fundamentally incompatible with the new vision/reasoning architecture changes in the backend. Forcing the template fixes the formatting but breaks the weights execution. Thanks again for your help and for maintaining KoboldCPP! |

Uh oh!
There was an error while loading. Please reload this page.
Hi everyone, I'm getting a recurring warning in the console when running Gemma 4 models (using the built-in Gemma 4 Instruct presets) on the recent KoboldCPP versions: "common_chat_try_specialized_template: detected an outdated gemma4 chat template, applying compatibility workarounds. Consider updating to the official template." While the dense 31B model handles this workaround fine (chugging along stably at a heavy but consistent pace), my experience with the 26B MoE version degraded significantly:
Massive Performance Drop: The generation speed on my hardware (GTX 1660 Super with partial CPU offloading) dropped nearly by half — from a smooth ~17 t/s on older versions down to 8-10 t/s now. It feels like the compatibility workaround breaks the optimized dynamic MoE expert offloading, forcing the backend to push execution entirely to the CPU.
Broken Thinking Blocks: The model frequently fails to hide its reasoning process. The tags and internal English drafts either leak directly into the visible response or the reasoning phase gets completely skipped/disabled by the backend to save context.
It looks like the llama.cpp core under the hood expects the new official Gemma 4 token/channel formatting, but Kobold's built-in UI presets are lagging behind, triggering this fallback mode that hits MoE routing hard.
Could we get the built-in Gemma 4 template configurations updated to match the latest official layout natively?
Thanks for all your hard work on the project!
All reactions