LFM2.5-2.6B 是 LFM2.5 系列的一部分,该系列是专为设备端部署设计的混合模型。它基于 LFM2 架构构建,拥有 128K 上下文窗口和智能体化后训练。
有关 LFM2.5-2.6B 的更多信息,请参见我们的 博客文章。

[!NOTE] 💻 演示:无需任何设置,即可在 Hugging Face 空间中体验 LFM2.5-2.6B 的智能体能力: 浏览器中的研究智能体:帮助您研究特定问题并生成摘要
| 模型 | 参数规模 | 描述 |
|---|---|---|
| LFM2.5-2.6B-Base | 2.6B | 用于微调的预训练基础模型 |
| LFM2.5-2.6B | 2.6B | 针对智能体工作负载进行后训练 |
LFM2.5-2.6B 是一个通用纯文本模型,具有以下特点:
temperature: 0.1top_k: 50repetition_penalty: 1.1| 模型 | 描述 |
|---|---|
| LFM2.5-2.6B | 原生格式的原始模型 checkpoint。最适合使用 Transformers、vLLM 和 SGLang 进行微调或推理。 |
| LFM2.5-2.6B-GGUF | 适用于 llama.cpp 及兼容工具的量化格式。针对 CPU 推理和本地部署进行优化,降低了内存占用。 |
| LFM2.5-2.6B-ONNX | 用于跨平台部署的 ONNX Runtime 格式。支持在各种环境(云、边缘、移动设备)中进行硬件加速推理。 |
| LFM2.5-2.6B-MLX | 适用于 Apple Silicon 的 MLX 格式。利用 MLX 框架在 Mac 设备上实现快速推理优化。 |
我们建议将其用于智能体工作负载、工具使用、数据提取、RAG 和长上下文工作流。不建议将其用于智能体编码和知识密集型任务。
LFM2.5采用类ChatML格式。详情请参见聊天模板文档。示例:
<|startoftext|><|im_start|>system
You are a helpful assistant trained by Liquid AI.<|im_end|>
<|im_start|>user
What is C. elegans?<|im_end|>
<|im_start|>assistant你可以使用 tokenizer.apply_chat_template() 自动格式化消息。
[!TIP] 💡 注意:LFM2.5-2.6B 是一个纯推理模型,在回答前始终会进行思考。在开始助手回答时,它会在 聊天模板 中直接添加
</think>标签。
LFM2.5 支持通过四个步骤进行函数调用:
tools=... 参数的 tokenizer.apply_chat_template()。<|tool_call_start|> 和 <|tool_call_end|> 特殊标记之间的 Python 列表)作为助手回答。你可以在系统提示中要求模型输出 JSON 格式的函数调用来覆盖此行为。tool 角色返回结果。完整指南请参见 工具使用文档。示例:
<|startoftext|><|im_start|>system
List of tools: [{"name": "get_candidate_status", "description": "Retrieves the current status of a candidate in the recruitment process", "parameters": {"type": "object", "properties": {"candidate_id": {"type": "string", "description": "Unique identifier for the candidate"}}, "required": ["candidate_id"]}}]<|im_end|>
<|im_start|>user
What is the current status of candidate ID 12345?<|im_end|>
<|im_start|>assistant
<|tool_call_start|>[get_candidate_status(candidate_id="12345")]<|tool_call_end|>Checking the current status of candidate ID 12345.<|im_end|>
<|im_start|>tool
[{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}]<|im_end|>
<|im_start|>assistant
The candidate with ID 12345 is currently in the "Interview Scheduled" stage for the position of Clinical Research Associate, with an interview date set for 2023-11-20.<|im_end|>LFM2.5-2.6B 在约34T tokens上进行预训练,其中包含一个将上下文窗口扩展至128K的中期训练阶段。随后的训练通过四个阶段将基础模型转变为智能体:监督微调(两轮)、特定领域教师模型专业化、多领域在线策略蒸馏以及智能体强化学习。

特别是智能体强化学习,使我们能够在主流的智能体框架内直接训练模型。这让模型接触到这些框架的工具、系统提示和交互模式,有助于其在各类智能体环境中实现可靠运行。

LFM2.5 支持多种推理框架。完整列表请参见推理文档。
| 名称 | 描述 | 文档 | 笔记本 |
|---|---|---|---|
| Transformers | 可直接访问模型内部结构的简单推理。 | 链接 | ![]() |
| vLLM | 基于GPU的高吞吐量生产部署。 | 链接 | ![]() |
| llama.cpp | 支持CPU卸载的跨平台推理。 | 链接 | ![]() |
| MLX | Apple 的机器学习框架,针对 Apple Silicon 优化。 | 链接 | — |
| LM Studio | 用于本地运行 LLM 的桌面应用程序。 | 链接 | — |
| SGLang | 基于GPU的高吞吐量生产部署。 | 链接 | - |
使用 Transformers 快速开始(兼容 transformers>=5.0.0):
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
model_id = "LiquidAI/LFM2.5-2.6B"
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.1,
max_new_tokens=512,
streamer=streamer,
)为获得最佳效果,我们建议针对您的特定使用场景对 LFM2.5 进行微调。
| 名称 | 描述 | 文档 | 笔记本 |
|---|---|---|---|
| CPT(Unsloth) | 使用 Unsloth 进行文本补全的持续预训练。 | 链接 | ![]() |
| CPT(Unsloth) | 使用 Unsloth 进行翻译的持续预训练。 | 链接 | ![]() |
| SFT(Unsloth) | 使用 Unsloth 进行带 LoRA 的监督微调。 | 链接 | ![]() |
| SFT(TRL) | 使用 TRL 进行带 LoRA 的监督微调。 | 链接 | ![]() |
| DPO(TRL) | 使用 TRL 进行带 LoRA 的直接偏好优化。 | 链接 | ![]() |
| GRPO(TRL) | 使用 TRL 进行带 LoRA 的 GRPO。 | 链接 | ![]() |
我们在一系列多样化的基准测试中,将LFM2.5-2.6B与相关的100亿参数以下模型进行了对比。
| 基准测试 | 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-Omni-Public Index | -29.50 | -74.47 | -49.03 | -54.30 | -50.43 |
| AA-Omni-Public Acc | 8.13 | 6.37 | 8.33 | 17.63 | 21.30 |
| AA-Omni-Public Non-hallu | 59.04 | 13.67 | 37.42 | 12.66 | 8.84 |
| 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 |
得益于其高效的LFM2架构,LFM2.5-2.6B是我们测试过的速度最快的模型,在M5 Max上的解码速度为220 tokens/s,在Ryzen AI Max+ 395上为113 tokens/s。即使在手机上,以30 tokens/s的速度运行,也能支持功能完备的智能体。

LFM2.5-2.6B是同尺寸模型中速度最快的,在高并发情况下,输出 tokens 速度接近15K/秒,在单张H100上每天大约可处理13亿 tokens。

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