arXiv:2410.19103cs.LG2024-10被引 6

将大模型权重压缩至2比特,仍保持高精度,适合部署资源受限场景。

TesseraQ: Ultra Low-Bit LLM Post-Training Quantization with Block Reconstruction

  • 用块重构优化量化参数,逐步硬化软化变量提升精度。
  • 2比特量化下WikiText2困惑度降至6.82,比现有方法低50%以上。
  • 可无缝集成现有算法,适用于各类低比特大模型部署。

大语言模型(LLMs)虽推动自然语言处理发展,但内存与计算开销巨大。后训练量化(PTQ)成为降低内存占用、提升推理速度的主流方法。本文提出TesseraQ,一种新型超低比特(如2比特)量化技术,通过块重构优化权重舍入参数,显著提升性能。为有效优化量化过程并稳定重建,引入渐进自适应舍入,使软舍入变量在重建中逐步硬化。同时优化反量化缩放参数,充分发挥块重构优势。TesseraQ可无缝集成现有方法如AWQ和OmniQuant,显著提升其表现。实验表明,在2比特权重量化下,对LLaMA-2-7B模型,WikiText2困惑度从14.65降至6.82,下游平均准确率从50.52升至59.27。在多种量化方案(W2A16、W3A16、W3A3、W4A4)中均表现最优。

原文摘要 · Abstract (English)

Large language models (LLMs) have revolutionized natural language processing, albeit at the cost of immense memory and computation requirements. Post-training quantization (PTQ) is becoming the de facto method to reduce the memory footprint and improve the inference throughput of LLMs. In this work, we aim to push the upper limit of LLM PTQ by optimizing the weight rounding parameters with the block reconstruction technique, a predominant method in previous vision models. We propose TesseraQ, a new state-of-the-art PTQ technique, to quantize the weights of LLMs to ultra-low bits. To effectively optimize the rounding in LLMs and stabilize the reconstruction process, we introduce progressive adaptive rounding. This approach iteratively transits the soft rounding variables to hard variables during the reconstruction process. Additionally, we optimize the dequantization scale parameters to fully leverage the block reconstruction technique. We demonstrate that TesseraQ can be seamlessly integrated with existing scaling or clipping-based PTQ algorithms such as AWQ and OmniQuant, significantly enhancing their performance and establishing a new state-of-the-art. For instance, when compared to AWQ, TesseraQ improves the wikitext2 perplexity from 14.65 to 6.82 and average downstream accuracy from 50.52 to 59.27 with 2-bit weight-only quantization of LLaMA-2-7B. Across a range of quantization schemes, including W2A16, W3A16, W3A3, and W4A4, TesseraQ consistently exhibits superior performance.

大模型量化低比特块重构推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。