通过序列变换与混合精度,实现低比特激活量化下的高精度
STaMP: Sequence Transformation and Mixed Precision for Low-Precision Activation Quantization
- 在序列维度施加线性变换,利用数据局部相关性
- 仅保留少量激活值高精度,整体比特位数更低
- 适用于大模型推理,兼容现有量化方法
量化是降低生成式AI模型推理延迟、功耗和内存占用的关键方法。然而,当激活值量化至8比特以下时,精度常急剧下降。近期研究指出,可逆线性变换(如旋转)可通过重参数化特征通道和权重来辅助量化。本文提出一种新策略——序列变换与混合精度(STaMP)量化:沿序列维度应用线性变换,利用语言与视觉数据中的强局部相关性;通过在每个中间激活中保持少量令牌以较高精度,可在更低的平均激活比特宽度下维持模型精度。我们在最新的LVM和LLM架构上评估了STaMP,结果表明其显著提升了低比特激活量化的性能,并可与现有的激活和权重量化方法(包括最近的特征变换)良好协同。
原文摘要 · Abstract (English)
Quantization is the key method for reducing inference latency, power and memory footprint of generative AI models. However, accuracy often degrades sharply when activations are quantized below eight bits. Recent work suggests that invertible linear transformations (e.g. rotations) can aid quantization, by reparameterizing feature channels and weights. In this paper, we propose \textit{Sequence Transformation and Mixed Precision} (STaMP) quantization, a novel strategy that applies linear transformations along the \textit{sequence} dimension to exploit the strong local correlation in language and visual data. By keeping a small number of tokens in each intermediate activation at higher precision, we can maintain model accuracy at lower (average) activations bit-widths. We evaluate STaMP on recent LVM and LLM architectures, demonstrating that it significantly improves low bit width activation quantization and complements established activation and weight quantization methods including recent feature transformations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。