paper-with-me

홈 › Papers

FQ-ViT: Post-Training Quantization for Fully Quantized Vision Transformer

2021-11-27 · Yang Lin, Tianyu Zhang, Peiqin Sun, Zheng Li, Shuchang Zhou

Network quantization significantly reduces model inference complexity and has been widely used in real-world deployments. However, most existing quantization methods have been developed mainly on Convolutional Neural Networks (CNNs), and suffer severe degradation when applied to fully quantized vision transformers. In this work, we demonstrate that many of these difficulties arise because of serious inter-channel variation in LayerNorm inputs, and present, Power-of-Two Factor (PTF), a systematic method to reduce the performance degradation and inference complexity of fully quantized vision transformers. In addition, observing an extreme non-uniform distribution in attention maps, we propose Log-Int-Softmax (LIS) to sustain that and simplify inference by using 4-bit quantization and the BitShift operator. Comprehensive experiments on various transformer-based architectures and benchmarks show that our Fully Quantized Vision Transformer (FQ-ViT) outperforms previous works while even using lower bit-width on attention maps. For instance, we reach 84.89% top-1 accuracy with ViT-L on ImageNet and 50.8 mAP with Cascade Mask R-CNN (Swin-S) on COCO. To our knowledge, we are the first to achieve lossless accuracy degradation (~1%) on fully quantized vision transformers. The code is available at https://github.com/megvii-research/FQ-ViT.

📄 PDF Abstract BibTeX arXiv:2111.13824

Code (1)

megvii-research/FQ-ViT 공식 구현 pytorch

Tasks

Quantization

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
RPN A Region Proposal Network, or RPN, is a fully convolutional network that simultaneously predicts object bounds and objectness scores at each position. The RPN is trained…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Vision Transformer The Vision Transformer, or ViT, is a model for image classification that employs a Transformer-like architecture over…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Adam 설명 없음

Similar Papers 제목 키워드 기반

CPT-V: A Contrastive Approach to Post-Training Quantization of Vision Transformers

2022-11-17 · Natalia Frumkin, Dibakar Gope, Diana Marculescu

When considering post-training quantization, prior work has typically focused on developing a mixed precision scheme or learning the best way to partition a network for quantization. In our work, CPT-V, we look at a gene…

QuantizationSelf-Supervised Learning

TSPTQ-ViT: Two-scaled post-training quantization for vision transformer

2023-05-22 · Yu-Shan Tai, Ming-Guang Lin, An-Yeu, Wu

Vision transformers (ViTs) have achieved remarkable performance in various computer vision tasks. However, intensive memory and computation requirements impede ViTs from running on resource-constrained edge devices. Due …

Quantization

Colinearity Decay: Training Quantization-Friendly ViTs with Outlier Decay

2026-05-02 · Jin Tong, Guang Liang, Peilin Sun, Jianxin Wu arxiv

Low-bit quantization is a practical route for efficiently deploying vision Transformers, yet activation outliers complicate fully quantized deployment. Existing methods either handle quantization post-training or suppres…

Achieving binary weight and activation for LLMs using Post-Training Quantization

2025-04-07 · Siqing Song, Chuang Wang, Ruiqi Wang, Yi Yang 외

Quantizing large language models (LLMs) to 1-bit precision significantly reduces computational costs, but existing quantization techniques suffer from noticeable performance degradation when using weight and activation p…

Quantization

Data-Free Group-Wise Fully Quantized Winograd Convolution via Learnable Scales

2024-12-27 · CVPR 2025 1 · Shuokai Pan, Gerti Tuzi, Sudarshan Sreeram, Dibakar Gope

Despite the revolutionary breakthroughs of large-scale text-to-image diffusion models for complex vision and downstream tasks, their extremely high computational and storage costs limit their usability. Quantization of d…

image-classificationImage ClassificationImage GenerationQuantization+2