RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers
摘要
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 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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 65 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- PTQ4DiT: Post-training Quantization for Diffusion Transformers 引用了 OmniQuant: Omnidirectionally Calibrated Quantization for Large Language Models
- PTQ4DiT: Post-training Quantization for Diffusion Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- PTQ4DiT: Post-training Quantization for Diffusion Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- I-ViT: Integer-only Quantization for Efficient Vision Transformer Inference 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- I-ViT: Integer-only Quantization for Efficient Vision Transformer Inference 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- I-ViT: Integer-only Quantization for Efficient Vision Transformer Inference 引用了 Training data-efficient image transformers & distillation through attention
- I-ViT: Integer-only Quantization for Efficient Vision Transformer Inference 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 Training data-efficient image transformers & distillation through attention
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer 引用了 Training data-efficient image transformers & distillation through attention
引用它的顶会 Paper65
- OmniQuant: Omnidirectionally Calibrated Quantization for Large Language ModelsWenqi Shao, Mengzhao Chen, Zhaoyang Zhang, Peng Xu 等ICLR 2024 · 395 次引用
- I-ViT: Integer-only Quantization for Efficient Vision Transformer InferenceZhikai Li, Qingyi GuICCV 2023 · 176 次引用
- PTQ4DiT: Post-training Quantization for Diffusion TransformersJunyi Wu, Haoxuan Wang, Yuzhang Shang, Mubarak Shah 等NeurIPS 2024 · 87 次引用
- SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch NormalizationJialong Guo, Xinghao Chen, Yehui Tang, Yunhe WangICML 2024 · 40 次引用
- PTQ4SAM: Post-Training Quantization for Segment AnythingChengtao Lv, Hong Chen, Jinyang Guo, Yifu Ding 等CVPR 2024 · 22 次引用
它引用的 Paper17
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li 等ICLR 2021 · 7,353 次引用
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 次引用
相关 Paper
- Towards Accurate Post-Training Quantization for Vision TransformerYifu Ding, Haotong Qin, Qinghua Yan, Zhenhua Chai 等ACM MM 2022 · 68 次引用
- AIQViT: Architecture-Informed Post-Training Quantization for Vision TransformersRunqing Jiang, Ye Zhang, Longguang Wang, Pengpeng Yu 等AAAI 2025 · 4 次引用
- Instance-Aware Group Quantization for Vision TransformersJaehyeon Moon, Dohyung Kim, Junyong Cheon, Bumsub HamCVPR 2024 · 11 次引用
- GPLQ: A General, Practical, and Lightning QAT Method for Vision TransformersGuang Liang, Xinyao Liu, Jianxin WuNeurIPS 2025 · 10 次引用
- FIMA-Q: Post-Training Quantization for Vision Transformers by Fisher Information Matrix ApproximationZhuguanyu Wu, Shihe Wang, Jiayi Zhang, Jiaxin Chen 等CVPR 2025
