Fine-Tuned LFM2.5 Powers a Tool-Calling Agent Entirely in the Browser
A fine-tuned LiquidAI LFM2.5 model runs a tool-calling agent fully client-side in the browser - no server, no API key, zero cloud cost.
A developer fine-tuned LiquidAI's LFM2.5 models (230M and 350M parameters) into a general-purpose front-end agent that runs entirely client-side - no server, no API key, no cloud cost. Rather than just chatting, it calls real tools to browse a catalog, ground answers in retrieved text, and manage a shopping cart, using WebGPU when available or CPU/WASM via wllama otherwise.
The core idea is training on interaction patterns rather than domain knowledge: picking the right tool, binding arguments and item ids correctly, resolving references like "the second one," and refusing when retrieved context lacks an answer. Because domain facts are injected at runtime rather than baked into weights, the same model drives three different storefronts in the demo - all held out of training - with zero retraining.
Three design choices make a model this small reliable: a frozen roster of eight named tools (variable schemas overwhelmed the 230M model), treating retrieval as just another tool call rather than a separate RAG pipeline, and grammar-constrained decoding via GBNF, which guarantees the model can never hallucinate a product id. Training used synthetic-data distillation - about 18 interaction recipes, natural-language phrasing generated by a teacher model (Qwen3 30B), deterministic tool-call structure written in code, and a full fine-tune on ~30M tokens fitting on a single 16GB GPU.
Limitations are candid: multi-turn coherence is weak, so the runtime caps context to a 2-turn sliding window to prevent drift. Still, the result is a concrete demonstration that sub-500M-parameter models can reliably execute tool-calling workflows on-device, trading broad knowledge for privacy, offline capability, zero inference cost, and better accessibility.