arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.02298cs.CLeess.SP
收藏

功率为二的量化感知训练(PoT-QAT)在大语言模型(LLMs)中

Power-of-Two Quantization-Aware-Training (PoT-QAT) in Large Language Models (LLMs)

Department of Computer Science, Stanford University(计算机科学系,斯坦福大学)

Mahmoud Elgenedy

AI总结:

本研究提出了一种基于功率为二量化的量化感知训练方法,通过减少内存占用和提升推理速度,显著提升了大语言模型的性能。

摘要:

在大语言模型(LLMs)中,参数数量在过去几年内呈指数级增长,例如从GPT-2中的15亿参数增长到GPT-3中的1750亿参数,甚至可能达到万亿级别。这给实现带来了重大挑战,尤其是对于边缘设备。不同于云计算,边缘设备的内存和处理能力非常有限,这需要开发新的想法使这些应用成为可能。在本工作中,我们研究了使用特殊的量化方法来压缩权重,这种量化方法将数字限制在仅功率为二(PoT)的范围内。这有助于节省大量内存,因为只需存储指数,更重要的是,它通过用低成本的位移操作替代昂贵的乘法运算,显著减少了处理能力。为了克服这种严格量化带来的性能损失,我们研究了量化感知训练(QAT)以通过额外训练来提升性能。在GPT-2 124M上的结果表明,经过额外训练后,量化PoT模型有显著提升, perplexity提升66%,BERT-Score损失基线GPT-2为1%。内存节省估计为87.5%,而使用PoT量化相对于全精度的推理速度预计为3-10倍快。

英文摘要:

In Large Language Models (LLMs), the number of parameters has grown exponentially in the past few years, e.g., from 1.5 billion parameters in GPT-2 to 175 billion in GPT-3 to possibly more than trillion in higher versions. This raises a significant challenge for implementation, especially for Edge devices. Unlike cloud computing, memory and processing power for Edge devices are very limited, which necessitates developing novel ideas to make such applications feasible. In this work, we investigate compressing weights with a special quantization that limits numbers to only power-of-two (PoT). This helps save a huge amount of memory as only exponents need to be stored, more importantly, it significantly reduces processing power by replacing costly multiplication with low cost bit shifting. To overcome performance loss due to this strict quantization, we investigate Quantization Aware Training (QAT) to enhance performance through additional training. Results on GPT-2 124M show a major enhancement for quantized PoT model after additional training, with a perplexity enhancement of 66% and BERT-Score loss to baseline GPT-2 of 1%. The memory saving is estimated to be 87.5% while the inference speed is expected to be 3-10x faster with PoT quantization versus full-precision.

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

↑