arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.11960cs.LGcs.AIcs.CL
收藏

DB-LLM:面向高效LLM的精确双二值化方法

DB-LLM: Accurate Dual-Binarization for Efficient LLMs

Beihang University(北京航空航天大学);The University of Sydney(悉尼大学);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));Jiangsu University(江苏大学)

Hong Chen, Chengtao Lv, Liang Ding, Haotong Qin, Xiabin Zhou, Yifu Ding, Xuebo Liu, Min Zhang, Jinyang Guo, Xianglong Liu, Dacheng Tao

AI总结:

本文提出面向LLM超低比特量化的双二值化方法DB-LLM,结合微观灵活双二值化与宏观偏差感知蒸馏,在保持高稀疏性与效率的同时显著提升准确率,计算消耗较SOTA额外降低20%。

摘要:

大型语言模型(LLMs)显著推动了自然语言处理领域的发展,但昂贵的内存和计算消耗阻碍了其实际部署。量化成为提升LLMs计算效率最有效的方法之一。然而,现有的超低比特量化总是导致严重的准确率下降。在本文中,我们从经验和宏观层面缓解了超低比特量化的微观与宏观特征,并提出了一种面向LLMs的新型双二值化方法,即DB-LLM。在微观层面,我们同时考虑了2比特位宽的准确率优势和二值化的效率优势,引入了灵活双二值化(FDB)。通过将2比特量化权重拆分为两组独立的二值集,FDB确保了表示的准确率并引入了灵活性,在利用二值化高效按位运算的同时,保留了超低比特量化固有的高稀疏性。在宏观层面,我们发现了量化后LLM预测中存在的失真现象,具体表现为与样本模糊性相关的偏差。我们提出了偏差感知蒸馏(DAD)方法,使模型能够对不同样本采取不同的关注方式。综合实验表明,我们的DB-LLM不仅在超低比特量化中显著超越了当前最先进技术(SoTA)(例如,困惑度从9.64降至7.23),而且在相同比特宽度下,与SOTA方法相比,计算消耗额外减少了20%。我们的代码即将发布。

英文摘要:

Large language models (LLMs) have significantly advanced the field of natural language processing, while the expensive memory and computation consumption impede their practical deployment. Quantization emerges as one of the most effective methods for improving the computational efficiency of LLMs. However, existing ultra-low-bit quantization always causes severe accuracy drops. In this paper, we empirically relieve the micro and macro characteristics of ultra-low bit quantization and present a novel Dual-Binarization method for LLMs, namely DB-LLM. For the micro-level, we take both the accuracy advantage of 2-bit-width and the efficiency advantage of binarization into account, introducing Flexible Dual Binarization (FDB). By splitting 2-bit quantized weights into two independent sets of binaries, FDB ensures the accuracy of representations and introduces flexibility, utilizing the efficient bitwise operations of binarization while retaining the inherent high sparsity of ultra-low bit quantization. For the macro-level, we find the distortion that exists in the prediction of LLM after quantization, which is specified as the deviations related to the ambiguity of samples. We propose the Deviation-Aware Distillation (DAD) method, enabling the model to focus differently on various samples. Comprehensive experiments show that our DB-LLM not only significantly surpasses the current State-of-The-Art (SoTA) in ultra-low bit quantization (eg, perplexity decreased from 9.64 to 7.23), but also achieves an additional 20\% reduction in computational consumption compared to the SOTA method under the same bit-width. Our code will be released soon.

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

↑