arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.18437cs.CVcs.AI
收藏

面向视觉Transformer的混合非线性量化

Mixed Non-linear Quantization for Vision Transformers

Chungnam National University(Chungnam国立大学);Electronics and Telecommunications Research Institute(电子电信研究所);Korea Electronics Technology Institute(韩国电子技术研究所)

Gihwan Kim, Jemin Lee, Sihyeong Park, Yongin Kwon, Hyungshin Kim

AI总结:

本文针对视觉Transformer非线性运算量化被忽视或方法单一的问题,提出基于SQNR差值度量逐层敏感度的混合非线性量化方法,在ViT、DeiT和Swin上显著优于现有方法。

摘要:

大多数量化方法已被提出用于减小视觉Transformer的模型规模,但其中大多数方法忽略了非线性运算的量化。只有少数工作针对非线性运算的量化进行了处理,但它们对所有非线性运算都应用了单一的量化方法。我们认为,通过对每个非线性运算采用不同的量化方法,可以进一步改进这一点。因此,为了从已知方法中为每个非线性层分配误差最小化的量化方法,我们提出了一种混合非线性量化方法,该方法考虑了通过SQNR差值度量衡量的逐层量化敏感度。结果表明,在ViT、DeiT和Swin模型的8位和6位设置下,我们的方法分别平均优于I-BERT、FQ-ViT和I-ViT 0.6个百分点和19.6个百分点。在训练时间受限的情况下,我们的方法分别优于I-BERT和I-ViT 0.6个百分点和20.8个百分点。我们计划在https://gitlab.com/ones-ai/mixed-non-linear-quantization发布代码。

英文摘要:

The majority of quantization methods have been proposed to reduce the model size of Vision Transformers, yet most of them have overlooked the quantization of non-linear operations. Only a few works have addressed quantization for non-linear operations, but they applied a single quantization method across all non-linear operations. We believe that this can be further improved by employing a different quantization method for each non-linear operation. Therefore, to assign the most error-minimizing quantization method from the known methods to each non-linear layer, we propose a mixed non-linear quantization that considers layer-wise quantization sensitivity measured by SQNR difference metric. The results show that our method outperforms I-BERT, FQ-ViT, and I-ViT in both 8-bit and 6-bit settings for ViT, DeiT, and Swin models by an average of 0.6%p and 19.6%p, respectively. Our method outperforms I-BERT and I-ViT by 0.6%p and 20.8%p, respectively, when training time is limited. We plan to release our code at https://gitlab.com/ones-ai/mixed-non-linear-quantization.

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

↑