arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.06649eess.IVcs.AIcs.CVcs.LG
收藏

2DQuant:面向图像超分辨率的低比特训练后量化

2DQuant: Low-bit Post-Training Quantization for Image Super-Resolution

Shanghai Jiao Tong University(上海交通大学);ETH Zürich(苏黎世联邦理工学院);Max Planck Institute for Informatics(马克斯·普朗克信息学研究所);Westlake University(西湖大学)

Kai Liu, Haotong Qin, Yong Guo, Xin Yuan, Linghe Kong, Guihai Chen, Yulun Zhang

AI总结:

针对低比特量化导致图像超分辨率模型、尤其transformer模型精度下降的问题,本文提出双阶段PTQ方法2DQuant,通过DOBI初始化边界并以DQC蒸馏校准,在2比特下显著提升PSNR、压缩率和推理速度。

摘要:

低比特量化已被广泛用于压缩图像超分辨率(SR)模型以进行边缘部署,它使先进的SR模型能够分别享有紧凑的低比特参数以及高效的整数/位运算构造,从而实现存储压缩和推理加速。然而,众所周知,与全精度(FP)对应模型相比,低比特量化会降低SR模型的精度。尽管已有若干工作试图缓解这种性能下降,但基于transformer的SR模型由于其独特的激活分布,仍会遭受严重的性能退化。在本文中,我们提出了一种用于图像超分辨率的双阶段低比特训练后量化(PTQ)方法,即2DQuant,可在低比特量化下实现高效且准确的SR。所提方法首先研究权重和激活,发现其分布具有对称性与非对称性共存以及长尾的特征。具体而言,我们提出了面向分布的边界初始化(Distribution-Oriented Bound Initialization,DOBI),使用不同的搜索策略为量化器搜索粗略边界。为获得精细化的量化器参数,我们进一步提出了蒸馏量化校准(Distillation Quantization Calibration,DQC),该方法采用蒸馏方式使量化模型向其FP对应模型学习。通过在不同比特和缩放因子上的大量实验,DOBI的性能即可达到最先进水平(SOTA),而在第二阶段之后,我们的方法在指标和视觉效果上均超越现有PTQ。在量化至2比特时,与SOTA相比,2DQuant在Set5(x2)上获得最高达4.52dB的PSNR提升,并享有3.60倍压缩率和5.08倍加速比。代码和模型将在https://github.com/Kai-Liu001/2DQuant提供。

英文摘要:

Low-bit quantization has become widespread for compressing image super-resolution (SR) models for edge deployment, which allows advanced SR models to enjoy compact low-bit parameters and efficient integer/bitwise constructions for storage compression and inference acceleration, respectively. However, it is notorious that low-bit quantization degrades the accuracy of SR models compared to their full-precision (FP) counterparts. Despite several efforts to alleviate the degradation, the transformer-based SR model still suffers severe degradation due to its distinctive activation distribution. In this work, we present a dual-stage low-bit post-training quantization (PTQ) method for image super-resolution, namely 2DQuant, which achieves efficient and accurate SR under low-bit quantization. The proposed method first investigates the weight and activation and finds that the distribution is characterized by coexisting symmetry and asymmetry, long tails. Specifically, we propose Distribution-Oriented Bound Initialization (DOBI), using different searching strategies to search a coarse bound for quantizers. To obtain refined quantizer parameters, we further propose Distillation Quantization Calibration (DQC), which employs a distillation approach to make the quantized model learn from its FP counterpart. Through extensive experiments on different bits and scaling factors, the performance of DOBI can reach the state-of-the-art (SOTA) while after stage two, our method surpasses existing PTQ in both metrics and visual effects. 2DQuant gains an increase in PSNR as high as 4.52dB on Set5 (x2) compared with SOTA when quantized to 2-bit and enjoys a 3.60x compression ratio and 5.08x speedup ratio. The code and models will be available at https://github.com/Kai-Liu001/2DQuant.

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

↑