Learning Library

← Back to Library

Function Gemma: Fast On-Device Function Calling

Key Points

  • Function Gemma is a 270‑million‑parameter fine‑tuned version of Gemma 3 that adds reliable function‑calling capabilities while keeping its natural‑language abilities.
  • Its small size enables fast, private, and cost‑effective inference on embedded and mobile hardware, especially when paired with accelerators like GPUs or NPUs.
  • Developers can further fine‑tune Function Gemma on a specific set of APIs or tools, achieving accuracy on par with much larger models for those tasks.
  • Demonstrations—including a “Mobile Actions” app that triggers on‑device functions (e.g., creating calendar events, adding contacts, turning on the flashlight) and a voice‑controlled game—showcase the model’s ability to translate user input into executable actions.
  • A step‑by‑step fine‑tuning recipe and the demo apps are publicly available via the Google AI Edge Gallery on the Play Store.

Full Transcript

# Function Gemma: Fast On-Device Function Calling **Source:** [https://www.youtube.com/watch?v=-Tgc_9uYJLI](https://www.youtube.com/watch?v=-Tgc_9uYJLI) **Duration:** 00:04:58 ## Summary - Function Gemma is a 270‑million‑parameter fine‑tuned version of Gemma 3 that adds reliable function‑calling capabilities while keeping its natural‑language abilities. - Its small size enables fast, private, and cost‑effective inference on embedded and mobile hardware, especially when paired with accelerators like GPUs or NPUs. - Developers can further fine‑tune Function Gemma on a specific set of APIs or tools, achieving accuracy on par with much larger models for those tasks. - Demonstrations—including a “Mobile Actions” app that triggers on‑device functions (e.g., creating calendar events, adding contacts, turning on the flashlight) and a voice‑controlled game—showcase the model’s ability to translate user input into executable actions. - A step‑by‑step fine‑tuning recipe and the demo apps are publicly available via the Google AI Edge Gallery on the Play Store. ## Sections - [00:00:00](https://www.youtube.com/watch?v=-Tgc_9uYJLI&t=0s) **Function Gemma: On‑Device Function Calling** - The speaker announces Function Gemma, a 270‑million‑parameter, fine‑tuned version of Gemma 3 that enables fast, private, on‑device translation of natural language into function calls and API actions, and can be further fine‑tuned for specialized function sets. - [00:03:26](https://www.youtube.com/watch?v=-Tgc_9uYJLI&t=206s) **Function Gemma: On‑Device Function Calling Model** - The transcript promotes Function Gemma, a lightweight, fine‑tunable model that generates function calls from natural language, runs locally for privacy and cost benefits, and integrates with major AI frameworks and tools. ## Full Transcript
0:01[music] 0:11When we launched Jimma 3270M, our 0:14smallest model to date, the community 0:16asked for tool calling capabilities. And 0:18today I'm incredibly excited to 0:20introduce Function Gemma, a specialized 0:22version of our Gemma 3 270 million 0:25parameter model that's fine-tuned for 0:26function calling while retaining its 0:28natural language capabilities. Function 0:31Gemma is designed for developers who 0:32want to build fast, private, and 0:35cost-effective apps that can translate 0:37natural language into function calls and 0:39API actions. Despite its lightweight 0:42footprint, Function Gemma is trained to 0:44determine the right function and is 0:46fine-tunable to be more robust on 0:48specific tasks. For example, if you have 0:51an app with a known set of functions, 0:53you can fine-tune function Gemma to be 0:55an expert on those functions. This 0:57creates a specialized model that can 0:59exhibit the same success rate as models 1:01many times its size. Due to the small 1:04size of the base model, only 270 million 1:07parameters, the speed in which it can 1:09process input and take actions is 1:10significant even on embedded and mobile 1:13hardware. With access to accelerators 1:15such as GPUs and NPUs, this can be even 1:18quicker. For mobile developers, Function 1:21Gemma represents an opportunity beyond 1:23chatbased interactions to translate 1:25natural language into executable actions 1:27which you can run entirely on device. To 1:30showcase Function Gemma, we've built a 1:32number of demos for mobile using Google 1:34AI Edge. I'd like to hand it over to 1:36Ravine to show you Function Gemma in 1:38action. 1:40This is Mobile Actions, a demo app where 1:42users can trigger actions on their 1:44device from a voice or text input. To 1:48power it, we fine-tune a model based on 1:50function Gemma on a small set of 1:52functions that are passed to the model 1:54as tools it can use. 1:56Whether it's create a counter event for 1:58lunch tomorrow, adds onto my contacts or 2:01simply turn on the flashlight, the model 2:04parses natural language and identifies 2:06the correct ondevice tool to execute the 2:09command. You can see the sequences here. 2:12Watch how the model interprets the 2:13commands and then requests the 2:16appropriate function for the app to 2:18call. 2:20While developing function Gemma, we 2:23noted by using the new function calling 2:25format, we saw improvements in the 2:27accuracy over just prompting the base 2:29Gemma 3 27 model alone. After further 2:32fine-tuning, we saw even more accuracy 2:34improvements even above the base 2:36function Gemma 27 model on tasks used in 2:40the mobile actions demo. 2:42We've published a step-by-step recipe 2:44for fine-tuning your own demo. So, go 2:46ahead and try it yourself. 2:48This demo is available for you to try in 2:51the Google AI Edge Gallery app that you 2:53can find on the Google Play Store. Our 2:56next demo shows how a fine-tuned 2:58function gemma model can drive game 3:00mechanics of a mobile game from user 3:02commands. In this interactive miniame, 3:05players use voice commands to manage a 3:07virtual plot of land. You can say plant 3:11sunflowers in the top row and water 3:12them. And then the model selects the 3:15specific app functions like plant crop 3:17or water crop with the specific grid 3:19coordinates and then executes the game 3:21logic to do those in action. 3:25Having a model that can generate 3:26function calls and arguments from free 3:28form input enables a wide range of use 3:30cases such as looking up data from a 3:33user query, routing queries to the 3:35appropriate sub aent or providing new 3:38modalities for interacting with games 3:40and apps. 3:42Function Jama is small enough to operate 3:44responsibly on consumer hardware, 3:46unlocking new use cases, as well as the 3:48usual benefits of running AI on device 3:51such as privacy, offline capabilities, 3:54and reduce cloud costs. 3:56These are just few examples, but with 3:59Function Gemma, it's built for 4:00fine-tuning, so you can create your own 4:02specialized function calling model to 4:04power your own AI workflows. The model 4:08is available from all the usual places 4:10such as hugging face, Kaggle, and 4:13Vert.ex AI. As with all our Gemma 4:15models, it works across popular tools 4:17and frameworks such as hugging face 4:20transformers, O Lama, VLM, Llama CPP, 4:24Light RT, MLX, and more. Where and how 4:28you tune it is up to you. Whether you 4:30prefer using TRL, Unsloth, Vertex AI, 4:34Function Gemma is compatible with all of 4:35these. 4:37For the function calling format and best 4:38practices, check out our guides and 4:40examples as part of the Gemma cookbook 4:43to get started. Start tuning the model 4:45today. We cannot wait to see what you'll 4:47be calling with Function Gemma. [music] 4:56[music]