HuggingFace Blog HuggingFace ★ 102 3 min

Deploy local agents everywhere with LFM2.5-2.6B

🔗 https://huggingface.co/blog/LiquidAI/lfm2-5-2-6b

📌 【LiquidAI 新作】LFM2.5-2.6B 登場:在手機與筆電上,跑出媲美 4 倍大模型的 Agent 能力

TL;DR:LFM2.5-2.6B 專為邊緣設備設計,在指令遵循與工具使用上可與大 4 倍的模型競爭。

當開發者追求 AI 代理(Agent)的反應速度與資料隱私時,雲端推論的延遲與成本往往是最大的阻礙。LiquidAI 推出的 LFM2.5-2.6B 旨在打破這個僵局,讓具備工具調用(tool calling)與多步工作流(multi-step workflows)能力的代理,能直接在筆電甚至手機等個人裝置上運行。

🧩 四階段訓練流程:打造可靠的邊緣端代理

LFM2.5-2.6B 的核心競爭力來自於其精密的後訓練(post-training)流程,將基座模型轉化為強大的代理模型:

  1. 監督式微調 (SFT):進行兩輪 SFT,重點強化工具使用、網路搜尋與任務軌跡(trajectories)等代理相關數據。
  2. 教師專門化 (Teacher Specialization):針對數學、程式碼、工具使用等不同領域,各訓練一位專家級的教師模型。
  3. 多領域在策略蒸餾 (MOPD):將這些專家教師的能力,蒸餾到單一的學生模型中。
  4. 代理強化學習 (Agentic RL):在真實的代理框架中進行多輪強化學習,讓模型學習如何在不同的工具、系統提示詞(system prompts)與多輪任務環境中協作。

💡 效能驚人:小體積卻能挑戰 4 倍大的對手

LFM2.5-2.6B 雖然參數僅 2.6B,但在多項關鍵指標上展現了極高的效率,甚至在某些測試中超越了參數規模大其 4 倍的模型:

📊 關鍵基準測試表現

測試項目LFM2.5-2.6B (2.6B)Gemma-4-E2B-it (5.1B)Qwen3.5-9B (9.7B)
指令遵循 (IFBench)59.1734.0856.47
工具使用 (ToolSandbox)77.8352.4076.44
數學能力 (AIME25)51.8726.3356.07

註:LFM2.5-2.6B 在指令遵循與工具使用方面表現卓越,僅在 BFCLv4 與編寫程式碼(Coding)領域略遜於超大型模型。

🚀 極速推論:裝置端運行的最佳解

得益於 LFM2 架構,該模型在各種硬體上皆有極佳的表現,且記憶體佔用低於 2.5 GB:

  • Apple M5 Max:解碼速度達 220 tokens/s。
  • AMD Ryzen CPU:解碼速度達 113 tokens/s。
  • 行動裝置:在 30 tokens/s 的速度下,仍能運行具備能力的代理。
  • 高併發 GPU:在單張 H100 上,高併發情況下每秒可輸出近 15K tokens。

🎯 實務啟示

如果你正在開發需要高頻率執行、且對隱私敏感的應用程式(例如個人助理、本地文件處理、自動化工作流),LFM2.5-2.6B 提供了一個極具成本效益的選擇。它讓開發者無需支付昂貴的雲端推論費用,就能在使用者裝置上直接部署強大的 Agent。

🔗 來源

#AI #Agent #LiquidAI #EdgeAI #OnDeviceAI #MachineLearning #LLM #HuggingFace #LocalAI #ReinforcementLearning

原始資料 HuggingFace Blog · 收集於 2026-08-05
來源原標題
Deploy local agents everywhere with LFM2.5-2.6B
機構
HuggingFace
原始連結
https://huggingface.co/blog/LiquidAI/lfm2-5-2-6b

摘要原文

Back to Articles Deploy local agents everywhere with LFM2.5-2.6B Team Article Published August 4, 2026 Upvote 24 +18 Leonie Monigatti iamleonie Follow LiquidAI Sergei Tilga tilgasergey Follow LiquidAI Sinoué GAD GAD-cell Follow LiquidAI Song Duong sduong Follow LiquidAI Tim Seyde tseyde Follow LiquidAI Maxime Labonne mlabonne Follow LiquidAI 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. 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: Supervised fine-tuning (SFT): two rounds of SFT, weighted heavily toward agentic data like tool use, web search, and harness trajectories. Teacher specialization: train one specialist teacher per domain (math, code, tool use, and more). Multi-domain on-policy distillation (MOPD): distill the specialist teachers into a single student. 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. 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. 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. 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. 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" , # attn_implementation="flash_attention_2" # uncomment on a compatible 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 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}, }

tencent/hy3:free 自動生成