arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.13395cs.CL
收藏

如果你能就缓存我:一个在线成本感知的师生框架,用于减少对大型语言模型的调用

Cache me if you Can: an Online Cost-aware Teacher-Student framework to Reduce the Calls to Large Language Models

Athens University of Economics and Business(雅典经济与商业大学);Athena Research Center(雅典娜研究中心);Workable

Ilias Stogiannidis, Stavros Vassos, Prodromos Malakasiotis, Ion Androutsopoulos

AI总结:

本文提出在线成本感知的师生框架,通过缓存LLM响应训练本地廉价模型,并制定信任标准以减少中小企业调用LLM的运营成本,实验证明在性能略降下可显著节省支出。

摘要:

提示大型语言模型(LLMs)在零样本和少样本设置中表现出色。因此,无法承担创建大型任务特定训练数据集成本,也无法承担预训练自己LLMs成本的中小企业(SMEs),正越来越多地转向允许它们提示LLMs的第三方服务。然而,此类服务目前需要按调用付费,这成为了一项重大的运营支出(OpEx)。此外,客户的输入随时间推移往往非常相似,因此SMEs最终会用非常相似的实例提示LLMs。我们提出了一个框架,通过缓存先前的LLM响应并使用它们在SME端训练一个本地廉价模型,来减少对LLMs的调用。该框架包括决定何时信任本地模型或调用LLM的标准,以及调整这些标准并衡量性能与成本之间权衡的方法。出于实验目的,我们用两个LLMs(GPT-3.5或GPT-4)和两个廉价学生模型(k-NN分类器或多层感知机)实例化了我们的框架,使用两个常见业务任务:意图识别和情感分析。实验结果表明,仅以略低的性能即可获得显著的OpEx节省。

英文摘要:

Prompting Large Language Models (LLMs) performs impressively in zero- and few-shot settings. Hence, small and medium-sized enterprises (SMEs) that cannot afford the cost of creating large task-specific training datasets, but also the cost of pretraining their own LLMs, are increasingly turning to third-party services that allow them to prompt LLMs. However, such services currently require a payment per call, which becomes a significant operating expense (OpEx). Furthermore, customer inputs are often very similar over time, hence SMEs end-up prompting LLMs with very similar instances. We propose a framework that allows reducing the calls to LLMs by caching previous LLM responses and using them to train a local inexpensive model on the SME side. The framework includes criteria for deciding when to trust the local model or call the LLM, and a methodology to tune the criteria and measure the tradeoff between performance and cost. For experimental purposes, we instantiate our framework with two LLMs, GPT-3.5 or GPT-4, and two inexpensive students, a k-NN classifier or a Multi-Layer Perceptron, using two common business tasks, intent recognition and sentiment analysis. Experimental results indicate that significant OpEx savings can be obtained with only slightly lower performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑