arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.18135cs.CL
收藏

LSAQ:面向大语言模型部署的分层自适应量化

LSAQ: Layer-Specific Adaptive Quantization for Large Language Model Deployment

College of Computer Science and Technology, National University of Defense Technology(计算机科学与技术学院,国防科技大学)

Binrui Zeng, Bin Ji, Xiaodong Liu, Jie Yu, Shasha Li, Jun Ma, Xiaopeng Li, Shangwen Wang, Xinran Hong, Yongtao Tang

AI总结:

本文提出LSAQ系统,通过基于层重要性的自适应量化策略,根据边缘设备计算资源动态调整LLMs各层量化精度,在困惑度和零样本任务上优于基线方法并支持灵活部署。

摘要:

随着大语言模型(LLMs)在各个领域展现出卓越性能,在边缘设备上部署LLMs已成为一种新趋势。量化技术能够减小LLMs的规模并降低其内存需求,对于在资源受限的边缘设备上部署LLMs十分有效。然而,现有的一刀切量化方法往往无法动态调整LLMs的内存需求,限制了它们在具有不同计算资源的实际边缘设备上的应用。为了解决这一问题,我们提出了分层自适应量化(LSAQ),这是一个基于层重要性的LLMs自适应量化与动态部署系统。具体来说,LSAQ通过从每一层的输入和输出中构建top-k token集合并计算其Jaccard相似度来评估LLMs神经层的重要性。基于层重要性,我们的系统根据边缘设备的计算资源实时自适应调整量化策略,对重要性较高的层应用更高的量化精度,反之亦然。实验结果表明,LSAQ在困惑度和零样本任务上始终优于所选的量化基线方法。此外,它能够针对不同的使用场景设计合适的量化方案,以促进LLMs的部署。

英文摘要:

As Large Language Models (LLMs) demonstrate exceptional performance across various domains, deploying LLMs on edge devices has emerged as a new trend. Quantization techniques, which reduce the size and memory requirements of LLMs, are effective for deploying LLMs on resource-limited edge devices. However, existing one-size-fits-all quantization methods often fail to dynamically adjust the memory requirements of LLMs, limiting their applications to practical edge devices with various computation resources. To tackle this issue, we propose Layer-Specific Adaptive Quantization (LSAQ), a system for adaptive quantization and dynamic deployment of LLMs based on layer importance. Specifically, LSAQ evaluates the importance of LLMs' neural layers by constructing top-k token sets from the inputs and outputs of each layer and calculating their Jaccard similarity. Based on layer importance, our system adaptively adjusts quantization strategies in real time according to the computation resource of edge devices, which applies higher quantization precision to layers with higher importance, and vice versa. {Experimental results show that LSAQ consistently outperforms the selected quantization baselines in terms of perplexity and zero-shot tasks. Additionally, it can devise appropriate quantization schemes for different usage scenarios to facilitate the deployment of LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑