通过分解异常值提升低精度推理效率,让大模型在设备端更省资源。
MUXQ: Mixed-to-Uniform Precision MatriX Quantization via Low-Rank Outlier Decomposition
- 检测激活值异常通道,用辅助矩阵重新分布异常值
- 在0.1B~0.7B参数的GPT-2上实现INT8量化,困惑度优于原始量化
- 适合边缘设备部署,可与其它压缩技术协同使用
大语言模型在自然语言处理任务中表现卓越,但参数量庞大导致内存和计算开销巨大。在基于NPU的设备端环境中,浮点计算效率低下,因此整数(INT)量化至关重要。然而,现有方法如ZeroQuant、LLM.int8()和SmoothQuant未能充分解决输入激活值中的异常值问题及其带来的硬件效率损失。为此,本文提出MUXQ(混合到统一精度矩阵量化),通过检测输入激活值中的异常通道,并引入一个小型辅助矩阵将异常值幅度均匀分布至各通道,从而缓解异常值影响。这使得所有激活值可在低精度整数级别进行量化,同时保持硬件友好的计算结构。在三个规模的GPT-2模型(0.1B、0.3B、0.7B参数)及WikiText-2数据集上的实验表明,MUXQ在一致性上优于朴素量化。尤其在每张量量化下,激活值与权重均量化为INT8,仍能保持接近FP16的准确率。仅带来微小计算开销,实现了稳定的低精度推理,且易于与其他量化技术结合。结果表明,MUXQ为边缘设备上高效、高精度的大模型推理提供了可行路径。
原文摘要 · Abstract (English)
Large language models (LLMs) have achieved outstanding performance across a wide range of natural language processing tasks, but their enormous parameter counts impose ubstantial memory and computational overheads. This challenge is particularly critical in NPU-based on-device environments, where FP16/FP32 computation is inefficient and integer (INT) quantization is therefore essential. However, existing methods, including ZeroQuant, LLM.int8(), and SmoothQuant, do not fully address input-activation outliers and the associated hardware inefficiencies. To overcome these limitations, we propose MUXQ (Mixed-to-Uniform Quantization). MUXQ detects outlier channels in input activations and introduces a small auxiliary matrix that redistributes outlier magnitudes across channels, thereby alleviating the outlier problem. This enables even activation outliers to be quantized at low-precision INT levels while preserving a hardware-friendly computation structure. Experiments on GPT-2 models at three scales (0.1B, 0.3B, and 0.7B parameters) using the WikiText-2 dataset show that MUXQ consistently achieves lower perplexity than naive quantization. In particular, under per-tensor quantization, MUXQ quantizes both activations and weights to INT8 while maintaining accuracy close to that of FP16. With only modest computational overhead, MUXQ enables stable low-precision inference and can be readily combined with other quantization techniques. These results suggest that MUXQ provides a promising direction for efficient and accurate LLM inference on edge devices.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。