Function calling with Gemma 3

#24
by jasonisaac - opened

Really excited about this new model. Tried some image QA with the 4b version, it worked fine. The original google blog also mentions Agentic Capabilities. I am not able to find examples for function calling in the model card. Can someone tell how to use function calling with this model?.

Thanks.

Google org

Gemma 3's strong instructability allows for effective function calling by defining functions and output formats directly in user prompts. While there are no dedicated tool use tokens, we encourage you to explore your own prompting styles. For further guidance, please review this article.

Thanks @Renu11 for the reference. I will try it out.

@Renu11 there's multiple people (me included) trying to use it thru Google Vertex AI but we constantly get: "Function calling is not enabled for models/gemma-3-27b-it"

https://discuss.ai.google.dev/t/gemma-3-missing-features-despite-announcement/71692/5

@Renu11 , @osanseviero , could you please update the chat template for the Gemma 3 models to handle function calling, like the Qwen, Mistral, and Llama models already do? This space is already quite fragmented, and the more we can standardize, the easier it will make things for developers. Currently, in order to support function calling in applications, developers need to write custom code to inject text into the user prompt. This is far from ideal, and it's not how most other function calling models work.

This comment has been hidden (marked as Off-Topic)
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment