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

缓存与蒸馏:优化面向大型语言模型的 API 调用

Cache & Distil: Optimising API Calls to Large Language Models

ILCC, University of Edinburgh(ILCC、爱丁堡大学);ILLC, University of Amsterdam(ILLC、阿姆斯特丹大学)

Guillem Ramírez, Matthias Lindemann, Alexandra Birch, Ivan Titov

AI总结:

本文提出神经缓存方法,用持续训练的学生模型减少LLM API调用,并采用主动学习策略(边际采样和查询委员会)决定请求分配,实验证明其在分类任务上效果稳定。

摘要:

生成式人工智能工具的大规模部署,往往依赖于对大型语言模型(LLM)的高成本 API 调用,以满足用户查询。为降低这些调用的频率,可以采用一个较小的语言模型——即学生模型——它持续基于 LLM 的响应进行训练。该学生模型逐渐获得独立处理越来越多用户请求的能力,我们将这一过程称为神经缓存。神经缓存的关键要素是一个策略,该策略决定哪些请求应仅由学生模型处理,哪些应被重定向至 LLM,并随后辅助学生模型的学习。在本研究中,我们聚焦于分类任务,并考虑一系列经典的基于主动学习的选择标准作为该策略。我们的实验表明,边际采样和查询委员会在不同任务和预算下均能带来一致的收益。

英文摘要:

Large-scale deployment of generative AI tools often depends on costly API calls to a Large Language Model (LLM) to fulfil user queries. To curtail the frequency of these calls, one can employ a smaller language model -- a student -- which is continuously trained on the responses of the LLM. This student gradually gains proficiency in independently handling an increasing number of user requests, a process we term neural caching. The crucial element in neural caching is a policy that decides which requests should be processed by the student alone and which should be redirected to the LLM, subsequently aiding the student's learning. In this study, we focus on classification tasks, and we consider a range of classic active learning-based selection criteria as the policy. Our experiments suggest that Margin Sampling and Query by Committee bring consistent benefits across tasks and budgets.

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

↑