Large language models (LLMs) significantly enhance the performance of various applications, but they are computationally intensive and energy-demanding. This makes it challenging to deploy them on devices with limited resources, such as personal computers and mobile/wearable devices, and results in substantial inference costs in resource-rich environments like cloud servers. To extend the use of LLMs, we introduce a low-rank decomposition approach to effectively compress these models, tailored to the requirements of specific applications. We observe that LLMs pretrained on general datasets contain many redundant components not needed for particular applications. Our method focuses on identifying and removing these redundant parts, retaining only the necessary elements for the target applications. Specifically, we represent the weight matrices of LLMs as a linear combination of base components. We then prune the irrelevant bases and enhance the model with new bases beneficial for specific applications. Deep compression results on the Llama 2-7b and -13B models, conducted on target applications including mathematical reasoning and code generation, show that our method significantly reduces model size while maintaining comparable accuracy to state-of-the-art low-rank compression techniques.


翻译:大语言模型(LLMs)显著提升了各类应用的性能,但其计算密集且能耗巨大。这使得在资源受限的设备(如个人计算机和移动/可穿戴设备)上部署面临挑战,并在云服务器等资源丰富的环境中产生高昂的推理成本。为拓展LLMs的应用范围,我们提出一种低秩分解方法,可根据特定应用需求有效压缩这些模型。我们观察到,基于通用数据集预训练的LLMs包含许多特定应用不需要的冗余成分。本方法着重于识别并移除这些冗余部分,仅保留目标应用所需的必要元素。具体而言,我们将LLMs的权重矩阵表示为基分量的线性组合,随后剪枝无关基并增强对特定应用有益的新基。在Llama 2-7b与-13B模型上针对数学推理和代码生成等目标应用进行的深度压缩实验表明,本方法在保持与前沿低秩压缩技术相当精度的同时,显著减小了模型规模。

0
下载
关闭预览

相关内容

大语言模型的LoRA研究综述
专知会员服务
52+阅读 · 2024年7月17日
【ICML2024】TIMEX++: 通过信息瓶颈学习时间序列解释
专知会员服务
17+阅读 · 2024年5月16日
【NeurIPS2023】CQM: 与量化世界模型的课程强化学习
专知会员服务
25+阅读 · 2023年10月29日
UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关VIP内容
大语言模型的LoRA研究综述
专知会员服务
52+阅读 · 2024年7月17日
【ICML2024】TIMEX++: 通过信息瓶颈学习时间序列解释
专知会员服务
17+阅读 · 2024年5月16日
【NeurIPS2023】CQM: 与量化世界模型的课程强化学习
专知会员服务
25+阅读 · 2023年10月29日
UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
相关资讯
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
相关基金
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员