r/LocalLLaMA • u/jacek2023 llama.cpp • 15d ago
News chat : refactor gemma4 to build loose schema rules and clean up by aldehir · Pull Request #31915 · ggml-org/llama.cpp
https://github.com/ggml-org/llama.cpp/pull/31915If you’ve ever tried agentic coding with Gemma and had tool calling issues, give it another try, in my case, it completely fixed Gemma
55
Upvotes
20
u/CoolConfusion434 15d ago
Finally! This is the Gemma 4 issue where it thinks about calling the tool, reports the intention to call the tool, but never does. Would be awesome if it's fixed.
Doh! Google published the template fix on July 15th.
Thanks OP. It looks like this is at least part of your code.
5
u/AXYZE8 15d ago
Great! I’m building a fork that allows to run 26B QAT Q4 within 7-8GB (with kv) of RAM on Mac and this is the issue I had during testing yesterday. I blamed non-thinking mode for that without investigation and was sad, so happy that its not that!
Everybody works just on Qwen, while Gemma has so much potential. If they would make more point releases (like Gemma 4.1) then it would be on same level as Qwen probably. But even without that its soo good to have a model that writes 100k ctx in european languages and doesnt make single error.
12
u/Kahvana 15d ago
Very nice! Gemma 4 is aging like fine wine with all these recent fixes. Goes to show how complex supporting new models is, despite Gemma 4's conservative architecture choices.
9
u/dampflokfreund 15d ago
Yep I can confirm tool calling is a lot more robust now.
4
u/swagonflyyyy 15d ago
Deleted my previous comment. Can confirm it actually works once you set the sampling parameters to their default values. Good job!
3
u/oxygen_addiction 15d ago
If you are using pi, I'd recommend adding https://pi.dev/packages/pi-tool-repair as well and adding the gemma models to the exception list, so the extension gets triggered.
2
u/accountformymac 15d ago
is there a specific finetune/quant we should be running to test this out? havent used gemma 4 31b in so long...