Function Gemma - Function Calling to the Edge
Introducing FunctionGemma: Precise Function Calling for the Edge
We are excited to introduce FunctionGemma, a specialized version of the Gemma 3 270M model, explicitly fine-tuned for function calling. Designed with edge devices in mind, FunctionGemma bridges the gap between natural language user instructions and executable API actions, bringing powerful AI capabilities directly to your local devices.
Why FunctionGemma?
Running AI models on edge devices—like mobile phones, IoT boards (e.g., NVIDIA Jetson Nano), and wearables—presents unique challenges. Memory is limited, and latency must be minimal. Most importantly, users demand privacy and the ability to work offline. FunctionGemma addresses these needs by offering a lightweight yet highly effective model that specializes in one critical task: translating human intent into code.
Key Features
1. Built for the Edge
At just 270 million parameters, FunctionGemma is incredibly efficient. It supports quantization, allowing it to run with low memory and low latency on hardware-constrained environments. This makes it possible to build responsive agents that don't rely on a constant internet connection.
2. Specialized for Action
Unlike general-purpose chat models, FunctionGemma is laser-focused on function calling. It takes a user's natural language instruction (e.g., "Turn on the living room lights") and a list of available tools, and outputs a structured function call (e.g., turn_on_light(room="living_room")).
3. High Accuracy via Fine-Tuning
While the base model is capable, FunctionGemma really shines when fine-tuned for specific tasks. Google's internal benchmarks show that fine-tuning on a target dataset can boost accuracy significantly—jumping from 58% to 85% in "Mobile Actions" evaluations. This adaptability allows developers to create highly reliable agents for their specific use cases.
4. Unified Workflow
FunctionGemma isn't just about calling functions; it handles the full loop. It can:
- Parse a user's request.
- Generate the appropriate function call.
- Summarize the tool's output back to the user in natural language.
Under the Hood
FunctionGemma leverages Gemma's 256k vocabulary, which is optimized for JSON and multilingual inputs. This ensures that JSON structures—common in API payloads—are tokenized efficiently, reducing sequence length and speeding up inference on edge devices.
Getting Started
FunctionGemma is integrated into a broad ecosystem of tools, making it easy to adopt:
- Fine-tuning: Compatible with Hugging Face Transformers, Keras, and Axolotl.
- Deployment: Ready for LiteRT-LM, vLLM, and Vertex AI.
- Resources: Check out the fine-tuning cookbook and demos on the Google AI Edge Gallery.
FunctionGemma represents a significant step forward in making AI agents faster, more private, and more accessible. We can't wait to see what you build with it!
