[论文解读] Empirical Guidelines for Deploying LLMs onto Resource-constrained Edge Devices
本文通过系统评估模型规模、压缩技术、微调方法、数据量和任务难度之间的权衡,为在资源受限的边缘设备上部署大语言模型(LLMs)提供了经验性指导。研究发现,检索增强生成(RAG)在中等难度任务上优于参数调优;在数据有限的情况下,量化模型通常优于未量化的模型;而早停策略可有效防止过拟合,尽管训练时间更长。
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.
研究动机与目标
- 为在资源受限的边缘设备上部署个性化大语言模型提供系统性指导。
- 探究有限内存、计算能力和时间如何影响模型定制化与性能表现。
- 识别在模型规模、压缩方法、学习方式和数据使用方面适用于边缘部署的最优配置。
- 提供经实证验证的设计原则,以在准确性、效率和隐私之间实现平衡。
提出的方法
- 在具有不同内存(4GB–16GB)和CPU/GPU硬件的多种边缘设备上开展广泛实验,以分析模型推理和微调性能。
- 在相同的微调条件下,评估三种主要模型压缩技术:知识蒸馏、量化(GPTQ)和剪枝。
- 在多样化下游任务中,对比两种主要的大语言模型定制方法:参数高效微调(LoRA)与检索增强生成(RAG)。
- 使用LaMP基准数据集评估模型在真实边缘应用场景下的性能,重点关注准确率和推理效率。
- 系统性地改变关键因素:模型规模(如LLaMA-7B、LLaMA-13B)、微调数据量、训练时长和任务难度等级。
- 应用早停策略并监控收敛情况,以评估更长训练时间是否能提升性能,尤其是在数据有限的情况下。

实验结果
研究问题
- RQ1任务难度如何影响在边缘大语言模型中选择参数学习(LoRA)与检索增强生成(RAG)的最优策略?
- RQ2增加个性化数据量是否总是能提升边缘设备上的微调性能,还是早停策略更为有效?
- RQ3在稳定性、峰值性能和边缘部署适用性方面,不同模型压缩方法(蒸馏、量化、剪枝)有何对比?
- RQ4在有限个人数据上微调时,何种条件下压缩的大语言模型会优于未压缩模型?
- RQ5模型规模和硬件限制在多大程度上影响微调时间与最终准确率之间的权衡?
主要发现
- 在中等难度下游任务中,RAG优于LoRA;而参数学习在极简单或极困难任务中表现更优。
- 使用全部可用历史数据进行微调并不能提升性能,反而常导致过拟合;早停策略更为有效,尤其是在模型早期收敛时。
- 知识蒸馏在各类任务和数据量下均表现出最稳定的性能,而GPTQ量化技术虽达到最高峰值性能,但一致性较差。
- 剪枝不适用于边缘大语言模型,因为缺失的权重需在微调过程中重新学习,这抵消了内存优势并损害性能。
- 在有限个人数据上微调时,压缩模型(尤其是量化模型)通常优于更大但未压缩的模型,原因在于其收敛更快且来自不重要权重位的噪声更少。
- 预训练数据的质量和记忆能力可能影响微调稳定性,尤其是在低数据场景下,尽管这仍需进一步研究。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。