← All IntelClip / AI ToolsFine-tuned Function Gemma: 45 tok/s on a Pi, 86% function-call reliability
From Why Large? Tiny LMs & Agents on Edge/Robotics — Cormac Brick, Google · ≈14:24
“So here that kind of jumps up to 45 tokens per second because we need to read less uh from memory each time.”
“this model knows about 10 different output functions and can call them at over 86% uh reliability from a given arbitrary text input.”
“we we've generally found that in the range of 10,000 to 10 million samples of synthetically generated um data will be sufficient to fine-tune a smaller model to a really really high degree of reliability”
“if you're willing to put the time and energy into creating a synthetic data set and fine-tuning a model you can achieve a similar like the same or greater quality with a model that is much much smaller will work on a much wider set of devices and will be much much more responsive”
What’s in it
- Benchmark result showing a ~270M-parameter fine-tune delivers usable function calling at ~10x the decode speed of the 2B model on the same hardware.
Clip transcript
and match matching text which is can be relevant in some cases. Okay. Um but then next scenario is you want to kind of fine-tune a model. Um so here you can start with uh the models I'm citing here are kind of Google developed models. Uh so there's some starting at like 270 million parameters and Gemma 3 and function Gemma. Uh Gemma 3 is a general purpose model. Function Gemma is one that has extra pre-training uh for function calling patterns. So here the performance if you remember earlier on the Raspberry Pi our performance was at uh mids singledigit tokens per second decode. So here that kind of jumps up to 45 tokens per second because we need to read less uh from memory each time. And we can fine-tune this to do pretty compelling things. So on the right hand side um this is running a uh what we call a mobile actions model. Uh so this does text in and function calling out. Um this model knows about 10 different output functions and can call them at over 86% uh reliability from a given arbitrary text input. And this is for doing common things on a mobile device like uh schedule a uh calendar or turn on and off Wi-Fi or things like this. And it can take like arbitrary free text input and convert that to appropriate function calling. And for this demo, we've taken another ASR model and put it in front of that. Um which gives kind of voice to function calling as a feature. And voice to function calling is pretty key for lots of IoT and edge devices because um yeah like smaller devices tend to have you know require settings menus and that user interface can be really really challenging for lots of people. Uh so yeah being able to just talk to something to ask for a given outcome. This is a pretty key capability and uh we can do that reasonably reliably using a fine-tuned small model. So the playbook is generally then you pick a base model you check the performance if the performance and memory footprint are within the range that you want and then um the kind of the harder part is you uh the playbook we've found works really really well is we synthetically generate data to fine-tune that model um depending on the model like um there's a data set we've open sourced here called mobile actions it's available on hugging face that corresponds to this if you want to kind of recreate that same demo yourself and fine-tune function gemma from scratch. Um but we we've generally found that in the range of 10,000 to 10 million samples of synthetically generated um data will be sufficient to fine-tune a smaller model to a really really high degree of reliability. And so for other tasks we've done like things like summarization or proof reading. So something which you could do with a two or four billion parameter model reasonably reliably if you're willing to put the time and energy into creating a synthetic data set and fine-tuning a model you can achieve a similar like the same or greater quality with a model that is much much smaller will work on a much wider set of devices and will be much much more responsive. Um so yeah and that's that's the type of outcome we're seeing now with just fine-tuning a model for a single task and it's a really like yeah we found this is a really good playbook uh for deploying at like very wide scale.
Comments
Checking sign-in…
Loading comments…