用预测提前终止和模型热切换,让小模型代理更省钱还更准。
Atropos: Improving Cost-Benefit Trade-off of LLM-based Agents under Self-Consistency with Early Termination and Model Hotswap
- 基于图卷积网络预测推理能否成功,中途失败就换大模型
- 中点预测准确率85%,27.57%原本失败的任务被救活
- 性能达闭源大模型74.35%,成本仅需23.9%
开源的小型语言模型(SLMs)能以更低的财务成本实现更快的本地推理,但性能通常不及规模大几个数量级的商业大语言模型(LLMs)。因此,许多最新大模型应用(如软件工程代理)仅在大模型上评估,忽视了提升其性价比的问题。本文提出 Atropos,一种基于预测的早期终止与模型热切换技术,用于改进使用自一致性的大模型代理的性价比。核心是利用图卷积网络(GCN),通过将多个代理推理路径合并为图表示,预测当前推理是否最终会失败。若预测失败,则立即进行热切换,将推理上下文迁移到更强的靶向大模型——这可行因大模型上下文是无状态的。在三个近期大模型代理上的实证评估显示,Atropos 在推理中点即可以0.85的准确率预测失败推理;对这些任务进行热切换,可使高达27.57%的失败推理转为成功。最终,Atropos 实现了闭源大模型74.35%的性能,而成本仅为23.9%。
原文摘要 · Abstract (English)
Open-weight Small Language Models(SLMs) can provide faster local inference at lower financial cost, but may not achieve the same performance level as commercial Large Language Models (LLMs) that are orders of magnitudes larger. Consequently, many of the latest applications of LLMs, such as software engineering agents, tend to be evaluated on larger models only, leaving the issue of improving the cost-benefit trade-off of such applications neglected. This paper proposes Atropos, a predictive early-termination analysis and hotswap technique that aims to improve the cost-benefit trade-off for LLM-based agents that use self-consistency. The core component of ATROPOS is a predictive model based on structural properties of LLM inferences: after merging multiple agentic inference paths into a graph representation, ATROPOS uses Graph Convolutional Network (GCN) to predict whether an ongoing inference will eventually succeed or not. If an agentic task instance running on the source LLM is predicted to fail, ATROPOS subsequently performs hotswapping, i.e., migrating the on-going inference context onto the more capable target LLM: this is feasible because LLM contexts are stateless. An empirical evaluation of ATROPOS using three recent LLM-based agents shows that ATROPOS can predict early termination of eventually failing inferences with the accuracy of 0.85 at the midpoint of the inference. Hotswapping LLMs for such inferences can convert up to 27.57% of them to be successful. Consequently, ATROPOS achieves 74.35% of the performance of closed LLMs with as low as only 23.9% of the cost.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。