自动选模型层级,省钱又准
Automatic Transmission for LLM Tiers: Optimizing Cost and Accuracy in Large Language Models
- 不训练直接选合适模型层级,动态升级直到答对
- 通过历史相似问题预估各层级准确率,选初始层级更准
- 实测在保证效果前提下显著降本,适合生产部署
大语言模型服务通常提供多个性能与价格不同的模型层级。随着自然语言处理任务日益复杂和模块化,为每个子任务选择合适的模型层级成为平衡成本与性能的关键挑战。为此,我们提出无需训练的 LLM Automatic Transmission(LLM-AT)框架,包含起始器、生成器和裁判三部分。起始器根据问题初步选定一个预期能解答的模型层级,生成器使用该层级模型生成回答,裁判评估回答有效性;若无效,则迭代升级至更高层级,重新生成并评估,直至获得有效回答。此外,我们提出准确率估算器,通过计算过去推理记录中与当前问题前k个最相似查询的有效响应率,预估各层级的期望准确率,实现无需训练的初始层级优选。实验表明,LLM-AT在保持优异性能的同时显著降低使用成本,是实际应用中的高效解决方案。
原文摘要 · Abstract (English)
LLM providers typically offer multiple LLM tiers, varying in performance and price. As NLP tasks become more complex and modularized, selecting the suitable LLM tier for each subtask is a key challenge to balance between cost and performance. To address the problem, we introduce LLM Automatic Transmission (LLM-AT) framework that automatically selects LLM tiers without training. LLM-AT consists of Starter, Generator, and Judge. The starter selects the initial LLM tier expected to solve the given question, the generator produces a response using the LLM of the selected tier, and the judge evaluates the validity of the response. If the response is invalid, LLM-AT iteratively upgrades to a higher-tier model, generates a new response, and re-evaluates until a valid response is obtained. Additionally, we propose accuracy estimator, which enables the suitable initial LLM tier selection without training. Given an input question, accuracy estimator estimates the expected accuracy of each LLM tier by computing the valid response rate across top-k similar queries from past inference records. Experiments demonstrate that LLM-AT achieves superior performance while reducing costs, making it a practical solution for real-world applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。