arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.13624cs.CV
收藏

QMamba:视觉状态空间模型的训练后量化

QMamba: Post-Training Quantization for Vision State Space Models

University of Science and Technology of China(中国科学技术大学)

Yinglong Li, Xiaoyu Liu, Jiacheng Li, Ruikang Xu, Yinda Chen, Zhiwei Xiong

AI总结:

提出QMamba,首个基于激活分布分析的视觉SSM训练后量化框架,通过LtSQ和TGQ分别量化离散参数与隐藏状态,在ImageNet 4位激活下超越现有方法21.0%。

摘要:

状态空间模型(SSMs)作为Mamba的关键组成部分,近年来因其高效的长时间序列建模能力而受到视觉模型的广泛关注。鉴于在资源受限的边缘设备上部署SSMs的计算成本,训练后量化(PTQ)是一种具有高效部署SSMs潜力的技术。在这项工作中,我们提出了QMamba,据我们所知,这是首批针对视觉SSMs设计的PTQ框架之一,基于对SSMs中激活分布的分析。我们揭示了离散参数的分布表现出长尾偏斜性,而隐藏状态序列的分布则表现出高度动态的变化。相应地,我们设计了长尾偏斜量化(LtSQ)来量化离散参数,以及时间组量化(TGQ)来量化隐藏状态,从而减少了量化误差。大量实验表明,QMamba在多种模型大小和架构的视觉模型上优于先进的PTQ方法。值得注意的是,在4位激活的ImageNet分类任务上,QMamba比现有方法提高了21.0%。

英文摘要:

State Space Models (SSMs), as key components of Mamaba, have gained increasing attention for vision models recently, thanks to their efficient long sequence modeling capability. Given the computational cost of deploying SSMs on resource-limited edge devices, Post-Training Quantization (PTQ) is a technique with the potential for efficient deployment of SSMs. In this work, we propose QMamba, one of the first PTQ frameworks to our knowledge, designed for vision SSMs based on the analysis of the activation distributions in SSMs. We reveal that the distribution of discrete parameters exhibits long-tailed skewness and the distribution of the hidden state sequence exhibits highly dynamic variations. Correspondingly, we design Long-tailed Skewness Quantization (LtSQ) to quantize discrete parameters and Temporal Group Quantization (TGQ) to quantize hidden states, which reduces the quantization errors. Extensive experiments demonstrate that QMamba outperforms advanced PTQ methods on vision models across multiple model sizes and architectures. Notably, QMamba surpasses existing methods by 21.0% on ImageNet classification with 4-bit activations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑