paper-with-me

Papers

RepQuant: Towards Accurate Post-Training Quantization of Large Transformer Models via Scale Reparameterization

2024-02-08 · Zhikai Li, Xuewen Liu, Jing Zhang, Qingyi Gu

Large transformer models have demonstrated remarkable success. Post-training quantization (PTQ), which requires only a small dataset for calibration and avoids end-to-end retraining, is a promising solution for compressing these large models. Regrettably, existing PTQ methods typically exhibit non-trivial performance loss. We find that the performance bottleneck stems from over-consideration of hardware compatibility in the quantization process, compelling them to reluctantly employ simple quantizers, albeit at the expense of accuracy. With the above insights, we propose RepQuant, a novel PTQ framework with quantization-inference decoupling paradigm to address the above issues. RepQuant employs complex quantizers in the quantization process and simplified quantizers in the inference process, and performs mathematically equivalent transformations between the two through quantization scale reparameterization, thus ensuring both accurate quantization and efficient inference. More specifically, we focus on two components with extreme distributions: LayerNorm activations and Softmax activations. Initially, we apply channel-wise quantization and log$\sqrt{2}$ quantization, respectively, which are tailored to their distributions. In particular, for the former, we introduce a learnable per-channel dual clipping scheme, which is designed to efficiently identify outliers in the unbalanced activations with fine granularity. Then, we reparameterize the scales to hardware-friendly layer-wise quantization and log2 quantization for inference. Moreover, quantized weight reconstruction is seamlessly integrated into the above procedure to further push the performance limits. Extensive experiments are performed on different large-scale transformer variants on multiple tasks, including vision, language, and multi-modal transformers, and RepQuant encouragingly demonstrates significant performance advantages.

📄 PDF Abstract BibTeX arXiv:2402.05628

Code (0)

등록된 구현이 없습니다.

Tasks

Quantization

Methods 이 논문이 사용한 방법론

Focus 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Towards Accurate Post-Training Quantization for Vision Transformer

2023-03-25 · Yifu Ding, Haotong Qin, Qinghua Yan, Zhenhua Chai 외

Vision transformer emerges as a potential architecture for vision tasks. However, the intense computation and non-negligible delay hinder its application in the real world. As a widespread model compression technique, ex…

Model CompressionQuantization

Training Dynamics Impact Post-Training Quantization Robustness

2025-10-07 · Albert Catalan-Tatjer, Niccolò Ajroldi, Jonas Geiping arxiv

While post-training quantization is widely adopted for efficient deployment of large language models, the mechanisms underlying quantization robustness remain unclear. We conduct a comprehensive analysis of quantization …

AHCPTQ: Accurate and Hardware-Compatible Post-Training Quantization for Segment Anything Model

2025-03-05 · Wenlun Zhang, Shimpei Ando, Kentaro Yoshioka

The Segment Anything Model (SAM) has demonstrated strong versatility across various visual tasks. However, its large storage requirements and high computational cost pose challenges for practical deployment. Post-trainin…

Instance SegmentationQuantizationSemantic Segmentation

Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruning

2022-08-24 · Elias Frantar, Sidak Pal Singh, Dan Alistarh

We consider the problem of model compression for deep neural networks (DNNs) in the challenging one-shot/post-training setting, in which we are given an accurate trained model, and must compress it without any retraining…

Model CompressionQuantization

Post-training Quantization for Text-to-Image Diffusion Models with Progressive Calibration and Activation Relaxing

2023-11-10 · Siao Tang, Xin Wang, Hong Chen, Chaoyu Guan 외

High computational overhead is a troublesome problem for diffusion models. Recent studies have leveraged post-training quantization (PTQ) to compress diffusion models. However, most of them only focus on unconditional mo…

Quantization