arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.15369cs.CVcs.AI
收藏

IPTQ-ViT:面向全整数视觉Transformer的非线性函数训练后量化方法

IPTQ-ViT: Post-Training Quantization of Non-linear Functions for Integer-only Vision Transformers

Chungnam National University(Chungnam 国立大学);Electronics and Telecommunications Research Institute (ETRI)(电子与电信研究院)

Gihwan Kim, Jemin Lee, Hyungshin Kim

AI总结:

针对现有视觉Transformer量化方法难以兼顾无重训练、全整数推理与精度的问题,提出IPTQ-ViT训练后量化框架,通过定制非线性近似函数与层适配选择策略,实现了优于同类PTQ方法、媲美QAT方法的性能。

摘要:

此前面向视觉Transformer的量化感知训练(QAT)方法依赖代价高昂的重训练来弥补非线性层量化带来的精度损失,限制了其在资源受限环境中的应用。与之相对,现有训练后量化(PTQ)方法要么仅对非线性函数做部分量化,要么通过调整激活分布维持精度,但均无法实现全整数推理。本文提出IPTQ-ViT,这是一种无需重训练、可实现全整数视觉Transformer部署的新型PTQ框架。我们设计了两类近似函数:针对视觉数据优化的基于多项式的GELU,以及用于提升PTQ场景下近似精度的基于位移操作的Softmax。此外,我们提出了一种融合量化敏感度、扰动程度与计算成本的统一度量指标,可为每个激活层选择最优近似函数。实验结果显示,IPTQ-ViT性能优于此前的PTQ方法,在图像分类任务上最高实现6.44个百分点(平均1.78个百分点)的Top-1精度提升,在目标检测任务上实现1.0 mAP的提升。在W8A8和W4A8量化位宽设置下,IPTQ-ViT性能优于采用部分浮点运算的PTQ方法,可达到与全整数量化感知训练方法相当的精度与推理延迟。我们计划开源代码,仓库地址为https://github.com/gihwan-kim/IPTQ-ViT.git。

英文摘要:

Previous Quantization-Aware Training (QAT) methods for vision transformers rely on expensive retraining to recover accuracy loss in non-linear layer quantization, limiting their use in resource-constrained environments. In contrast, existing Post-Training Quantization (PTQ) methods either partially quantize non-linear functions or adjust activation distributions to maintain accuracy but fail to achieve fully integer-only inference. In this paper, we introduce IPTQ-ViT, a novel PTQ framework for fully integer-only vision transformers without retraining. We present approximation functions: a polynomial-based GELU optimized for vision data and a bit-shifting-based Softmax designed to improve approximation accuracy in PTQ. In addition, we propose a unified metric integrating quantization sensitivity, perturbation, and computational cost to select the optimal approximation function per activation layer. IPTQ-ViT outperforms previous PTQ methods, achieving up to 6.44\%p (avg. 1.78\%p) top-1 accuracy improvement for image classification, 1.0 mAP for object detection. IPTQ-ViT outperforms partial floating-point PTQ methods under W8A8 and W4A8, and achieves accuracy and latency comparable to integer-only QAT methods. We plan to release our code https://github.com/gihwan-kim/IPTQ-ViT.git.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑