LampQ: Towards Accurate Layer-wise Mixed Precision Quantization for Vision Transformers
Minjun Kim, Jaeri Lee, Jongjin Kim, Jeongin Yun, Yongmo Kwon, U Kang
TL;DR
Quantizing Vision Transformers efficiently is challenging due to differential sensitivity across layers and between module types. LampQ addresses this by adopting layer-wise mixed-precision with a type-aware Fisher-based metric, $ oldsymbol{ extOmega}_i = oldsymbol{ extalpha}_{t} \text{tr}(oldsymbol{F}_i) $, and an ILP-based initialization followed by iterative bit updates to reflect quantization feedback. Across image classification, object detection, and zero-shot quantization, LampQ achieves state-of-the-art accuracy and significant speedups over prior PTQ methods, while remaining compatible with existing baselines like AdaLog. The approach offers a practical pathway to deploy accurate ViT quantization on resource-constrained devices and opens avenues for extension to other vision and multimodal models.
Abstract
How can we accurately quantize a pre-trained Vision Transformer model? Quantization algorithms compress Vision Transformers (ViTs) into low-bit formats, reducing memory and computation demands with minimal accuracy degradation. However, existing methods rely on uniform precision, ignoring the diverse sensitivity of ViT components to quantization. Metric-based Mixed Precision Quantization (MPQ) is a promising alternative, but previous MPQ methods for ViTs suffer from three major limitations: 1) coarse granularity, 2) mismatch in metric scale across component types, and 3) quantization-unaware bit allocation. In this paper, we propose LampQ (Layer-wise Mixed Precision Quantization for Vision Transformers), an accurate metric-based MPQ method for ViTs to overcome these limitations. LampQ performs layer-wise quantization to achieve both fine-grained control and efficient acceleration, incorporating a type-aware Fisher-based metric to measure sensitivity. Then, LampQ assigns bit-widths optimally through integer linear programming and further updates them iteratively. Extensive experiments show that LampQ provides the state-of-the-art performance in quantizing ViTs pre-trained on various tasks such as image classification, object detection, and zero-shot quantization.
