Cormac Brick, Tech Lead for Google AI Edge, presents a workshop on bringing language models to edge devices using LiteRT-LM, with a focus on two main tracks: agent skills built on Gemma 4 medium-small models, and fine-tuned tiny language models (sub-1B parameters) for in-app deployment.
Brick opens by distinguishing two deployment paradigms. "System-level GenAI" places 2–5B parameter models at the OS layer — Google's AI Core and Apple Intelligence both follow this pattern — where third-party apps access models via prompt APIs. "In-app GenAI" uses custom-fine-tuned tiny models (100–500M parameters) shipped directly with an application, targeting broader device reach beyond premium hardware.
The Gemma 4 launch (E2B and E4B variants) enables the system-level track. The E2B model requires only approximately 2GB of RAM resident at inference time, with additional per-layer embedding parameters memory-mapped and streamed at roughly a few hundred bytes per token — avoiding the need to load the full parameter table. Gemma 4 introduces built-in function calling and chain-of-thought thinking, which together unlock on-device agent skills. On a high-end Android phone GPU, the E2B model achieves thousands of tokens per second; on a Raspberry Pi, the E2B reaches roughly 133 tokens per second. The E4B model delivers proportionally lower throughput but runs on a wide device set.
The agent skills architecture is demonstrated through the Google AI Gallery app (available on iOS and Android, open source). Skills follow a "progressive disclosure" pattern: the system prompt contains only one-line skill descriptions; when the model determines a skill is relevant, it invokes a `load_skill` tool call whose response is the full `skill.md` instructions. This keeps context windows compact for edge models — critical for reliability in 2–4B parameter models. Skills are composed of a `skill.md` metadata file plus optional JavaScript assets. Three core orchestrator tools — `load_skill`, `run_javascript`, and `run_intent` — are sufficient to drive the full skill system. Constrained decoding is applied specifically at tool-call generation time, restricting outputs to the known finite tool set; this yields especially large reliability gains for small models. Brick reports that about 80 skills were vibe-coded internally using Gemini CLI or similar tools, with the ADB integration enabling automated on-device validation.
For the tiny-model track, Brick highlights Function Gemma (270M parameters), which achieved 85–90% reliability on 10 mobile function-calling tasks after fine-tuning, compared to a baseline of roughly 40–50% pre-fine-tune — a 20–40 point improvement typical for sub-500M models. The recommended workflow is: start from a Gemma 3 checkpoint (e.g., Gemma 3 270M), generate synthetic training data with a large cloud model, fine-tune with LiteRT-Torch (which includes quantization), and export a single `.tflm` file deployable across CPU and GPU on Android, iOS, macOS, Linux, Windows, web, and IoT. NPU deployment requires ahead-of-time vendor compilation producing a device-specific artifact, but the app-level API is consistent across NPU, CPU, and GPU.
A production example is AI Edge Eloquent (iOS), a transcription app using two separate fine-tuned Gemma-derived models: an ASR engine and a text-polishing engine. The modular design enables reuse of the transcription model across features and simplifies debugging. The polishing model is instruction-fine-tuned to remove filler words and apply a user-supplied biasing dictionary for proper nouns and technical terms (e.g., preventing "LoRA" from being transcribed as the name "Laura").
Third-party model support is also highlighted: Fast VLM from Apple (500M parameters, vision-language) runs on a Qualcomm S25 with NPU acceleration at very high frame rates. LiteRT-LM supports LoRA hot-swapping at runtime, making it practical for robotics and IoT platforms to maintain one base model with multiple task-specific adapters (8–100MB depending on rank). The Gemma 4 models carry an Apache 2.0 license, expanding commercial usability. Context windows are 32K for E2B/E4B and 128K for larger Gemma 4 variants; Gallery defaults to 8–12K for performance reasons. Fine-tuning documentation with Colab notebooks exists for Gemma 3 270M and Function Gemma; Gemma 4 fine-tuning recipes are available on Vertex AI.
[music] Hey, my name is uh Cormbrick. I work um on Google AI edge, which is a way of kind of bringing models to the edge. This is something we use internally for our own products. It's also something we make available as open source products. As part of this, we also work really, really close with the Gemma team because they publish a lot of models that are targeted to edge devices as well. Um, yeah, quick bit of background on me. Um, yeah, I've been focusing on Edgi for the last like, wow, like...
Mario Zechner, creator of the LibGDX game framework, delivers a provocative three-act talk about building a minimal codi...