Skip to main content
QUICK REVIEW

[论文解读] Improving Large Models with Small models: Lower Costs and Better Performance

Chen Dong, Shuo Zhang|arXiv (Cornell University)|Jun 15, 2024
Scientific Computing and Data ManagementDecision Sciences被引用 3
一句话总结

本文提出 Data Shunt+(DS+),一种协作框架,通过基于预测置信度将简单输入卸载至小型模型,从而在将大型语言模型(LLMs)的推理成本降低68.82%的同时,将亚马逊情感分析任务的准确率从仅使用 ChatGPT 的 94.43% 提升至 95.64%。该方法通过动态路由与知识蒸馏,实现了成本更低、性能更强的推理。

ABSTRACT

Pretrained large models (PLMs), such as ChatGPT, have demonstrated remarkable performance across diverse tasks. However, the significant computational requirements of PLMs have discouraged most product teams from running or fine-tuning them. In such cases, to harness the exceptional performance of PLMs, one must rely on expensive APIs, thereby exacerbating the economic burden. Despite the overall inferior performance of small models, in specific distributions, they can achieve comparable or even superior results. Consequently, some input can be processed exclusively by small models. On the other hand, certain tasks can be broken down into multiple subtasks, some of which can be completed without powerful capabilities. Under these circumstances, small models can handle the simple subtasks, allowing large models to focus on challenging subtasks, thus improving the performance. We propose Data Shunt$^+$ (DS$^+$), a general paradigm for collaboration of small and large models. DS$^+$ not only substantially reduces the cost associated with querying large models but also effectively improves large models' performance. For instance, ChatGPT achieves an accuracy of $94.43\%$ on Amazon Product sentiment analysis, and DS$^+$ achieves an accuracy of $95.64\%$, while the cost has been reduced to only $31.18\%$. Besides, experiments also prove that the proposed collaborative-based paradigm can better inject specific task knowledge into PLMs compared to fine-tuning.

研究动机与目标

  • 降低大型预训练语言模型(PLMs)在实际产品部署中高昂的推理成本。
  • 通过为分布一致的简单输入使用专用小型模型,提升大型模型的性能。
  • 在不依赖昂贵 PLM API 的前提下,实现小型模型与大型模型之间的高效协作。
  • 比标准微调更有效地将任务特定知识注入 PLMs。

提出的方法

  • DS+ 使用置信度阈值进行输入路由:若小型模型的预测置信度超过阈值 δ,则仅由小型模型处理该输入;否则,将其发送至大型模型。
  • 在小型模型服务大型模型(S4L)模块中,提示剪枝(PP)通过根据小型模型输出,从提示中移除低置信度类别,从而优化大型模型的预测空间。
  • 在 S4L 模块中,提示迁移(PT)通过修改输入提示以突出小型模型表现优异的区域,将知识从小型模型传递至大型模型。
  • 在大型模型服务小型模型(L4S)模块中,两阶段置信度蒸馏(2CD)将知识从大型模型传递至小型模型,防止微调过程中的灾难性遗忘。
  • 该框架通过调节置信度阈值 δ,动态平衡成本与性能,最优值在 [0.97, 0.99] 范围内,适用于高性能小型模型。
  • 该方法在模态和任务上具有泛化能力,已在文本分类及其他 NLP 基准上得到验证。

实验结果

研究问题

  • RQ1基于小型模型置信度进行输入路由,是否能在降低推理成本的同时提升大型模型性能?
  • RQ2与基于分布或基于预测的路由相比,基于置信度的分流在准确率与成本方面表现如何?
  • RQ3从大型模型进行知识蒸馏,是否能提升小型模型在困难样本上的表现,且避免过拟合?
  • RQ4在 DS+ 框架中,平衡成本降低与性能提升的最优置信度阈值 δ 是多少?
  • RQ5DS+ 框架在将任务特定知识注入大型模型方面,是否优于标准微调?

主要发现

  • DS+ 将 ChatGPT 在亚马逊产品情感分析任务上的准确率从 94.43% 提升至 95.64%,实现 1.21% 的性能增益。
  • 使用 DS+ 后,大型模型查询成本降低至原始成本的 31.18%,推理成本减少 68.82%。
  • 对于性能更高的小型模型(如微调后的 BERT),最优置信度阈值 δ 低至 0.85;而对于性能较低的模型(如 LSTM),δ 需高于 0.97。
  • 当 δ 从 0.97 提升至 0.99 时,使用 LSTM 的 DS+ 准确率仅略有提升(从 94.20% 增至 94.45%),但由大型模型处理的样本比例从 54.66% 上升至 80.00%。
  • 基于置信度的分流优于基于分布和基于预测的路由方法,后者仅带来微弱增益且稳定性较差。
  • 当使用在分布内表现优异的小型模型时,DS+ 框架的性能优于仅使用大型模型,证明协作可显著提升鲁棒性与效率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。