Vision Transformers (ViTs) have exhibited exceptional performance across diverse computer vision tasks, while their substantial parameter size incurs significantly increased memory and computational demands, impeding effective inference on resource-constrained devices. Quantization has emerged as a promising solution to mitigate these challenges, yet existing methods still suffer from significant accuracy loss at low-bit. We attribute this issue to the distinctive distributions of post-LayerNorm and post-GELU activations within ViTs, rendering conventional hardware-friendly quantizers ineffective, particularly in low-bit scenarios. To address this issue, we propose a novel framework called Activation-Distribution-Friendly post-training Quantization for Vision Transformers, ADFQ-ViT. Concretely, we introduce the Per-Patch Outlier-aware Quantizer to tackle irregular outliers in post-LayerNorm activations. This quantizer refines the granularity of the uniform quantizer to a per-patch level while retaining a minimal subset of values exceeding a threshold at full-precision. To handle the non-uniform distributions of post-GELU activations between positive and negative regions, we design the Shift-Log2 Quantizer, which shifts all elements to the positive region and then applies log2 quantization. Moreover, we present the Attention-score enhanced Module-wise Optimization which adjusts the parameters of each quantizer by reconstructing errors to further mitigate quantization error. Extensive experiments demonstrate ADFQ-ViT provides significant improvements over various baselines in image classification, object detection, and instance segmentation tasks at 4-bit. Specifically, when quantizing the ViT-B model to 4-bit, we achieve a 10.23% improvement in Top-1 accuracy on the ImageNet dataset.
TFormer: A Transmission-Friendly ViT Model for IoT Devices
Sun Yat-sen University(中山大学);Beijing Jiaotong University(北京交通大学);Meta AI;New York University(纽约大学);Michigan State University(密歇根州立大学);Beijing University of Posts and Telecommunications(北京邮电大学);Swinburne University of Technology(斯威本科技大学)
DopQ-ViT: Towards Distribution-Friendly and Outlier-Aware Post-Training Quantization for Vision Transformers
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Department of Computer Science, City University of Hong Kong(香港城市大学计算机科学系)
AdaLog: Post-Training Quantization for Vision Transformers with Adaptive Logarithm Quantizer
State Key Laboratory of Virtual Reality Technology and Systems, Beihang University(北京航空航天大学虚拟现实技术与系统国家重点实验室);School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院)
MobilePlantViT: A Mobile-friendly Hybrid ViT for Generalized Plant Disease Image Classification
University of Asia Pacific(亚太大学);Bangladesh University of Business and Technology(孟加拉国商业与技术大学);Techno International New Town(科技国际新城大学);American International University-Bangladesh(孟加拉国美国国际大学)
Rethinking Local Perception in Lightweight Vision Transformer
Tsinghua University(清华大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
MicroViTv2: Beyond the FLOPS for Edge Energy-Friendly Vision Transformers
Department of Electro-Optics, National Formosa University(国立.formosa大学电光学系);Department of Electrical Engineering, National Taipei University(台北国立大学电气工程系);College of Artificial Intelligence and Green Energy, National Yang Ming Chiao Tung University(阳明交通大学人工智能与再生能源学院)
SparseSAM: Structured Sparsification of Activations in Segment Anything Models
University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);College of Engineering & Computer Science, VinUniversity(Vin大学工程与计算机科学学院);VinUni-Illinois Smart Health Center, VinUniversity(Vin大学-伊利诺伊智能健康中心);DFKI;Max Planck Research School for Intelligent Systems (IMPRS-IS)(马克斯·普朗克智能系统研究学校);University of Stuttgart(斯图加特大学)
Boost Vision Transformer with GPU-Friendly Sparsity and Quantization
Academy for Engineering and Technology, Fudan University(复旦大学工程与应用技术研究院);NVIDIA Corporation(英伟达公司);School for Information Science and Technology, Fudan University(复旦大学信息科学与工程学院)
University of Macau(澳门大学);Nanjing University of Science and Technology(南京理工大学);Singapore Management University(新加坡管理大学);Shanghai Jiaotong University(上海交通大学)
RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
AFFMAE: Scalable Vision Pre-Training for High-Resolution Microscopy Segmentation on Desktop Hardware
Department of Laboratory Medicine & Pathology, University of Washington(华盛顿大学检验医学与病理学系);Paul G. Allen School of Computer Science & Engineering, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院);Electrical Engineering & Computer Science, Oregon State University(俄勒冈州立大学电气工程与计算机科学系)
TransGAN: Two Pure Transformers Can Make One Strong GAN, and That Can Scale Up
University of Texas at Austin(德克萨斯大学奥斯汀分校);UC Santa Barbara(加州大学圣塔芭芭拉分校);MIT-IBM Watson AI Lab(麻省理工学院-IBM沃森人工智能实验室)
最近对Transformers的爆炸性兴趣表明它们有潜力成为计算机视觉任务的强大“通用”模型,例如分类,检测和分割。虽然这些尝试主要研究判别模型,但我们在一些更困难的视觉任务上探索了Transformers,例如,生成对抗网络(GANs)。我们的目标是进行第一个试点研究,建立一个完全没有卷积的GAN,只使用纯粹的基于transformer的架构。我们的香草GAN架构,被称为transGAN,由一个内存友好的基于transformer的生成器,逐步增加特征分辨率,并相应地多尺度的搜索,以同时捕获语义上下文和低级别的纹理。在此基础上,我们引入了网格自关注的新模块,以进一步缓解内存瓶颈,从而将TransGAN扩展到高分辨率生成。我们还开发了一个独特的训练配方,包括一系列技术,可以减轻transGAN的训练不稳定性问题,如数据增强,修改归一化和相对位置编码。与当前使用卷积主干的最先进的GANs相比,我们最好的架构实现了极具竞争力的性能。具体来说,TransGAN在STL-10上设置了10.43的最新初始得分和18.28的FID,优于StyleGAN-V2。当涉及到更高分辨率(例如256 x 256)的生成任务时,例如在CelebA-HQ和LSUN-Church上,TransGAN继续生成具有高保真度和令人印象深刻的纹理细节的各种视觉示例。此外,我们深入研究基于transformer的生成模…
TWEO: Transformers Without Extreme Outliers Enables FP8 Training And Quantization For Dummies
Nationa Key Laboratory for Novel Software Technology(新型软件技术国家实验室);School of Artificial Intelligence(人工智能学院);Zhongguancun Academy(中关村学院);University of Science and Technology of China(中国科学技术大学)