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

BiLLM:推动大语言模型训练后量化的极限

BiLLM: Pushing the Limit of Post-Training Quantization for LLMs

The University of Hong Kong(香港大学);Beihang University(北京航空航天大学);ETH Zürich(苏黎世联邦理工学院)

Wei Huang, Yangdong Liu, Haotong Qin, Ying Li, Shiming Zhang, Xianglong Liu, Michele Magno, Xiaojuan Qi

AI总结:

针对大语言模型超低比特量化后性能下降的问题,提出BiLLM 1比特训练后量化方案,通过显著权值筛选、二值残差逼近和非显著权值分组二值化,在极低比特下实现高精度推理且效率优异。

摘要:

预训练大语言模型(LLMs)展现出卓越的通用语言处理能力,但对内存和计算资源有极高需求。二值化作为一种强大的压缩技术,可将模型权值极致压缩至仅1比特,从而降低高昂的计算与内存需求。然而,现有量化技术在超低比特宽度下难以维持LLM的性能。针对这一挑战,我们提出BiLLM,这是一种专为预训练LLM设计的突破性1比特训练后量化方案。基于LLM的权值分布,BiLLM首先识别并从结构上筛选显著权值,通过有效的二值残差逼近策略最小化压缩损失。此外,考虑到非显著权值的钟形分布,我们提出一种最优分割搜索方法,对其进行分组并精准二值化。BiLLM首次在仅1.08比特权值下实现了高精度推理(例如在LLaMA2-70B上的困惑度为8.41),在多个LLM家族和评估指标上均显著优于当前最优的LLM量化方法。此外,BiLLM可在单块GPU上用0.5小时内完成70亿权值规模LLM的二值化过程,展现出良好的时间效率。我们的代码可在https://github.com/Aaronhuang-778/BiLLM获取。

英文摘要:

Pretrained large language models (LLMs) exhibit exceptional general language processing capabilities but come with significant demands on memory and computational resources. As a powerful compression technology, binarization can extremely reduce model weights to a mere 1 bit, lowering the expensive computation and memory requirements. However, existing quantization techniques fall short of maintaining LLM performance under ultra-low bit-widths. In response to this challenge, we present BiLLM, a groundbreaking 1-bit post-training quantization scheme tailored for pretrained LLMs. Based on the weight distribution of LLMs, BiLLM first identifies and structurally selects salient weights, and minimizes the compression loss through an effective binary residual approximation strategy. Moreover, considering the bell-shaped distribution of the non-salient weights, we propose an optimal splitting search to group and binarize them accurately. BiLLM achieving for the first time high-accuracy inference (e.g. 8.41 perplexity on LLaMA2-70B) with only 1.08-bit weights across various LLMs families and evaluation metrics, outperforms SOTA quantization methods of LLM by significant margins. Moreover, BiLLM enables the binarization process of the LLM with 7 billion weights within 0.5 hours on a single GPU, demonstrating satisfactory time efficiency. Our code is available at https://github.com/Aaronhuang-778/BiLLM.

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

↑