苍蝇拍还是大炮?通过元建模实现高性价比的语言模型选择
Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modeling
AI总结:
本文提出FORC框架,利用元模型按输入难度在不同规模候选LM间分配任务,可灵活调节成本与性能,并在14个数据集上以降低63%成本匹配最大模型性能。
摘要:
生成式语言模型(LM)在数据科学领域已无处不在。对于各种各样的任务,输入都可以表述为给LM的自然语言提示,随后可从其输出中提取解决方案。LM的性能一直随着模型规模增大而提升,但查询这些越来越大的模型所需的金钱成本也在增加。然而重要的是,并非所有输入都同样困难:有些输入需要更大的LM才能获得令人满意的解决方案,而对其他输入而言较小的LM就足够了。基于这一事实,我们设计了一个用于高性价比语言模型选择的框架,称为“Fly-swat or cannon”(FORC)。给定一组输入和一组候选LM,FORC根据所谓的元模型(meta-model),审慎地将每个输入分配给一个被预测会在该输入上表现良好的LM,旨在以低成本实现较高的整体性能。成本与性能之间的权衡可由用户灵活调节。选项包括但不限于:在给定成本预算内最大化总预期性能(或已处理输入的数量),或者在处理所有输入的同时最小化总成本。我们使用规模和成本差异巨大的四个候选LM,在涵盖五项自然语言任务的14个数据集上评估了FORC。借助FORC,我们在达到与可用的最大LM相同性能的同时,实现了63%的成本降低。通过我们公开提供的库,研究人员和从业者因此可以在不牺牲性能的情况下节省大量资金。
英文摘要:
Generative language models (LMs) have become omnipresent across data science. For a wide variety of tasks, inputs can be phrased as natural language prompts for an LM, from whose output the solution can then be extracted. LM performance has consistently been increasing with model size - but so has the monetary cost of querying the ever larger models. Importantly, however, not all inputs are equally hard: some require larger LMs for obtaining a satisfactory solution, whereas for others smaller LMs suffice. Based on this fact, we design a framework for cost-effective language model choice, called "Fly-swat or cannon" (FORC). Given a set of inputs and a set of candidate LMs, FORC judiciously assigns each input to an LM predicted to do well on the input according to a so-called meta-model, aiming to achieve high overall performance at low cost. The cost-performance tradeoff can be flexibly tuned by the user. Options include, among others, maximizing total expected performance (or the number of processed inputs) while staying within a given cost budget, or minimizing total cost while processing all inputs. We evaluate FORC on 14 datasets covering five natural language tasks, using four candidate LMs of vastly different size and cost. With FORC, we match the performance of the largest available LM while achieving a cost reduction of 63%. Via our publicly available library, researchers as well as practitioners can thus save large amounts of money without sacrificing performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。