Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Instance-Aware Group Quantization for Vision Transformers

About

Post-training quantization (PTQ) is an efficient model compression technique that quantizes a pretrained full-precision model using only a small calibration set of unlabeled samples without retraining. PTQ methods for convolutional neural networks (CNNs) provide quantization results comparable to full-precision counterparts. Directly applying them to vision transformers (ViTs), however, incurs severe performance degradation, mainly due to the differences in architectures between CNNs and ViTs. In particular, the distribution of activations for each channel vary drastically according to input instances, making PTQ methods for CNNs inappropriate for ViTs. To address this, we introduce instance-aware group quantization for ViTs (IGQ-ViT). To this end, we propose to split the channels of activation maps into multiple groups dynamically for each input instance, such that activations within each group share similar statistical properties. We also extend our scheme to quantize softmax attentions across tokens. In addition, the number of groups for each layer is adjusted to minimize the discrepancies between predictions from quantized and full-precision models, under a bit-operation (BOP) constraint. We show extensive experimental results on image classification, object detection, and instance segmentation, with various transformer architectures, demonstrating the effectiveness of our approach.

Jaehyeon Moon, Dohyung Kim, Junyong Cheon, Bumsub Ham• 2024

Related benchmarks

TaskDatasetResultRank
Object DetectionCOCO 2017 (val)--
2843
Instance SegmentationCOCO 2017 (val)--
1275
Image ClassificationImageNet (val)
Top-1 Acc83.8
1206
Camouflaged Object DetectionCOD10K (test)
S-measure (S_alpha)0.67
306
Camouflaged Object DetectionCOD10K
S-measure (S_alpha)0.7533
217
Camouflaged Object DetectionChameleon
S-measure (S_alpha)77.23
207
Camouflaged Object DetectionNC4K
MAE0.0547
72
Camouflaged Object DetectionNC4K
S_alpha81.8
31
Camouflaged Object DetectionCAMO (test)
S_alpha67.4
18
Camouflaged Object DetectionCAMO
75.11
14
Showing 10 of 11 rows

Other info

Code

Follow for update