DEV Community

Prabhakar Chaudhary
Prabhakar Chaudhary

Posted on

LFM2.5-2.6B: How Liquid AI Built an Agentic Model That Runs on Your Phone

LFM2.5-2.6B: How Liquid AI Built an Agentic Model That Runs on Your Phone

The promise of AI agents running entirely on-device — no cloud calls, no per-token billing, no latency from a round-trip to a remote server — has been around for a while. The problem is that models small enough to fit on a phone have historically been too weak to handle the multi-step planning, tool calling, and instruction following that agentic workflows actually require.

Liquid AI's LFM2.5-2.6B, released on August 4, 2026, is a direct attempt to close that gap. At 2.6 billion parameters and under 2.5 GB of memory, it runs at 30 tokens per second on a smartphone — and on benchmarks for tool use and instruction following, it regularly outperforms models nearly four times its size.

Why On-Device Agents Are Architecturally Different

Most small models are trained to be general-purpose assistants. LFM2.5-2.6B was designed from the start for agentic workloads: multi-step planning, tool invocation, web search, and operating inside agent harnesses like OpenClaw and Hermes Agent.

The distinction matters because agentic tasks have different failure modes than single-turn chat. A model that gives a slightly wrong answer in a conversation is annoying. A model that misformats a tool call, loses track of its plan mid-task, or fails to follow a complex system prompt can break an entire automated workflow. Liquid AI's training pipeline was built around these failure modes specifically.

The Hybrid Architecture: Fewer Attention Layers, Fixed-Size State

The core architectural choice in LFM2.5-2.6B is the LFM2 hybrid design: 30 layers total, split between 22 gated short convolution blocks and 8 grouped-query attention (GQA) layers. Attention accounts for only about 37% of the model; the rest is convolution.

This ratio has a concrete engineering consequence. In a standard Transformer, every layer uses Softmax Attention, which scales quadratically with sequence length and requires a KV cache that grows with every new token. On a phone with limited VRAM, that cache becomes the bottleneck.

The LFM2 convolution blocks sidestep this entirely. Each convolution layer maintains a fixed-size state that updates per token — no attention over past tokens, no growing cache. The state at token 10,000 is the same size as the state at token 10. The specific operator is called an LIV (Linear Input-Varying) convolution: a linear-time operator whose behavior adapts to the current input.

Liquid AI ran a hardware-in-the-loop architecture search across GQA, short convolutions, linear attention, S4, Mamba, and Mamba2 to find the best layer mix for quality, latency, and memory. The result was the simplest option: mostly short convolutions, with a small number of GQA layers to handle long-range retrieval tasks where attention is genuinely needed.

A Four-Stage Post-Training Pipeline

Pre-training LFM2.5-2.6B on approximately 34 trillion tokens (with a mid-training 128K context extension phase) produced the base model. Turning that into a capable agent required four additional stages:

1. Supervised Fine-Tuning (SFT). Two consecutive SFT rounds, with the training mix weighted heavily toward agentic data: tool use, web search, software engineering, and agent traces. The mix was roughly seven times larger than what was used for the larger LFM2.5-8B-A1B model.

2. Teacher Specialization. From the SFT checkpoint, Liquid AI trained one specialist teacher per domain — math, code, tool use, instruction following, knowledge, and long context — using reinforcement learning with verifiable rewards (RLVR).

3. Multi-Domain On-Policy Distillation (MOPD). Rather than distilling from fixed teacher trajectories (off-policy distillation), MOPD lets the student model roll out under its own policy. Each prompt is routed to the appropriate specialist teacher, which provides token-level feedback on the student's actual output. This keeps the student from learning to mimic trajectories it would never generate itself.

4. Agentic Reinforcement Learning. The final stage runs multi-turn RL inside real agent harnesses. The model works through realistic productivity tasks in a dedicated sandbox, with rewards combining an LLM-as-a-judge rubric, programmatic checks, and a hard safety gate. Optimization uses GRPO (Group Relative Policy Optimization).

The Agentic RL setup is worth noting: a Harness Proxy treats the agent harness as a black box, transparently capturing token-level trajectories without modifying the harness itself. This means the model trains on the same interface developers actually use.

Benchmark Results: Where It Leads and Where It Doesn't

On instruction-following benchmarks, LFM2.5-2.6B leads the comparison group — which includes Gemma-4 models at 5.1B and 8B parameters, and Qwen3.5 models at 4.7B and 9.7B parameters. On IFBench it scores 59.17 against Qwen3.5-9B's 56.47. On Multi-IF it reaches 80.07 against Qwen3.5-9B's 62.55. On IFStruct it scores 85.49 against Qwen3.5-9B's 78.50.

Tool use tells a similar story. On ToolSandbox, LFM2.5-2.6B scores 77.83, edging out Qwen3.5-9B at 76.44 and well ahead of Gemma-4-E4B-it at 65.00. On BFCLv4 (function calling), it scores 56.88 — behind Qwen3.5-9B's 60.13, but ahead of every other model in the comparison.

The one area where larger models maintain a clear advantage is coding. On LiveCodeBenchv6, Qwen3.5-9B scores 69.86 against LFM2.5-2.6B's 59.41. Liquid AI is explicit about this: for coding-heavy agentic tasks, a larger model is the better choice.

Inference Speed Across Hardware

The memory and compute efficiency of the LFM2 architecture translates directly to inference speed:

  • Apple M5 Max: 220 tokens/second
  • AMD Ryzen AI Max+ 395: 113 tokens/second
  • Smartphone: ~30 tokens/second
  • NVIDIA H100 (high concurrency): ~15,000 tokens/second (~1.3 billion tokens/day)

The model ships with day-one support for llama.cpp (GGUF format), MLX (Apple Silicon), vLLM, SGLang, and ONNX. A WebGPU browser demo is also available for in-browser inference with no setup.

What This Means for Agent Deployment

The practical implication of zero marginal inference cost is architectural. When every token costs money, developers design agents to be conservative — short context windows, minimal tool calls, batched rather than continuous operation. When inference is free and local, those constraints disappear.

Agents can run continuously in the background on user hardware, process millions of tokens for monitoring or summarization tasks, and be parallelized across many simultaneous workflows without a cloud bill scaling linearly with usage. Privacy is also a genuine benefit: data never leaves the device.

LFM2.5-2.6B is available now on Hugging Face under the LFM Open License v1.0, which permits commercial use for organizations with under $10 million in annual revenue. Both the base model and the post-trained agentic version are available.

The Broader Context

LFM2.5-2.6B is part of a broader trend toward efficient, specialized small models that can handle specific workloads without requiring frontier-scale compute. The LFM2 architecture's hybrid convolution-attention design is a concrete example of moving beyond the assumption that every layer needs full Softmax Attention — a design choice that pays off most clearly at the edge, where memory and compute are genuinely constrained.

For developers building agentic applications where tool use, instruction following, and multi-step planning matter more than raw coding ability, LFM2.5-2.6B offers a compelling option that runs on hardware most users already own.

Top comments (0)