arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.16738eess.IV
收藏

基于k缩放量化与重参数化的Vision Mamba后训练量化

Post-Training Quantization for Vision Mamba with k-Scaled Quantization and Reparameterization

Bo-Yun Shi, Yi-Cheng Lo, An-Yeu, Wu, Yi-Min Tsai

AI总结:

针对Vision Mamba(ViM)未被现有量化方法覆盖且SSM层朴素量化误差大的问题,提出k缩放逐token量化、重参数化隐藏状态量化及因子确定三种技术,实现ViM的后训练量化,ImageNet-1k上仅损失0.8-1.2%精度。

摘要:

Mamba模型采用结构化状态空间模型(SSM),具有线性时间复杂度并展现出显著潜力。Vision Mamba(ViM)通过整合双向SSM和补丁嵌入将该框架扩展至视觉任务,性能超过基于Transformer的模型。尽管模型量化对高效计算至关重要,但现有研究仅聚焦于原始Mamba模型且未应用于ViM;此外,它们忽略了对SSM层的量化——SSM层是Mamba的核心,因其固有结构,朴素量化会导致严重的误差传播。本文聚焦ViM的后训练量化(PTQ),通过三项核心技术解决问题:1)线性层和卷积层的k缩放逐token量化方法;2)简化隐藏状态量化的重参数化技术;3)通过整合操作降低计算开销的因子确定方法。这些方法可缓解PTQ导致的误差。ImageNet-1k实验结果显示,PTQ仅造成0.8-1.2%的精度下降,突显了方法的有效性。

英文摘要:

The Mamba model, utilizing a structured state-space model (SSM), offers linear time complexity and demonstrates significant potential. Vision Mamba (ViM) extends this framework to vision tasks by incorporating a bidirectional SSM and patch embedding, surpassing Transformer-based models in performance. While model quantization is essential for efficient computing, existing works have focused solely on the original Mamba model and have not been applied to ViM. Additionally, they neglect quantizing the SSM layer, which is central to Mamba and can lead to substantial error propagation by naive quantization due to its inherent structure. In this paper, we focus on the post-training quantization (PTQ) of ViM. We address the issues with three core techniques: 1) a k-scaled token-wise quantization method for linear and convolutional layers, 2) a reparameterization technique to simplify hidden state quantization, and 3) a factor-determining method that reduces computational overhead by integrating operations. Through these methods, the error caused by PTQ can be mitigated. Experimental results on ImageNet-1k demonstrate only a 0.8-1.2\% accuracy degradation due to PTQ, highlighting the effectiveness of our approach.

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

↑