arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.02891cs.LGcs.AIcs.CL
收藏

GPTQT:对大型语言模型进行两次量化以提升效率

GPTQT: Quantize Large Language Models Twice to Push the Efficiency

College of Control Science and Engineering, Zhejiang University(浙江大学控制科学与工程学院)

Yipin Guo, Yilin Lang, Qinyuan Ren

AI总结:

GPTQT 提出渐进式两步量化方法,将 LLM 权重从较高比特线性量化再转换为 3bit/2bit 二进制编码,并通过重新探索策略优化缩放因子,在降低困惑度和提升推理速度上优于现有 3-bit 量化基线。

摘要:

由于规模庞大,生成式大型语言模型(LLMs)需要大量的计算和存储资源。本文提出了一种新的训练后量化方法 GPTQT,通过将 LLM 的权重表示为 3bit/2bit 来降低内存使用并提升处理速度。实践表明,单纯最小化权重量化误差效果不佳,容易导致过拟合。因此,GPTQT 采用渐进式两步方法:首先使用线性量化将权重量化到相对较高的比特位,然后将得到的整数权重转换为更低比特的二进制编码。本文提出了一种重新探索策略来优化初始缩放因子。在推理过程中,这些步骤被合并为纯二进制编码,从而实现高效计算。在多种模型和数据集上的测试验证了 GPTQT 的有效性。与强 3-bit 量化基线相比,GPTQT 在 opt-66B 上将困惑度进一步降低了 4.01,并在 opt-30b 上将速度提升了 1.24 倍。在 Llama2 上的结果表明,GPTQT 目前是此类 LLM 中最佳的二进制编码量化方法。

英文摘要:

Due to their large size, generative Large Language Models (LLMs) require significant computing and storage resources. This paper introduces a new post-training quantization method, GPTQT, to reduce memory usage and enhance processing speed by expressing the weight of LLM in 3bit/2bit. Practice has shown that minimizing the quantization error of weights is ineffective, leading to overfitting. Therefore, GPTQT employs a progressive two-step approach: initially quantizing weights using Linear quantization to a relatively high bit, followed by converting obtained int weight to lower bit binary coding. A re-explore strategy is proposed to optimize initial scaling factor. During inference, these steps are merged into pure binary coding, enabling efficient computation. Testing across various models and datasets confirms GPTQT's effectiveness. Compared to the strong 3-bit quantization baseline, GPTQT further reduces perplexity by 4.01 on opt-66B and increases speed by 1.24 times on opt-30b. The results on Llama2 show that GPTQT is currently the best binary coding quantization method for such kind of LLMs.

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

↑