SliderQuant: Accurate Post-Training Quantization for LLMs

📄 arXiv: 2603.25284v1 📥 PDF

作者: Shigeng Wang, Chao Li, Yangyuxuan Kang, Jiawei Fan, Zhonghong Ou, Anbang Yao

分类: cs.AI

发布日期: 2026-03-26

备注: This work is accepted to ICLR 2026. Code is available at https://github.com/deep-optimization/SliderQuant


💡 一句话要点

SliderQuant:面向LLM的精确后训练量化框架,提升不同层量化精度。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 后训练量化 大型语言模型 模型压缩 滑动量化 自适应量化

📋 核心要点

  1. 现有PTQ方法对LLM各层采用相同量化策略,忽略了不同层对量化的敏感度差异,导致精度损失。
  2. SliderQuant提出一种自适应滑动量化框架,通过层间和层内滑动量化,针对不同层设计不同的量化策略。
  3. 实验表明,SliderQuant在多种LLM和任务上,显著优于现有PTQ方法,包括最新的旋转变换方法。

📝 摘要(中文)

本文针对大型语言模型(LLM)的后训练量化(PTQ)问题,从一个被忽视的角度出发:给定一个预训练的高精度LLM,主流的顺序量化框架平等地对待不同的层,但这在具有挑战性的低比特宽度设置下可能不是最优的。我们通过实验研究了不同层对模型精度的量化影响,并观察到:(1)浅层/深层通常比中间层对量化更敏感;(2)在浅层/深层中,最敏感的是第一层/最后一层,其量化误差明显大于其他层。这些经验观察表明,需要对LLM的不同层进行多层次的量化设计,而不是对所有层采用单一层次的量化设计。受此启发,我们提出了一种新的PTQ框架,称为滑动层量化(SliderQuant),它依赖于一个简单的自适应滑动量化概念,并辅以少量的可学习参数。SliderQuant的基本组件被称为层间滑动量化,它结合了三种新型的滑动窗口设计,专门用于解决浅层、中间层和深层不同的量化敏感性。另一个组件是层内滑动量化,它利用增量策略来量化每个窗口。因此,SliderQuant具有很强的降低跨层量化误差的能力。在包括Llama/Llama2/Llama3/Qwen2.5模型系列、DeepSeek-R1蒸馏模型和大型MoE模型在内的各种LLM上进行的大量基本语言生成、零样本常识推理以及具有挑战性的数学和代码任务的实验表明,我们的方法在仅权重量化和权重-激活量化方面均优于现有的PTQ方法(包括使用旋转变换的最新PTQ方法)。

🔬 方法详解

问题定义:现有的大型语言模型后训练量化(PTQ)方法通常对所有层采用相同的量化策略,忽略了不同层对量化的敏感度差异。这种一刀切的方法在低比特量化时会导致显著的精度损失,尤其是在浅层和深层。现有方法未能充分利用不同层之间的量化容忍度差异,导致整体性能下降。

核心思路:SliderQuant的核心思路是根据不同层对量化的敏感度,自适应地调整量化策略。通过引入滑动窗口机制,对不同层采用不同的量化比特宽度和参数设置,从而更精细地控制量化误差。这种方法旨在平衡各层的量化精度,避免敏感层过度量化,同时允许对不敏感层进行更激进的量化。

技术框架:SliderQuant框架包含两个主要组件:层间滑动量化和层内滑动量化。层间滑动量化通过三种不同的滑动窗口设计,针对浅层、中间层和深层不同的量化敏感性进行优化。层内滑动量化则采用增量策略,逐步量化每个窗口内的权重或激活值。整个框架通过少量可学习参数进行自适应调整,以最小化量化误差。

关键创新:SliderQuant的关键创新在于其自适应滑动量化机制,能够根据不同层的特性动态调整量化策略。与现有方法相比,SliderQuant不再对所有层采用相同的量化方案,而是通过滑动窗口和可学习参数,实现了更精细化的量化控制。这种方法能够更有效地降低跨层的量化误差,提高整体模型精度。

关键设计:层间滑动量化采用三种不同的滑动窗口设计,分别针对浅层、中间层和深层。这些窗口的大小和步长可以根据模型的具体结构和实验结果进行调整。层内滑动量化采用增量策略,逐步量化每个窗口内的权重或激活值。可学习参数用于调整滑动窗口的位置和大小,以及量化比特宽度等参数。损失函数通常采用量化后的模型输出与原始模型输出之间的差异来衡量量化误差,并通过优化算法最小化该误差。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,SliderQuant在Llama、Llama2、Llama3、Qwen2.5等多种LLM模型上,以及基本语言生成、零样本常识推理、数学和代码任务上,均显著优于现有的PTQ方法。例如,在某些任务上,SliderQuant相比于基线方法,精度提升超过2个百分点,证明了其在降低量化误差方面的有效性。

🎯 应用场景

SliderQuant可应用于各种大型语言模型的后训练量化,尤其是在资源受限的场景下,如移动设备、边缘计算等。通过降低模型大小和计算复杂度,SliderQuant能够使LLM在这些平台上高效运行,从而推动LLM在自然语言处理、智能助手、机器翻译等领域的广泛应用。

📄 摘要(原文)

In this paper, we address post-training quantization (PTQ) for large language models (LLMs) from an overlooked perspective: given a pre-trained high-precision LLM, the predominant sequential quantization framework treats different layers equally, but this may be not optimal in challenging bit-width settings. We empirically study the quantization impact of different layers on model accuracy, and observe that: (1) shallow/deep layers are usually more sensitive to quantization than intermediate layers; (2) among shallow/deep layers, the most sensitive one is the first/last layer, which exhibits significantly larger quantization error than others. These empirical observations imply that the quantization design for different layers of LLMs is required on multiple levels instead of a single level shared to all layers. Motivated by this, we propose a new PTQ framework termed Sliding-layer Quantization (SliderQuant) that relies on a simple adaptive sliding quantization concept facilitated by few learnable parameters. The base component of SliderQuant is called inter-layer sliding quantization, which incorporates three types of novel sliding window designs tailored for addressing the varying quantization sensitivity of shallow, intermediate and deep layers. The other component is called intra-layer sliding quantization that leverages an incremental strategy to quantize each window. As a result, SliderQuant has a strong ability to reduce quantization errors across layers. Extensive experiments on basic language generation, zero-shot commonsense reasoning and challenging math and code tasks with various LLMs, including Llama/Llama2/Llama3/Qwen2.5 model families, DeepSeek-R1 distilled models and large MoE models, show that our method outperforms existing PTQ methods (including the latest PTQ methods using rotation transformations) for both weight-only quantization and weight-activation quantization.