小模型在智能体任务中表现更优,成本低且效率高。
Small Language Models for Agentic Systems: A Survey of Architectures, Capabilities, and Deployment Trade offs
- 用小模型默认处理任务,大模型仅在必要时介入
- 严格结构化输出让小模型工具调用性能接近大模型
- 适合追求低成本、低延迟的生产级智能体系统
小型语言模型(SLMs;1-12B参数,有时达20B)在以模式和API约束为核心的智能体任务中已足够甚至更优。我们综合了开源与专有SLM(如Phi-4-Mini、Qwen-2.5-7B、Gemma-2-9B、Llama-3.2-1B/3B、Ministral-3B/8B、Apple设备端3B、DeepSeek-R1-Distill)的最新证据,并关联现代评估基准(BFCL v3/v4、StableToolBench)与推理栈(vLLM、SGLang、TensorRT-LLM)及引导解码库(XGrammar、Outlines)。提出基于不确定性路由与验证器级联的SLM默认、LLM回退系统,定义了反映真实生产目标的工程指标:每成功任务成本(CPS)、模式有效率、可执行调用率、p50/p95延迟、每请求能耗。引导解码、严格JSON Schema输出与验证器优先的工具执行,显著缩小了与大模型的能力差距,使小模型在工具使用、函数调用、RAG任务中达到或超越大模型,同时实现10-100倍更低的令牌成本,显著提升延迟与能效。提供以小模型为核心的智能体架构设计模式:模式优先提示、类型安全函数注册表、置信度评分与验证器汇总、通过LoRA/QLoRA轻量适配。也明确指出回退仍具价值的场景(开放域推理与长周期规划)。最终形成一个实用蓝图,构建快速、廉价、可靠的智能体系统,以小模型为主,辅以针对性大模型支持。
原文摘要 · Abstract (English)
Small language models (SLMs; 1-12B params, sometimes up to 20B) are sufficient and often superior for agentic workloads where the objective is schema- and API-constrained accuracy rather than open-ended generation. We synthesize recent evidence across open and proprietary SLMs (Phi-4-Mini, Qwen-2.5-7B, Gemma-2-9B, Llama-3.2-1B/3B, Ministral-3B/8B, Apple on-device 3B, DeepSeek-R1-Distill) and connect it to modern evaluations (BFCL v3/v4, StableToolBench) and serving stacks (vLLM, SGLang, TensorRT-LLM) paired with guided decoding libraries (XGrammar, Outlines). We formalize SLM-default, LLM-fallback systems with uncertainty-aware routing and verifier cascades, and propose engineering metrics that reflect real production goals: cost per successful task (CPS), schema validity rate, executable call rate, p50/p95 latency, and energy per request. Guided decoding, strict JSON Schema outputs, and validator-first tool execution close much of the capability gap with larger models and often let SLMs match or surpass LLMs on tool use, function calling, and RAG at 10x-100x lower token cost with materially better latency and energy. We provide design patterns for agent stacks that prioritize SLMs: schema-first prompting, type-safe function registries, confidence scoring with verifier rollups, and lightweight adaptation via LoRA/QLoRA. We also delineate limits where fallback remains valuable (open-domain reasoning and some long-horizon planning). The result is a practical blueprint for building fast, inexpensive, and reliable agents that default to SLMs while preserving headroom with targeted LLM assistance. Keywords: small language models, agents, function calling, structured outputs, JSON Schema, guided decoding, LoRA/QLoRA, routing, energy efficiency, edge inference
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。