官方更新 Hugging Face Blog Tue, 04 Aug 2026 正文 ok 876 words

用 LFM2.5-2.6B 在任何设备上部署本地 Agent

英文标题:Deploy local agents everywhere with LFM2.5-2.6B

Liquid AI 发布 LFM2.5-2.6B,一款面向端侧部署的 26 亿参数 Agent 模型,支持工具调用和多步骤工作流,可在笔记本电脑和手机等日常设备上运行。该模型在工具使用、指令遵循和多步 Agent 任务上可与参数量约为其 4 倍的模型竞争,并通过真实 Agent harness 中的强化学习提升兼容性。官方称其在 Apple M5 Max 上解码速度达 220 tokens/s、AMD Ryzen CPU 上达 113 tokens/s,内存占用不足 2.5GB;在高并发 H100 上输出吞吐接近每秒 1.5 万 token。对开发者而言,这意味着可以在不产生云端推理账单的情况下构建更具隐私性的本地 Agent,并通过 Hugging Face、llama.cpp、MLX、vLLM、SGLang 和 ONNX 等生态快速部署。
打开原文相关 3 · 机会 2
media4.5 KB media11.8 KB media3.4 KB media4.2 KB media10.2 KB media4.1 KB media11.6 KB media397 B media6.5 KB media1.3 KB media8.1 KB media1.2 KB media10.7 KB media262.4 KB media213.5 KB media295.8 KB media451.3 KB media186.2 KB media126.3 KB media7.4 KB

中文

用 LFM2.5-2.6B 在任何设备上部署本地 Agent

LFM2.5-2.6B

旨在完全在设备端为高能力 Agent 提供支持。它支持工具调用和多步骤工作流,同时体积足够小、速度足够快,可运行于从笔记本电脑到手机的日常硬件。这使开发者能够在任何地方部署 Agent,将数据保留在设备本地,并在不承担云端推理账单的情况下扩展使用规模。

  • 同级最佳 Agent: 在工具使用、指令遵循和多步骤 Agent 任务方面,可与参数量约为其 4 倍的模型竞争。
  • Agent 强化学习: 在最流行的 Agent harness 中进行训练,以提升兼容性。
  • 高效推理: 在 Apple M5 Max 上达到 220 tok/s,在 AMD Ryzen CPU 上达到 113 tok/s,内存占用不足 2.5 GB。

LFM2.5-2.6B 评测结果

我们如何为边缘设备构建可靠的 Agent 模型

LFM2.5-2.6B 在约 34T token 上进行了预训练,并通过中期训练阶段将上下文窗口扩展至 128K。随后,后训练通过四个阶段将基础模型转化为 Agent:

  1. 监督微调(SFT): 进行两轮 SFT,重点加权 Agent 数据,例如工具使用、网页搜索和 harness 轨迹。
  2. 教师模型专精: 为每个领域训练一个专用教师模型,包括数学、代码、工具使用等。
  3. 多领域在线策略蒸馏(MOPD): 将专用教师模型蒸馏为单一学生模型。
  4. Agent 强化学习(Agentic RL): 在真实的 Agent harness 中运行多轮 RL,使模型学习如何跨不同工具、系统提示词和多轮任务环境工作。

LFM2.5-2.6B 训练方案

Agentic RL 流水线将模型优化、推理和环境执行拆分为不同组件。Training Engine 负责优化模型,Rollout Engine 使用最新策略生成动作。RL framework 则通过启动 rollout、收集轨迹和奖励以及更新模型来编排训练循环。

动作在 Sandbox Service 内执行,其中 Blackbox Harness 托管 Agent(例如 OpenClaw 或 Hermes Agent),并协调其与任务环境之间的交互。Harness Proxy 使我们能够将 Agent harness 视为无需修改的黑盒,同时透明地捕获重建和验证 RL 训练样本所需的 token 级轨迹。

LFM2.5-2.6B Agentic RL

基准测试结果

我们将 LFM2.5-2.6B 与参数量最高约为其 4 倍的模型,在 STEM、指令遵循、工具使用和 Agent 任务上进行了对比评测。它是这组模型中参数量最小的一款,却能与其他模型竞争,且经常超越它们。

基准测试 LFM2.5-2.6B(2.6B) gemma-4-E2B-it(5.1B) gemma-4-E4B-it(8B) Qwen3.5-4B(4.7B) Qwen3.5-9B(9.7B)
AA Omniscience -29.50 -74.47 -49.03 -54.30 -50.43
AIME25 51.87 26.33 34.27 49.33 56.07
LiveCodeBenchv6 59.41 54.92 63.77 60.85 69.86
IFBench 59.17 34.08 39.24 48.40 56.47
Multi-IF 80.07 69.44 77.35 55.67 62.55
IFStruct 85.49 64.85 76.65 36.25 78.50
BFCLv4 56.88 36.98 46.39 50.56 60.13
ToolSandbox 77.83 52.40 65.00 75.55 76.44
τ³-Bench Banking 5.67 3.35 4.12 5.45 5.15
Claw-Eval 平均值(英语) 62.85 53.14 58.02 62.28 66.53
PinchBench 68.22 44.24 55.09 71.26 71.45
BrowseComp+(OpenClaw) 26.89 8.31 15.90 24.46 27.23

对于应用开发而言,该模型的优势在于指令遵循和工具使用。LFM2.5-2.6B 在这里的所有指令遵循基准中均排名第一;在所有工具使用基准中也位居第一,只有 BFCLv4 例外,9.7B 的 Qwen 略占优势。在 Agent 任务上,它优于两款 Gemma 模型,并与 Qwen 系列持平。它在知识测试中同样领先,在数学方面也保持接近。编码是更大模型仍然具有明显领先优势的唯一领域,因此在该场景下应选择更大的模型。

CPU 和 GPU 上的推理速度

LFM2.5-2.6B 在发布首日即获得推理生态系统的广泛支持,包括 llama.cpp、MLX、vLLM、SGLang 和 ONNX。

CPU 推理。 得益于高效的 LFM2 架构,LFM2.5-2.6B 是我们测试过的速度最快的模型:在 M5 Max 上的解码速度为 220 tokens/s,在 Ryzen AI Max+ 395 上为 113 tokens/s。在 30 tokens/s 的速度下,即使是在手机上也可以运行高能力 Agent。

LFM2.5-2.6B CPU 推理

GPU 推理。 LFM2.5-2.6B 是其参数规模级别中速度最快的模型,高并发下输出速度接近每秒 15K token,单张 H100 每天约可生成 13 亿 token。

LFM2.5-2.6B GPU 推理

如何使用 LFM2.5-2.6B

当你需要面向高吞吐工作负载的设备端 Agent 时,可以选择 LFM2.5-2.6B。

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

pip install -U transformers

然后加载并运行模型:

from transformers import AutoModelForCausalLM, AutoTokenizer

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

)
tokenizer = AutoTokenizer.from_pretrained(model_id)

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

output = model.generate(
    input_ids,
    do_sample=True,
    temperature=0.2,
    top_k=80,
    repetition_penalty=1.05,
    max_new_tokens=512,
)
print(tokenizer.decode(output[0], skip_special_tokens=False))

LFM2.5-2.6B 演示

查看这个由 LFM2.5-2.6B 驱动研究 Agent 的浏览器演示。该 Agent 可帮助你研究特定问题并生成摘要。

开始使用

LFM2.5-2.6B 和 LFM2.5-2.6B-Base 现已在 Hugging Face 上提供。

通过 LFM2.5,我们正在兑现让 AI 能够在任何地方运行的愿景。这些模型支持:

  • 下载: 在 Hugging Face 获取 LFM2.5-2.6B-Base 和 LFM2.5-2.6B。
  • 试用: 在浏览器中运行 WebGPU 演示,无需任何设置。
  • 在你的 harness 中使用: 参考我们的指南,了解如何运行 OpenClaw、Hermes Agent 和 Pi 等本地 Agent。

我们迫不及待想看到你将构建什么。

引用

请按以下格式引用本文:

Liquid AI, "LFM2.5-2.6B: Deploy Agents Everywhere", Liquid AI Blog, Aug 2026.

或者使用 BibTeX 引用:

@article{liquidAI202626B,
  author  = {Liquid AI},
  title   = {LFM2.5-2.6B: Deploy Agents Everywhere},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm2-5-2-6b},
}

English / 原文

Deploy local agents everywhere with LFM2.5-2.6B

LFM2.5-2.6B

is built to power capable agents entirely on-device. It supports tool calling and multi-step workflows while staying small and fast enough for everyday hardware, from laptops to phones. This enables developers to deploy agents everywhere, keep data private on the device, and scale usage without a cloud inference bill.

  • Best-in-class agent: Competitive with models 4x larger on tool use, instruction following, and multi-step agentic tasks.
  • Agentic reinforcement learning: Trained inside the most popular agentic harnesses to improve compatibility.
  • Efficient inference : 220 tok/s on an Apple M5 Max and 113 tok/s on an AMD Ryzen CPU, in under 2.5 GB of memory.

lfm2_5_2_6b_evaluations

How we built a reliable agentic model for edge devices

LFM2.5-2.6B is pre-trained on ~34T tokens, with a mid-training phase that extends the context window to 128K. Post-training then turns the base model into an agent in four stages:

  1. Supervised fine-tuning (SFT): two rounds of SFT, weighted heavily toward agentic data like tool use, web search, and harness trajectories.
  2. Teacher specialization: train one specialist teacher per domain (math, code, tool use, and more).
  3. Multi-domain on-policy distillation (MOPD): distill the specialist teachers into a single student.
  4. Agentic Reinforcement Learning (Agentic RL): run multi-turn RL inside real agent harnesses, where the model learns to work across different tools, system prompts, and multi-turn task environments.

LFM2.5-2.6B-Training-Recipe

The Agentic RL pipeline separates model optimization, inference, and environment execution into distinct components. The Training Engine optimizes the model, while the Rollout Engine generates actions using the latest policy. The RL framework orchestrates the training loop by launching rollouts, collecting trajectories and rewards, and updating the model.

Actions are executed within a Sandbox Service , where the Blackbox Harness hosts the agent (e.g., OpenClaw or Hermes Agent) and coordinates interactions with the task environment. The Harness Proxy lets us treat agentic harnesses as black boxes with no modification, while transparently capturing the token-level trajectories needed to reconstruct and validate RL training samples.

LFM2.5-2.6B-Agentic-RL

Benchmark results

We evaluated LFM2.5-2.6B against models up to ~4x its size on STEM, instruction following, tool use, and agentic tasks. It is the smallest model in the group, yet it competes with and often beats the rest.

Benchmark LFM2.5-2.6B (2.6B) gemma-4-E2B-it (5.1B) gemma-4-E4B-it (8B) Qwen3.5-4B (4.7B) Qwen3.5-9B (9.7B)
AA Omniscience -29.50 -74.47 -49.03 -54.30 -50.43
AIME25 51.87 26.33 34.27 49.33 56.07
LiveCodeBenchv6 59.41 54.92 63.77 60.85 69.86
IFBench 59.17 34.08 39.24 48.40 56.47
Multi-IF 80.07 69.44 77.35 55.67 62.55
IFStruct 85.49 64.85 76.65 36.25 78.50
BFCLv4 56.88 36.98 46.39 50.56 60.13
ToolSandbox 77.83 52.40 65.00 75.55 76.44
τ³-Bench Banking 5.67 3.35 4.12 5.45 5.15
Claw-Eval average (EN) 62.85 53.14 58.02 62.28 66.53
PinchBench 68.22 44.24 55.09 71.26 71.45
BrowseComp+ (OpenClaw) 26.89 8.31 15.90 24.46 27.23

For your app, the strengths are instruction following and tool use. LFM2.5-2.6B tops every instruction-following benchmark here, and every tool-use benchmark except BFCLv4, where only the 9.7B Qwen edges ahead. On agentic tasks, it beats both Gemma models and stays even with the Qwens. It also leads on knowledge and stays close on math. Coding is the one place the larger models keep a clear lead, so reach for something bigger there.

Inference speed on CPU and GPU

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

CPU inference. Due to its efficient LFM2 architecture, LFM2.5-2.6B is the fastest model we tested, with decode speeds of 220 tokens/s on an M5 Max and 113 tokens/s on a Ryzen AI Max+ 395. At 30 tokens/s, it allows you to run capable agents even on a phone.

lfm2_5_2_6b_cpu_inference

GPU inference. LFM2.5-2.6B is the fastest model in its size class, reaching almost 15K output tokens per second at high concurrency, roughly 1.3B tokens per day on a single H100.

lfm2_5_2_6b_gpu_inference

How to use LFM2.5-2.6B

Reach for LFM2.5-2.6B when you need on-device agents for high-volume workloads.

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

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

)
tokenizer = AutoTokenizer.from_pretrained(model_id)

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

output = model.generate(
    input_ids,
    do_sample=True,
    temperature=0.2,
    top_k=80,
    repetition_penalty=1.05,
    max_new_tokens=512,
)
print(tokenizer.decode(output[0], skip_special_tokens=False))

LFM2.5-2.6B demo

Check out this browser demo of LFM2.5-2.6B powering a research agent. The agent helps you research specific questions and generates a summary.

Get Started

Both LFM2.5-2.6B and LFM2.5-2.6B-Base are available on Hugging Face today.

With LFM2.5, we're delivering on our vision of AI that runs anywhere. These models are:

  • Download: LFM2.5-2.6B-Base and LFM2.5-2.6B on Hugging Face.
  • Try: run the WebGPU demo in your browser, no setup needed.
  • Use in your harness: follow our guide on how to run a local agent, like OpenClaw, Hermes Agent, and Pi.

We can't wait to see what you build.

Citation

Please cite this article as:

Liquid AI, "LFM2.5-2.6B: Deploy Agents Everywhere", Liquid AI Blog, Aug 2026.

Or use the BibTeX citation:

@article{liquidAI202626B,
  author  = {Liquid AI},
  title   = {LFM2.5-2.6B: Deploy Agents Everywhere},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm2-5-2-6b},
}