arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2210.06707cs.CV
收藏

Q-ViT:精确的全量化低比特视觉Transformer

Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer

Beihang University(北京航空航天大学);Zhongguancun Laboratory(中关村实验室);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Baidu Research(百度研究院);National Engineering Laboratory for Deep Learning Technology and Application(深度学习技术及应用国家工程实验室)

Yanjing Li, Sheng Xu, Baochang Zhang, Xianbin Cao, Peng Gao, Guodong Guo

摘要:

大型预训练的视觉Transformer(ViTs)在各种视觉任务上表现出卓越的性能,但是当部署在资源受限的设备上时,遭受昂贵的计算和存储器成本问题。在众多强大的压缩方法中,量化通过低比特参数和逐位操作极大地减少了计算量和内存消耗。然而,低位ViT仍然在很大程度上未被探索,并且与实值对应物相比,通常遭受显着的性能下降。在这项工作中,通过大量的实证分析,我们首先确定严重的性能下降的瓶颈来自低比特量化的自注意映射的信息失真。然后,我们开发了一个信息整流模块(EQUIPMENT)和分布引导蒸馏(DGD)计划的完全量化的视觉Transformer(Q-ViT),以有效地消除这种失真,导致一个完全量化的ViT。我们评估我们的方法流行的DeiT和Swin骨干。大量的实验结果表明,我们的方法实现了更好的性能比现有技术。例如,我们的Q-ViT理论上可以将ViT-S加速6.14倍,并实现约80.9%的Top-1准确度,甚至超过ImageNet数据集上的全精度对应物1.0%。我们的代码和型号附在https://github.com/YanjingLi0202/Q-ViT上

英文摘要:

The large pre-trained vision transformers (ViTs) have demonstrated remarkable performance on various visual tasks, but suffer from expensive computational and memory cost problems when deployed on resource-constrained devices. Among the powerful compression approaches, quantization extremely reduces the computation and memory consumption by low-bit parameters and bit-wise operations. However, low-bit ViTs remain largely unexplored and usually suffer from a significant performance drop compared with the real-valued counterparts. In this work, through extensive empirical analysis, we first identify the bottleneck for severe performance drop comes from the information distortion of the low-bit quantized self-attention map. We then develop an information rectification module (IRM) and a distribution guided distillation (DGD) scheme for fully quantized vision transformers (Q-ViT) to effectively eliminate such distortion, leading to a fully quantized ViTs. We evaluate our methods on popular DeiT and Swin backbones. Extensive experimental results show that our method achieves a much better performance than the prior arts. For example, our Q-ViT can theoretically accelerates the ViT-S by 6.14x and achieves about 80.9% Top-1 accuracy, even surpassing the full-precision counterpart by 1.0% on ImageNet dataset. Our codes and models are attached on https://github.com/YanjingLi0202/Q-ViT

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

↑