Cited by 129Advanced Neural Network ApplicationsDomain Adaptation and Few-Shot LearningAdvanced Data Compression Techniques

RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers

Open access
Li, Zhikai, Xiao, Junrui, Yang, Lianwei, Gu, Qingyi·2023·2023 IEEE/CVF International Conference on Computer Vision (ICCV)

Abstract

Post-training quantization (PTQ), which only requires a tiny dataset for calibration without end-to-end retraining, is a light and practical model compression technique. Recently, several PTQ schemes for vision transformers (ViTs) have been presented; unfortunately, they typically suffer from non-trivial accuracy degradation, especially in low-bit cases. In this paper, we propose RepQ-ViT, a novel PTQ framework for ViTs based on quantization scale reparameterization, to address the above issues. RepQ-ViT decouples the quantization and inference processes, where the former employs complex quantizers and the latter employs scale-reparameterized simplified quantizers. This ensures both accurate quantization and efficient inference, which distinguishes it from existing approaches that sacrifice quantization performance to meet the target hardware. More specifically, we focus on two components with extreme distributions: post-LayerNorm activations with severe inter-channel variation and post-Softmax activations with power-law features, and initially apply channel-wise quantization and log$\sqrt 2 $ quantization, respectively. Then, we reparameterize the scales to hardware-friendly layer-wise quantization and log2 quantization for inference, with only slight accuracy or computational costs. Extensive experiments are conducted on multiple vision tasks with different model variants, proving that RepQ-ViT, without hyperparameters and expensive reconstruction procedures, can outperform existing strong baselines and encouragingly improve the accuracy of 4-bit PTQ of ViTs to a usable level. Code is available at https://github.com/zkkli/RepQ-ViT.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1109/iccv51070.2023.01580

Cites

35 of 35 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • RepQuant advocates for a per-channel dual clipping strategy that establishes specific numerical upper and lower limits for each channel, aiming for accurate quantization while minimizing bias within the quantization space.

    “Extending this concept, RepQuant [46] advocates for a per-channel dual clipping strategy that establishes specific numerical upper and lower limits for each channel, aiming for accurate quantization while minimizing bias within the quantization space.”

    From Model Quantization and Hardware Acceleration for Vision Transformers: A Comprehensive Survey (2024) · cites this paper as [46]

    Section 3.2 (p. 4) supports channel-wise quantization to address inter-channel variation and improve accuracy, using a scale and zero-point for each channel. It does not describe a per-channel dual-clipping strategy, channel-specific upper and lower clipping limits, or minimizing bias in the quantization space. Instead, it describes reparameterizing channel-wise quantization into layer-wise quantization for inference. (LLM, conf=0.88)

    Experimental — accuracy not yet measured
  • RepQ-ViT, RepQuant, and LRP-QViT initially employ log√2 quantization, then reparameterize scales to base 2 to enable bit-shifting operations in inference.

    “RepQ-ViT [45], RepQuant [46] and LRP-QViT [47] initially employs log √ 2 quantization. This approach is better suited for the properties of attention scores in the activations with power-law distributions. Subsequently, the scales are reparameterized to change the base to 2, enabling bit-shifting operations in inference, which are more hardware-friendly.”
  • RepQ-ViT, RepQuant, and LRP-QViT initially employ log√2 quantization, then reparameterize scales to base 2 to enable bit-shifting operations in inference.

    “RepQ-ViT [45], RepQuant [46] and LRP-QViT [47] initially employs log √ 2 quantization. This approach is better suited for the properties of attention scores in the activations with power-law distributions. Subsequently, the scales are reparameterized to change the base to 2, enabling bit-shifting operations in inference, which are more hardware-friendly.”
  • RepQ-ViT proposes the Scale Reparam method for Post-LayerNorm activations, applying channel-wise quantization then reparameterizing channel-wise scales and zero points into a hardware-friendly layer-wise format, and modifying affine factors of LayerNorm and weights of the following layer.

    “RepQ-ViT [45] proposes the Scale Reparam method for Post-LayerNorm activations involving a process that begins with applying channel-wise quantization to accurately capture their severe inter-channel variations. This initial step is followed by a critical reparameterization: transforming the channel-wise quantization scales and zero points into a more hardware-friendly layer-wise format. In”

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

3 of the 38 references couldn’t be matched to a known paper.

Research works printed but not linked: 7

  1. [4][4] Yifu Ding, Haotong Qin, Qinghua Yan, Zhenhua Chai, Junjie Liu, Xiaolin Wei, and Xianglong Liu. Towards accurate posttraining quantization for vision transformer. In Proceedings of the 30th ACM International Conference on Multimedia , pages 5380-5388, 2022. 1, 3, 4, 6, 7 -
  2. [8][8] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on vision transformer. IEEE transactions on pattern analysis and machine intelligence , 2022. 1, 2 -
  3. [9][9] Kaiming He, Georgia Gkioxari, Piotr Doll´ ar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision , pages 2961-2969, 2017. 6 -
  4. [13][13] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems , 25, 2012. 6 -
  5. [17][17] Zhikai Li, Mengjuan Chen, Junrui Xiao, and Qingyi Gu. Psaq-vit v2: Towards accurate and general datafree quantization for vision transformers. arXiv preprint arXiv:2209.05687 , 2022. 3 - · arXiv
  6. [32][32] Peisong Wang, Qiang Chen, Xiangyu He, and Jian Cheng. Towards accurate post-training network quantization via bitsplit and stitching. In International Conference on Machine Learning , pages 9847-9856. PMLR, 2020. 1 -
  7. [34][34] Zhewei Yao, Zhen Dong, Zhangcheng Zheng, Amir Gholami, Jiali Yu, Eric Tan, Leyuan Wang, Qijing Huang, Yida Wang, Michael Mahoney, et al. Hawq-v3: Dyadic neural network quantization. In International Conference on Machine Learning , pages 11875-11886. PMLR, 2021. 4 -

Cited by

Sorted by citations

Authors
Li, Z., Xiao, J., Yang, L., & Gu, Q.
Affiliations
Chinese Academy of Sciences (CN)
Venue
2023 IEEE/CVF International Conference on Computer Vision (ICCV)
Publisher
IEEE
Published
2023-10-01
Pages
17181-17190
OpenAlex
W4390873673
Cited by
127
References
38
Citations by year
2026: 39 · 2025: 59 · 2024: 26 · 2023: 3
FWCI
13.59
Type
conference paper
Language
en
Open access
Locations
  • IEEE/CVF International Conference on Computer Vision (ICCV) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • Research and Development
  • National Natural Science Foundation of China
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Data Compression Techniques
Keywords
post-training quantization, vision transformer, model compression, layer-wise quantization, softmax activation, low-bit quantization, inference efficiency

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review