重新思考通道维度以隔离异常值:面向大语言模型低比特权重量化的研究
Rethinking Channel Dimensions to Isolate Outliers for Low-bit Weight Quantization of Large Language Models
AI总结:
针对大语言模型低比特权重量化中激活异常值的问题,提出per-IC量化方法(输入通道内分组隔离异常值),并结合自适应维度框架AdaDim,显著提升4比特以下量化性能,在MMLU等基准测试中取得优异结果。
摘要:
大语言模型(LLMs)近期在各类任务中展现出卓越性能,但因内存瓶颈,尤其在小批量推理场景(如移动设备)中高效部署面临挑战。仅权重量化是潜在解决方案,但4比特以下量化因激活值异常值问题仍具难度。为此,我们提出per-IC量化方法:在输入通道(IC)内分组而非传统输出通道(OC)分组,以隔离异常值。该方法基于“激活异常值影响权重矩阵输入维度”的观察;同时发现权重本身存在敏感性。进一步提出自适应维度框架AdaDim,结合Round-To-Nearest和GPTQ等方法,在MMLU(+4.7%)、HumanEval(+10%)等基准测试中显著提升低比特量化性能。代码见https://github.com/johnheo/adadim-llm
英文摘要:
Large Language Models (LLMs) have recently demonstrated remarkable success across various tasks. However, efficiently serving LLMs has been a challenge due to the large memory bottleneck, specifically in small batch inference settings (e.g. mobile devices). Weight-only quantization can be a promising approach, but sub-4 bit quantization remains a challenge due to large-magnitude activation outliers. To mitigate the undesirable outlier effect, we first propose per-IC quantization, a simple yet effective method that creates quantization groups within each input channel (IC) rather than the conventional per-output-channel (per-OC). Our method is motivated by the observation that activation outliers affect the input dimension of the weight matrix, so similarly grouping the weights in the IC direction can isolate outliers within a group. We also find that activation outliers do not dictate quantization difficulty, and inherent weight sensitivities also exist. With per-IC quantization as a new outlier-friendly scheme, we propose Adaptive Dimensions (AdaDim), a versatile quantization framework that can adapt to various weight sensitivity patterns. We demonstrate the effectiveness of AdaDim by augmenting prior methods such as Round-To-Nearest and GPTQ, showing significant improvements across various language modeling benchmarks for both base (up to +4.7% on MMLU) and instruction-tuned (up to +10% on HumanEval) LLMs. Code is available at https://github.com/johnheo/adadim-llm
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。