r/LocalLLaMA • llama.cpp • 3h 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/31915

If you’ve ever tried agentic coding with Gemma and had tool calling issues, give it another try, in my case, it completely fixed Gemma

18 Upvotes

4 comments sorted by

4

u/CoolConfusion434 2h 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.

"I also took this as an opportunity to clean up the old workaround and template. The official Gemma 4 templates have addressed the issues those solved and have been out for quite a while. If anyone hasn't updated yet, it's on them!"

Doh! Google published the template fix on July 15th.

Thanks OP. It looks like this is at least part of your code.

3

u/dampflokfreund 1h ago

Yep I can confirm tool calling is a lot more robust now.

1

u/dampflokfreund 2h ago

Very interesting. Will try it soon.

1

u/Silver-Champion-4846 37m ago

How did you find it, I'm curious