From 46% to 90%: Fine-Tuning Tiny LLMs for On-Device Agents — Cormac Brick, Google

· Source: AI Engineer · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Internet of Things (IoT) & Connected Devices · Depth: Advanced, long

Summary

Google's AI Edge stack, featuring the Lighter TLM runtime, enables on-device AI processing for latency, privacy, and offline use. It supports two main approaches: system-level GenAI like Gemini Nano via AI Core for optimized, preloaded models (e.g., Gemma 4 E2B/E4B), and App GenAI using Lighter TLM for highly customized applications with Tiny LLMs (under 1 billion parameters). The Google AI Edge Gallery app showcases agent skills built on Gemma 4, demonstrating how models can dynamically load and execute JavaScript-based tools. A key finding highlights that fine-tuning Function Gemma, a 270-million-parameter model, with synthetic data dramatically improved function calling success from 46% to over 90% for eight out of ten functions. This robust fine-tuning workflow allows developers to deploy highly reliable, small models, as exemplified by the Eloquent transcription app, which chains multiple Gemma 3-based Tiny LLMs.

Key takeaway

For mobile app developers or AI engineers building on-device agents, consider Google's AI Edge stack and Lighter TLM for highly customized solutions. While system-level GenAI offers convenience, fine-tuning Tiny LLMs like Function Gemma with synthetic data can elevate task-specific performance from 46% to over 90%. This approach, though requiring more effort, enables robust, privacy-preserving, and low-latency AI directly within your application, expanding capabilities beyond pre-installed system models. Explore the Function Gemma fine-tuning lab to achieve reliable function calling.

Key insights

Fine-tuning tiny LLMs with synthetic data dramatically enhances on-device agent performance and reliability for specific tasks.

Principles

Method

Export models from Transformers using lighter.torch, then fine-tune Tiny LLMs with synthetically generated datasets, and deploy them via the Lighter TLM runtime.

In practice

Topics

Best for: NLP Engineer, AI Architect, AI Product Manager, AI Engineer, Machine Learning Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by AI Engineer.