将 LLM 部署到资源受限边缘设备的经验准则
Empirical Guidelines for Deploying LLMs onto Resource-constrained Edge Devices
AI总结:
本文通过多因素实验与基准测试,研究资源受限边缘环境下个性化 LLM 的定制、压缩与部署权衡,并给出关于参数学习、RAG、微调和模型选择的经验准则。
摘要:
缩放定律已成为设计大型语言模型(LLM)的事实准则,但对其展开研究时,通常假设训练和推理均拥有无限的计算资源。随着 LLM 越来越多地被用作个性化智能助手,其定制化(即通过微调进行学习)以及在资源受限边缘设备上的部署将变得越来越普遍。一个紧迫但尚未解决的问题是,资源受限的计算环境会如何影响个性化 LLM 的设计选择。本文通过实证研究这一问题。具体而言,我们考察了若干关键设计因素之间的权衡,以及它们对学习效率和准确率的交织影响。这些因素包括:LLM 定制化的学习方法、用于学习定制的个性化数据量、LLM 的类型与规模、LLM 的压缩方法、可用于学习的时间,以及目标用例的难度等级。通过大量实验和基准测试,我们得出了若干关于在资源受限设备上部署 LLM 的、出人意料且富有洞见的准则。例如,参数学习与 RAG 之间的最优选择可能会随下游任务难度而变化;更长的微调时间并不一定对模型有帮助;而在从有限的个性化数据中学习时,压缩后的 LLM 可能比未压缩的 LLM 是更好的选择。
英文摘要:
The scaling laws have become the de facto guidelines for designing large language models (LLMs), but they were studied under the assumption of unlimited computing resources for both training and inference. As LLMs are increasingly used as personalized intelligent assistants, their customization (i.e., learning through fine-tuning) and deployment onto resource-constrained edge devices will become more and more prevalent. An urging but open question is how a resource-constrained computing environment would affect the design choices for a personalized LLM. We study this problem empirically in this work. In particular, we consider the tradeoffs among a number of key design factors and their intertwined impacts on learning efficiency and accuracy. The factors include the learning methods for LLM customization, the amount of personalized data used for learning customization, the types and sizes of LLMs, the compression methods of LLMs, the amount of time afforded to learn, and the difficulty levels of the target use cases. Through extensive experimentation and benchmarking, we draw a number of surprisingly insightful guidelines for deploying LLMs onto resource-constrained devices. For example, an optimal choice between parameter learning and RAG may vary depending on the difficulty of the downstream task, the longer fine-tuning time does not necessarily help the model, and a compressed LLM may be a better choice than an uncompressed LLM to learn from limited personalized data.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。