Fixed-point Quantization for Vision Transformer
Zhexin, Li2,3; Peisong Wang3; Zhiyuan Wang1; Jian Cheng3
2022-03-14
会议日期2021-10-22
会议地点Beijing, China
DOI10.1109/CAC53003.2021.9728246
英文摘要

Recently, transformer-based models has shown promising results on miscellaneous computer vision tasks. However, its high computation cost makes it neither practical to deploy on mobile devices, nor economic to compute on servers. In this paper, we propose two effective quantization schemes for reducing the memory usage and computation consumption of vision transformers. First, we develop an approximation-based Post-training Quantization (PTQ) approach which optimizes for a set of quantization scaling factors that minimize quantization errors. Moreover, we introduce a learning-based Quantization-aware Training (QAT) approach that allows for model finetuning after inserting quantization operations to restore accuracy. Furthermore, we reveal the complementary effects of learning-based approach and approximation-based approach in QAT and propose an effective strategy for the initialization of quantization parameters. We evaluate our approaches on ImageNet for different vision transformer models. Our quantization algorithms outperform the previous state-of-art approaches for both post-training quantization and quantization-aware training benchmark. With weights and activations in vision transformer quantized to 8-bit integers, we obtain a ×4 compression rate of model parameters with an accuracy drop of less than 0.2% for models of various scales.

内容类型会议论文
源URL[http://ir.ia.ac.cn/handle/173211/48703]  
专题类脑芯片与系统研究
通讯作者Zhiyuan Wang
作者单位1.Artificial Intelligence Research Center (AIRC), Defense Innovation Institute (DII), Beijing, China
2.School of Artificial Intelligence, University of Chinese Academy of Sciences, Beijing, China
3.NLPR & AiRiA, Institute of Automation, Chinese Academy of Sciences, Beijing, China
推荐引用方式
GB/T 7714
Zhexin, Li,Peisong Wang,Zhiyuan Wang,et al. Fixed-point Quantization for Vision Transformer[C]. 见:. Beijing, China. 2021-10-22.
个性服务
查看访问统计
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。


©版权所有 ©2017 CSpace - Powered by CSpace