官方更新 Hugging Face Blog Tue, 13 Oct 2026 正文 ok 949 words

LFM2.5-24B-A2B:在设备本地运行快速、私密的 Agent

英文标题:Run fast, private agents on-device with LFM2.5-24B-A2B

Liquid AI 发布开源权重推理模型 LFM2.5-24B-A2B,总参数量为 240 亿,每个 token 仅激活 20 亿参数,面向设备本地运行的 Agent。该模型支持工具调用和多步骤任务,LiveClaw 得分为 48.09,高于 Qwen3.6-35B-A3B 的 38.19,并在多项工具使用和指令遵循测试中表现领先。推理速度方面,它在 Apple M5 Max 上达到每秒 184 token,在单张 NVIDIA B300 上高并发输出速度超过每秒 2.1 万 token。开发者可通过 llama.cpp、MLX、vLLM 等工具部署,并接入兼容 OpenAI 的 Agent 框架;对于知识密集型任务,官方建议配合检索或网络搜索使用。
打开原文相关 3 · 机会 2
media4.5 KB media10.7 KB media1.2 KB media9.5 KB media397 B media7.3 KB media8.1 KB media397 B media6.5 KB media10.2 KB media397 B media7.4 KB media1.3 KB media5.5 KB media1.2 KB media1.3 KB media10.4 KB media397 B media11.2 KB media1.3 KB

中文

LFM2.5-24B-A2B 是一款总参数量为 240 亿、每个 token 仅激活 20 亿参数的推理模型,专为在设备本地运行快速、私密的 Agent 而构建。它会在回答前进行思考、调用工具,并在主流 Agent 框架中处理多步骤任务。由于每个 token 仅激活 20 亿参数,每个推理 token 的成本较低,因此用户可以在自己的硬件上持续运行 Agent。

  • **同类领先的 Agent 能力:**在 Agent 和工具使用任务上,可与总参数量和激活参数量均多约 50% 的 Qwen3.6-35B-A3B 竞争;在 LiveClaw 上取得 48.09 分,后者为 38.19 分。
  • **以 MoE 速度进行推理:**始终在回答前思考。每个 token 仅激活 20 亿参数,因此每个推理 token 的成本较低。
  • **高效推理:**在 Apple M5 Max 上达到每秒 184 token,在单张 NVIDIA B300 GPU 上输出速度最高达到每秒 2.1 万 token。

LFM2.5-24B-A2B 基准测试

如何构建每次激活 20 亿参数的推理 Agent

LFM2.5-24B-A2B 基于 LFM2-24B-A2B 构建,并保留了其架构:40 层、每个 MoE 模块包含 64 个专家并采用 top-4 路由,以及门控短卷积与 GQA 的混合架构。上下文窗口从 32K 扩展至 131K token,原位分词器扩展将词表从 65K 扩大至 128K token,以改善非拉丁文字的分词效果。与前代模型不同,它是一款纯推理模型,会在最终答案之前生成明确的思维链。

预训练规模从约 17 万亿 token 扩大至约 33 万亿 token。随后,中期训练在 32K 上下文长度下加入 2 万亿 token,侧重推理、数学、代码、指令遵循和多语言文本;并在 131K 上下文长度下加入 3000 亿 token,侧重长上下文数据。工具调用和多轮交互轨迹贯穿这两个阶段。后训练分五个阶段将基础模型转化为 Agent:

  1. 监督微调(SFT)
  2. 教师模型专门化
  3. **多领域在策略蒸馏(MOPD),非 Agent 阶段:**在非 Agent 任务上蒸馏专门化的教师模型。
  4. **MOPD,Agent 阶段:**第二个蒸馏阶段,侧重 Agent 任务。
  5. **Agent 强化学习(Agentic RL):**在 OpenClaw、Hermes Agent、Pi 和 OpenCode 等 Agent 框架中训练模型。

LFM2.5-24B-A2B 训练方案

基准测试结果

我们在 16 项基准测试中,将 LFM2.5-24B-A2B 与 Qwen3.6-35B-A3B、Gemma-4-26B-A4B-it 和 Nemotron-3.5-Lightning 进行了比较,测试涵盖工具使用与 Agent 工作流、知识、指令遵循、数学和编程。它是这组模型中规模最小的,但仍能与总参数量和激活参数量多约 50% 的 MoE 模型竞争。

基准测试 LFM2.5-24B-A2B Qwen3.6-35B-A3B Gemma-4-26B-A4B-it Nemotron-3.5-Lightning (30B-A3B)
AutomationBench 27.69 8.72 5.46 2.61
BFCLv4 65.01 65.00 57.09 53.78
ToolSandbox 80.71 75.02 72.09 75.13
LiveClaw 48.09 38.19 41.25 37.72
PinchBench 83.18 89.93 77.12 84.20
τ³-Bench Banking 8.04 7.63 4.54 7.01
WebArena Verified 26.75 37.62 25.62 28.69
GPQA Diamond 74.42 83.69 74.90 72.42
AA-Omniscience -24.90 -24.35 -59.39 -3.58
HLE 7.40 7.69 8.57 5.65
IFEval 96.75 93.06 92.00 94.19
IFBench 74.69 64.21 47.44 71.67
Multi-IF 84.38 81.53 82.19 82.34
MATH-500 96.04 96.73 95.66 96.40
SWE-Bench Verified (OpenCode) 51.00 66.20 25.80 53.40
SciCode 32.71 37.35 35.42 27.78

*所有模型均使用 vLLM 进行评估,并采用各基准测试推荐的生成参数。

对于应用而言,该模型的优势在于工具使用和指令遵循。LFM2.5-24B-A2B 在八项工具使用和 Agent 基准测试中的五项上领先或与竞争对手持平,分别是 AutomationBench、BFCLv4、ToolSandbox、LiveClaw 和 τ³-Bench Banking;其中在 AutomationBench 上的得分是第二名的三倍以上。它还在全部三项指令遵循基准测试中领先。规模更大的模型在 GPQA Diamond、HLE 和 AA-Omniscience 等知识密集型测试,以及 SWE-Bench Verified(OpenCode)和 SciCode 等编程测试中仍占有优势,因此对于知识密集型工作负载,建议将 LFM2.5-24B-A2B 与检索或网络搜索配合使用。

这些结果使 LFM2.5-24B-A2B 成为构建 Agent 的坚实基础,适用于需要推理、调用工具并在设备上可靠运行的场景。

CPU 和 GPU 推理速度

LFM2.5-24B-A2B 从发布首日起即获得推理生态的支持,包括 llama.cpp、MLX、vLLM、SGLang 和 ONNX。

**边缘推理。**LFM2.5-24B-A2B 是对比的 MoE 模型中速度最快的,在 M5 Max 上的解码速度为每秒 184 token,在 Ryzen AI Max+ 395 上为每秒 114 token。它的速度最高可达第二名模型的 1.7 倍,同时内存占用最低。

LFM2.5-24B-A2B 边缘推理

**GPU 推理。**LFM2.5-24B-A2B 是同等规模中速度最快的模型,在单张 B300 上高并发运行时,每秒输出超过 2.1 万 token。

LFM2.5-24B-A2B GPU 推理

如何使用 LFM2.5-24B-A2B

如果需要能够推理、调用工具并在设备上可靠运行的 Agent,可以选择 LFM2.5-24B-A2B。

安装最新版本的 transformers(兼容 transformers>=5.0.0):

bash pip install -U transformers

然后加载并运行模型:

python from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer

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

) 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, )

在 Agent 框架中使用

通过任意兼容 OpenAI 的后端在本地部署 LFM2.5-24B-A2B,然后将 Agent 框架指向该服务。例如,使用 Hermes Agent:

bash 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

端口取决于所用的服务后端:llama.cpp 和 MLX 使用 8080,vLLM 使用 8000,SGLang 使用 30000,LM Studio 使用 1234。OpenClaw 和 Pi 的配置请参阅模型卡,完整设置请参阅我们的指南。视频示例请查看发布博客。

开始使用 LFM2.5-24B-A2B

LFM2.5-24B-A2B 和 LFM2.5-24B-A2B-Base 均为开放权重模型,现已在 Hugging Face 上提供。

我们期待看到您构建的作品。

引用

如果您使用了这项工作,请引用发布博客:

bibtex @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}, }

English / 原文

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.

  • Best-in-class agent: Competitive with Qwen3.6-35B-A3B, a model with ~50% more total and active parameters, on agentic and tool-use tasks, scoring 48.09 on LiveClaw versus 38.19.
  • Reasoning at MoE speed: Always thinks before it answers. With only 2B active parameters per token, each reasoning token is cheap.
  • Efficient inference: 184 tok/s on an Apple M5 Max and up to 21K output tok/s on a single NVIDIA B300 GPU.

LFM2.5-24B-A2B-benchmark

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:

  1. Supervised fine-tuning (SFT)
  2. Teacher specialization
  3. Multi-domain on-policy distillation (MOPD), non-agentic: distill the specialist teachers on non-agentic tasks.
  4. MOPD, agentic: a second distillation stage focused on agentic tasks.
  5. Agentic reinforcement learning (Agentic RL): train the model inside agent harnesses, such as OpenClaw, Hermes Agent, Pi, and OpenCode.

LFM2.5-24B-A2B-Training-Recipe

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.

Benchmark LFM2.5-24B-A2B Qwen3.6-35B-A3B Gemma-4-26B-A4B-it Nemotron-3.5-Lightning (30B-A3B)
AutomationBench 27.69 8.72 5.46 2.61
BFCLv4 65.01 65.00 57.09 53.78
ToolSandbox 80.71 75.02 72.09 75.13
LiveClaw 48.09 38.19 41.25 37.72
PinchBench 83.18 89.93 77.12 84.20
τ³-Bench Banking 8.04 7.63 4.54 7.01
WebArena Verified 26.75 37.62 25.62 28.69
GPQA Diamond 74.42 83.69 74.90 72.42
AA-Omniscience -24.90 -24.35 -59.39 -3.58
HLE 7.40 7.69 8.57 5.65
IFEval 96.75 93.06 92.00 94.19
IFBench 74.69 64.21 47.44 71.67
Multi-IF 84.38 81.53 82.19 82.34
MATH-500 96.04 96.73 95.66 96.40
SWE-Bench Verified (OpenCode) 51.00 66.20 25.80 53.40
SciCode 32.71 37.35 35.42 27.78

*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.

LFM2.5-24B-A2B-edge-inference

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.

LFM2.5-24B-A2B-gpu-inference

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",

)
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:

We can't wait to see what you build.

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},
}