ERQ: Error Reduction for Post-Training Quantization of Vision Transformers

Abstract

Post-training quantization (PTQ) for vision transformers (ViTs) has garnered significant attention due to its efficiency in compressing models. However, existing methods typically overlook the intricate interdependence between quantized weight and activation, leading to considerable quantization error. In this paper, we propose ERQ, a two-step PTQ approach meticulously crafted to sequentially reduce the quantization error arising from activation and weight quantization. ERQ first introduces Activation quantization error reduction (Aqer) that strategically formulates the minimization of activation quantization error as a Ridge Regression problem, tackling it by updating weights with full-precision. Subsequently, ERQ introduces Weight quantization error reduction (Wqer) that adopts an iterative approach to mitigate the quantization error induced by weight quantization. In each iteration, an empirically derived, efficient proxy is employed to refine the rounding directions of quantized weights, coupled with a Ridge Regression solver to curtail weight quantization error. Experimental results attest to the effectiveness of our approach. Notably, ERQ surpasses the state-of-the-art GPTQ by 22.36% in accuracy for W3A4 ViT-S.

Cite

Text

Zhong et al. "ERQ: Error Reduction for Post-Training Quantization of Vision Transformers." International Conference on Machine Learning, 2024.

Markdown

[Zhong et al. "ERQ: Error Reduction for Post-Training Quantization of Vision Transformers." International Conference on Machine Learning, 2024.](https://mlanthology.org/icml/2024/zhong2024icml-erq/)

BibTeX

@inproceedings{zhong2024icml-erq,
  title     = {{ERQ: Error Reduction for Post-Training Quantization of Vision Transformers}},
  author    = {Zhong, Yunshan and Hu, Jiawei and Huang, You and Zhang, Yuxin and Ji, Rongrong},
  booktitle = {International Conference on Machine Learning},
  year      = {2024},
  pages     = {61664-61680},
  volume    = {235},
  url       = {https://mlanthology.org/icml/2024/zhong2024icml-erq/}
}