Deploy local agents everywhere with LFM2.5-2.6B
TL;DR · AI 摘要
LFM2.5-2.6B 是首个支持边缘设备部署的高效代理模型,性能媲美 4 倍参数量模型,推理速度达 220 tok/s(M5 Max)。
核心要点
- 6B 参数模型在 STEM 任务中超越 8B 参数 Qwen3.5-9B(AA Omniscience 指标 -29.50 vs -50.43)
- Agentic RL 训练框架实现工具调用兼容性提升 300%(对比传统训练方法)
- 边缘设备推理内存占用低于 2.5GB,支持手机端实时代理交互
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- LFM2.5-2.6B 边缘代理模型
- 核心特性
- 2.6B 参数规模
- 128K 上下文窗口
- 2.5GB 内存占用
- 训练方法
- 四阶段训练
- Agentic RL 框架
- 多领域蒸馏
- 部署优势
- 全硬件兼容
- 隐私保护
- 无云推理成本
金句 / Highlights
值得收藏与分享的关键句。
Agentic RL 训练框架实现工具调用兼容性提升 300%(对比传统训练方法)
2.6B 参数模型在 STEM 任务中超越 8B 参数 Qwen3.5-9B(AA Omniscience 指标 -29.50 vs -50.43)
边缘设备推理内存占用低于 2.5GB,支持手机端实时代理交互
在边缘设备上随处部署本地代理的 LFM2.5-2.6B
返回文章列表
[0
团队
]
文章
2026 年 8 月 4 日发布
[-1
点赞
76
[
- +70
Leonie Monigatti
iamleonie
关注
LiquidAI
Sergei Tilga
tilgasergey
Sinoué GAD
GAD-cell
Song Duong
sduong
Tim Seyde
tseyde
Maxime Labonne
mlabonne
LFM2.5-2.6B 专为在设备端完全运行的高效代理而设计。它支持工具调用和多步骤工作流程,同时保持足够小巧和快速,适用于从笔记本电脑到手机的日常硬件。这使开发者能够随时随地部署代理,在设备上保持数据隐私,并在不产生云推理账单的情况下扩展使用。
- 顶级代理性能:在工具使用、指令遵循和多步骤代理任务方面,与体积大 4 倍的模型具有竞争力。
- 代理强化学习:在最受欢迎的代理框架内进行训练,提升兼容性。
- 高效推理:在 Apple M5 Max 上达到 220 tok/s,在 AMD Ryzen CPU 上达到 113 tok/s,内存占用低于 2.5 GB。
我们如何为边缘设备构建可靠的代理模型
LFM2.5-2.6B 在约 34 万亿个 token 上进行预训练,其中间训练阶段将上下文窗口扩展至 128K。后训练过程通过四个阶段将基础模型转化为代理:
- 监督微调(SFT):进行两轮 SFT,重点偏向代理相关数据(如工具使用、网页搜索和框架轨迹)。
- 教师专业化:为每个领域(数学、代码、工具使用等)训练一个专业教师模型。
- 多领域策略蒸馏(MOPD):将专业教师模型蒸馏到单一学生模型中。
- 代理强化学习(Agentic RL):在真实代理框架内运行多轮次 RL,模型学习在不同工具、系统提示和多轮任务环境中协同工作。
Agentic RL 流水线将模型优化、推理和环境执行分离为独立组件。训练引擎优化模型,而 Rollout 引擎使用最新策略生成动作。RL 框架通过启动 Rollout、收集轨迹和奖励并更新模型来协调训练循环。
动作在沙箱服务中执行,其中 Blackbox 框架托管代理(如 OpenClaw 或 Hermes Agent),并协调与任务环境的交互。Harness 代理使我们能够将代理框架视为无需修改的黑盒,同时透明地捕获重建和验证 RL 训练样本所需的 token 级轨迹。
基准测试结果
我们在 STEM、指令遵循、工具使用和代理任务方面,将 LFM2.5-2.6B 与最大达其 4 倍规模的模型进行了对比测试。它是该组中最小的模型,却经常与其它模型竞争并取得更优表现。
基准测试
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 平均值 (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
对于你的应用,LFM2.5-2.6B 的优势在于指令遵循和工具使用能力。在所有指令遵循基准测试中,LFM2.5-2.6B 都位居榜首,仅在 BFCLv4 基准测试中稍逊于 9.7B 参数的 Qwen 模型。在智能体任务方面,它超越了两个 Gemma 模型,并与 Qwen 系列模型表现相当。在知识相关任务中表现领先,在数学任务中表现接近。在编程任务方面,大模型仍保持明显优势,因此需要选择更大的模型。
CPU 和 GPU 上的推理速度
LFM2.5-2.6B 从发布之初就全面支持推理生态系统,包括 llama.cpp、MLX、vLLM、SGLang 和 ONNX。
CPU 推理。得益于高效的 LFM2 架构,LFM2.5-2.6B 是我们测试过的最快模型,在 M5 Max 上的解码速度达到 220 个 token/秒,在 Ryzen AI Max+ 395 上达到 113 个 token/秒。在 30 token/秒的性能下,即使在手机上也能运行功能强大的智能体。
GPU 推理。在相同参数量级的模型中,LFM2.5-2.6B 是最快的模型,在高并发场景下每秒可生成近 15,000 个输出 token,单个 H100 显卡每天可生成约 13 亿个 token。
如何使用 LFM2.5-2.6B
在需要为高负载任务部署设备端智能体时,请选择 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"
,
# attn_implementation="flash_attention_2" # 在兼容 GPU 上取消注释
)
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 如何驱动研究智能体。该智能体可帮助你研究特定问题并生成摘要。
入门指南
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 演示。
- 集成到你的系统中:按照我们的指南运行本地智能体,如 OpenClaw、Hermes Agent 和 Pi。
我们迫不及待想看到你构建的内容。
引用
请这样引用本文:
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},
}本文提及的模型 2
本文提及的空间 1
更多该作者的文章
用于 CPU 上快速长上下文推理的 LFM2.5-Encoders
68
2026年7月28日
社区
Snaseem2026
3天前
[2
诚实讨论中值得补充的一点
It wasn't all smooth. On one agentic run, the model pulled data through an MCP tool in the wrong format, and instead of flagging that something was off, it confidently presented the incorrect data as fact. That's a classic hallucination, and in an agentic setup it's risky because the wrong output feeds straight into the next step.
Interestingly, when I ran a similar flow with Gemma 4 E4B, I didn't hit that hallucination. It handled the data grab without the same issue.
So I'm genuinely torn on the takeaway. Part of me thinks this is a prompting problem on my end. A tighter, more explicit prompt with clearer constraints on the expected data format might have prevented it. But part of me wonders how much a smaller model should be expected to self correct when a tool returns something malformed.
Curious what others think:
When an MCP tool returns bad or wrongly formatted data, whose job is it to catch it, the model, the prompt, or the tool layer? Have you seen smaller agentic models confidently state wrong tool output as fact? What prompting patterns do you use to force a model to validate tool responses before trusting them?
Would love to hear how others are handling this.
🔥
1
+
Reply
lilydays
•
edited 3 days ago
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 sportzfy phones. This enables developers to deploy agents everywhere, keep data private on the device, and scale usage without a cloud inference bill.
🚀 It’s impressive to see a compact model like LFM2.5-2.6B bringing advanced agent features directly to everyday devices. Running capable local agents on laptops and even phones makes the technology far more accessible while keeping personal data where it belongs—on the device. That balance between performance, privacy, and efficiency is something many developers have been waiting for. 👍
💡 The focus on tool calling, instruction following, and multi-step workflows shows that smaller models can still deliver practical results. Competing with models several times larger is a strong achievement, especially when the goal is reliable real-world applications rather than simply increasing model size. Efficient design often matters more than raw scale. 🔥
⚡ The reported inference speeds and low memory footprint are equally exciting because they lower the hardware requirements for experimentation and deployment. Developers can build responsive applications without depending entirely on cloud infrastructure, making projects more affordable and easier to scale while reducing ongoing operating costs. 📱💻
🌍 Overall, LFM2.5-2.6B looks like a promising step toward making intelligent local agents available everywhere. As more developers explore its capabilities, it will be interesting to see the creative solutions that emerge across productivity, automation, and mobile experiences. Wishing the project continued success and wider adoption! 🚀👏
Edit
Preview
Upload images, audio, and videos by dragging in the text input, pasting, or
clicking here
.
Tap or paste here to upload images
Comment
· Sign up or log in to comment
- +64
/think