GANQ通过自适应非均匀量化,让大模型在显卡上更快更省内存。
GANQ: GPU-Adaptive Non-Uniform Quantization for Large Language Models
- 按层优化非均匀量化,无需训练,适配GPU查表加速
- 3/4比特量化下困惑度差距更小,比现有方法更准
- 单张RTX 4090显卡提速最高2.57倍,适合部署场景
大语言模型因资源需求高而面临部署挑战。低比特量化虽能减少内存占用并提升推理效率,但当前硬件缺乏对混合精度矩阵乘法(mpGEMM)的原生支持,导致基于反量化实现效率低下。此外,均匀量化难以准确捕捉权重分布,造成性能下降。我们提出GANQ(GPU-Adaptive Non-Uniform Quantization),一种面向硬件高效查表式mpGEMM的逐层后训练非均匀量化框架。GANQ通过无训练的GPU自适应优化算法,有效降低层间量化误差,实现更优量化性能。大量实验表明,相较于最先进的方法,GANQ在3比特和4比特量化下均显著缩小了与FP16基线的困惑度差距。在单张NVIDIA RTX 4090 GPU上部署时,量化模型推理速度最高可达基线的2.57倍,显著提升了大模型部署中的内存与推理效率。
原文摘要 · Abstract (English)
Large Language Models (LLMs) face significant deployment challenges due to their substantial resource requirements. While low-bit quantized weights can reduce memory usage and improve inference efficiency, current hardware lacks native support for mixed-precision General Matrix Multiplication (mpGEMM), resulting in inefficient dequantization-based implementations. Moreover, uniform quantization methods often fail to capture weight distributions adequately, leading to performance degradation. We propose GANQ (GPU-Adaptive Non-Uniform Quantization), a layer-wise post-training non-uniform quantization framework optimized for hardware-efficient lookup table-based mpGEMM. GANQ achieves superior quantization performance by utilizing a training-free, GPU-adaptive optimization algorithm to efficiently reduce layer-wise quantization errors. Extensive experiments demonstrate GANQ's ability to reduce the perplexity gap from the FP16 baseline compared to state-of-the-art methods for both 3-bit and 4-bit quantization. Furthermore, when deployed on a single NVIDIA RTX 4090 GPU, GANQ's quantized models achieve up to 2.57$\times$ speedup over the baseline, advancing memory and inference efficiency in LLM deployment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。