小模型经精调后在工具调用上超越大模型,更省钱高效。
Small Language Models for Efficient Agentic Tool Calling: Outperforming Large Models with Targeted Fine-tuning
- 用小模型做针对性微调,替代大模型执行具体任务。
- 微调后小模型在ToolBench上通过率达77.55%,远超大模型基准。
- 适合追求低成本、高效率部署的企业级AI应用。
随着生成式AI在组织中规模化应用,模型成本优化与运行效率成为决定可持续性和可及性的关键因素。尽管大语言模型(LLMs)在多种任务中表现优异,但其高昂的计算需求使其难以用于日常企业场景。为此,本文探索小型语言模型(SLMs)的可行性:通过领域适配微调,使小模型完成传统由大模型处理的任务,如文档摘要、问答和结构化数据解析。实验中,仅使用单轮次监督微调(SFT),对Meta AI发布的facebook/opt-350m模型进行训练,采用Hugging Face TRL框架。结果表明,该微调后的小模型在ToolBench评测中达到77.55%的通过率,显著优于所有基线模型,包括ChatGPT-CoT(26.00%)、ToolLLaMA-DFS(30.18%)和ToolLLaMA-CoT(16.27%)。研究证明,经过精心设计与针对性训练的小模型,能有效降低部署门槛,推动生成式AI在生产系统中的低成本大规模应用。
原文摘要 · Abstract (English)
As organizations scale adoption of generative AI, model cost optimization and operational efficiency have emerged as critical factors determining sustainability and accessibility. While Large Language Models (LLMs) demonstrate impressive capabilities across diverse tasks, their extensive computational requirements make them cost-prohibitive for routine enterprise use. This limitation motivates the exploration of Small Language Models (SLMs), which can deliver comparable performance in targeted applications while drastically reducing infrastructure overhead (Irugalbandara et al., 2023). In this work, we investigate the feasibility of replacing LLM-driven workflows with optimized SLMs. We trained a domain-adapted SLM to execute representative tasks traditionally handled by LLMs, such as document summarization, query answering, and structured data interpretation. As part of the experiment, we investigated the fine-tuning of facebook/opt-350m model (single epoch only) using the Hugging Face TRL (Transformer Reinforcement Learning), specifically the Supervised Fine-Tuning (SFT) trainer. The OPT-350M model was released by Meta AI in 2022 as part of the OPT (Open Pretrained Transformer) family of models. Similar studies demonstrate that even models at the 350M parameter scale can meaningfully contribute to instruction-tuning pipelines (Mekala et al., 2024). Experimental results demonstrated that our fine-tuned SLM achieves exceptional performance with a 77.55\% pass rate on ToolBench evaluation, significantly outperforming all baseline models including ChatGPT-CoT (26.00\%), ToolLLaMA-DFS (30.18\%), and ToolLLaMA-CoT (16.27\%). These findings emphasize that thoughtful design and targeted training of SLMs can significantly lower barriers to adoption, enabling cost-effective, large-scale integration of generative AI into production systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。