返回资讯中心
外部精选
企业动态
#开源#模型发布

Run fast, private agents on-device with LFM2.5-24B-A2B

Run fast, private agents on-device with LFM2.5-24B-A2B

Hugging Face Blog2026/10/13 · 13 天前18 分钟阅读

以下正文同步自 Hugging Face Blog,版权归原站所有,已转换为易读排版。

Back to Articles

a]:hidden">

Run fast, private agents on-device with LFM2.5-24B-A2B

Team Article Published October 13, 2026

Upvote 51

+45

Raahul Vignesh Raahul26 Follow

LiquidAI

Song Duong sduong Follow

LiquidAI

Akhilesh Deepak Gotmare akhileshdeepakgotmare Follow

LiquidAI

Fernando Fernandes Neto fernandofernandes Follow

LiquidAI

Jiahui Wang WWWjiahui Follow

LiquidAI

Mayank Agarwal mayankagarwal Follow

LiquidAI

nathan ranchin nathanrchn Follow

LiquidAI

Sergei Tilga tilgasergey Follow

LiquidAI

Sinoué GAD GAD-cell Follow

LiquidAI

Tim Seyde tseyde Follow

LiquidAI

Zetian Li zetianli Follow

LiquidAI

changyi yang changyiyang Follow

LiquidAI

Simon Lee yungisimon Follow

LiquidAI

Leonie Monigatti iamleonie Follow

LiquidAI

Maxime Labonne mlabonne Follow

LiquidAI

Karthik Macherla karthikrmacherla Follow

LiquidAI

Alfred Eng alfredeng Follow

LiquidAI

Khoi Nguyen KTLK Follow

LiquidAI

Paul Pak paulpak58 Follow

LiquidAI

xx tugot17 Follow

LiquidAI

Tarek Dakhran tdakhran Follow

LiquidAI

Anthony Maltsev amaltsev Follow

LiquidAI

Aldo Gael Carranza agcarranza Follow

LiquidAI

Tyler Murray undfined Follow

LiquidAI

Aditya Tadimeti adityatadimeti Follow

LiquidAI

Jimmy T.H. Smith jimmysmith1919 Follow

LiquidAI

Yuri Khrustalev ykhrustalev Follow

LiquidAI

:last-child]:mb-0"> How we built a reasoning agent with 2B active parameters

Benchmark results

Inference speed on CPU and GPU

How to use LFM2.5-24B-A2B Use it in your agent harness

Get Started with LFM2.5-24B-A2B

Citation

LFM2.5-24B-A2B is a 24B-parameter reasoning model with just 2B active parameters, built for fast, private agents on-device. It thinks before it answers, calls tools, and works through multi-step tasks inside popular agent harnesses. Because only 2B parameters are active per token, each reasoning token is cheap, so you can run agents continuously on your own hardware.

How we built a reasoning agent with 2B active parameters

LFM2.5-24B-A2B builds on LFM2-24B-A2B and keeps its architecture: 40 layers, 64 experts per MoE block with top-4 routing, and the same hybrid of gated short convolutions and GQA. The context window grows from 32K to 131K tokens, and an in-place tokenizer expansion doubles the vocabulary from 65K to 128K tokens for better non-Latin tokenization. Unlike its predecessor, it is a reasoning-only model that produces an explicit chain of thought before its final answer.

Pre-training was scaled up from ~17T to ~33T tokens. Mid-training then adds 2T tokens at 32K context, weighted toward reasoning, math, code, instruction following, and multilingual text, and 300B tokens at 131K context, weighted toward long-context data. Tool calls and multi-turn trajectories appear throughout both phases. Post-training turns the base model into an agent in five stages:

Benchmark results

We evaluated LFM2.5-24B-A2B against Qwen3.6-35B-A3B, Gemma-4-26B-A4B-it, and Nemotron-3.5-Lightning on 16 benchmarks covering tool use and agentic workflows, knowledge, instruction following, math, and coding. It is the smallest model in the group, yet it is competitive with MoEs with ~50% more total and active parameters.

*All the models were evaluated with vLLM, using each benchmark's recommended generation parameters.

For your app, the strengths are tool use and instruction following. LFM2.5-24B-A2B leads or matches the competition on five of the eight tool-use and agentic benchmarks (AutomationBench, BFCLv4, ToolSandbox, LiveClaw, and τ³-Bench Banking), and on AutomationBench it scores more than three times the next-best model. It also leads on all three instruction-following benchmarks. Larger models keep an edge on knowledge-heavy benchmarks like GPQA Diamond, HLE, and AA-Omniscience, and on coding benchmarks like SWE-Bench Verified (OpenCode) and SciCode, so pair LFM2.5-24B-A2B with retrieval or web search for knowledge-heavy workloads.

These results make LFM2.5-24B-A2B a strong foundation for agents that need to reason, call tools, and run reliably on your device.

Inference speed on CPU and GPU

LFM2.5-24B-A2B ships with day-one support across the inference ecosystem, including llama.cpp, MLX, vLLM, SGLang, and ONNX.

Edge inference. LFM2.5-24B-A2B is the fastest of the compared MoEs, decoding 184 tokens/s on an M5 Max and 114 tokens/s on a Ryzen AI Max+ 395. That is up to 1.7x faster than the next-best model, while using the least memory.

GPU inference. LFM2.5-24B-A2B is the fastest model in its size class, reaching over 21K output tokens per second at high concurrency on a single B300.

How to use LFM2.5-24B-A2B

Reach for LFM2.5-24B-A2B when you need agents that reason, call tools, and run reliably on your device.

Install the latest version of transformers (compatible with transformers>=5.0.0):

pip install -U transformers

Then load and run the model:

from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer

model_id = "LiquidAI/LFM2.5-24B-A2B" model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", dtype="bfloat16",

attn_implementation="flash_attention_2" <- uncomment on compatible GPU

) tokenizer = AutoTokenizer.from_pretrained(model_id) streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)

prompt = "What is C. elegans?"

input_ids = tokenizer.apply_chat_template( [{"role": "user", "content": prompt}], add_generation_prompt=True, return_tensors="pt", tokenize=True, )["input_ids"].to(model.device)

output = model.generate( input_ids, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.05, max_new_tokens=512, streamer=streamer, )

Use it in your agent harness

Serve LFM2.5-24B-A2B locally behind any OpenAI-compatible backend, then point your agent harness at it. For example, with Hermes Agent:

hermes config set model.provider custom hermes config set model.base_url http://localhost:8080/v1 hermes config set model.default LFM2.5-24B-A2B hermes config set model.context_length 131072 hermes config set model.api_mode chat_completions hermes config set agent.tool_use_enforcement true

The port depends on your serving backend: llama.cpp and MLX use 8080, vLLM uses 8000, SGLang uses 30000, and LM Studio uses 1234. See the model card for OpenClaw and Pi configs, and our guide for the full setup. Check out our release blog for video examples.

Get Started with LFM2.5-24B-A2B

Both LFM2.5-24B-A2B and LFM2.5-24B-A2B-Base are open-weight and available on Hugging Face today:

Citation

If you use this work, please cite the release blog:

@article{liquidAI202624BA2B, author = {Liquid AI}, title = {LFM2.5-24B-A2B: Built for Fast On-Device Agents}, journal = {Liquid AI Blog}, year = {2026}, note = {www.liquid.ai/blog/lfm2-5-24b-a2b}, }

Models mentioned in this article 3

LiquidAI/LFM2-24B-A2B

Text Generation • 24B • Updated Aug 5 • 2.88k • 355

LiquidAI/LFM2.5-24B-A2B

Text Generation • 24B • Updated about 23 hours ago • 4.07k • 271

LiquidAI/LFM2.5-24B-A2B-Base

Text Generation • 24B • Updated 1 day ago • 73 • 28

More from this author

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →