RepQuant: Toward Accurate Post-Training Quantization of Large Transformer Models via Scale Reparameterization

IF 4.8 2区 计算机科学 Q1 COMPUTER SCIENCE, INFORMATION SYSTEMS
Zhikai Li;Xuewen Liu;Jing Zhang;Qingyi Gu
{"title":"RepQuant: Toward Accurate Post-Training Quantization of Large Transformer Models via Scale Reparameterization","authors":"Zhikai Li;Xuewen Liu;Jing Zhang;Qingyi Gu","doi":"10.1109/TETC.2026.3704498","DOIUrl":null,"url":null,"abstract":"Large transformer models have demonstrated remarkable success across vision, language, and multi-modal domains. However, due to their complex structures, they are criticized for high latency and resource consumption during inference. Post-training quantization (PTQ), which requires only a small dataset for calibration and avoids end-to-end retraining, is a promising solution for compressing these large models. Regrettably, existing PTQ methods typically exhibit non-trivial performance loss, especially in low-bit settings. We find that the performance bottleneck stems from over-consideration of hardware compatibility in the quantization process, compelling them to reluctantly employ simple quantizers, albeit at the expense of accuracy. With the above insights, we propose RepQuant, a novel PTQ framework with quantization-inference decoupling paradigm to address the above issues, and it is compatible with multiple transformer variants. RepQuant employs complex quantizers in the quantization process and simplified quantizers in the inference process, and performs mathematically equivalent transformations between the two through quantization scale reparameterization, thus ensuring both accurate quantization and efficient inference. More specifically, we focus on two components with extreme distributions: LayerNorm activations with severe inter-channel variations and Softmax activations with power-law characteristics. Initially, we apply channel-wise quantization and log<inline-formula><tex-math>$\\sqrt{2}$</tex-math></inline-formula> quantization, respectively, which are tailored to their distributions. In particular, for the former, we introduce a learnable per-channel dual clipping scheme, which is designed to efficiently identify outliers in the unbalanced activations with fine granularity. Then, we reparameterize the scales to hardware-friendly layer-wise quantization and log2 quantization for inference. Moreover, quantized weight reconstruction is seamlessly integrated into the above procedure to further push the performance limits. Extensive experiments are performed on different large-scale transformer variants on multiple tasks, including vision, language, and multi-modal transformers, and RepQuant encouragingly demonstrates significant performance advantages and strong robustness.","PeriodicalId":13156,"journal":{"name":"IEEE Transactions on Emerging Topics in Computing","volume":"14 3","pages":"1046-1061"},"PeriodicalIF":4.8000,"publicationDate":"2026-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Emerging Topics in Computing","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11575757/","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/6/23 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Large transformer models have demonstrated remarkable success across vision, language, and multi-modal domains. However, due to their complex structures, they are criticized for high latency and resource consumption during inference. Post-training quantization (PTQ), which requires only a small dataset for calibration and avoids end-to-end retraining, is a promising solution for compressing these large models. Regrettably, existing PTQ methods typically exhibit non-trivial performance loss, especially in low-bit settings. We find that the performance bottleneck stems from over-consideration of hardware compatibility in the quantization process, compelling them to reluctantly employ simple quantizers, albeit at the expense of accuracy. With the above insights, we propose RepQuant, a novel PTQ framework with quantization-inference decoupling paradigm to address the above issues, and it is compatible with multiple transformer variants. RepQuant employs complex quantizers in the quantization process and simplified quantizers in the inference process, and performs mathematically equivalent transformations between the two through quantization scale reparameterization, thus ensuring both accurate quantization and efficient inference. More specifically, we focus on two components with extreme distributions: LayerNorm activations with severe inter-channel variations and Softmax activations with power-law characteristics. Initially, we apply channel-wise quantization and log$\sqrt{2}$ quantization, respectively, which are tailored to their distributions. In particular, for the former, we introduce a learnable per-channel dual clipping scheme, which is designed to efficiently identify outliers in the unbalanced activations with fine granularity. Then, we reparameterize the scales to hardware-friendly layer-wise quantization and log2 quantization for inference. Moreover, quantized weight reconstruction is seamlessly integrated into the above procedure to further push the performance limits. Extensive experiments are performed on different large-scale transformer variants on multiple tasks, including vision, language, and multi-modal transformers, and RepQuant encouragingly demonstrates significant performance advantages and strong robustness.
通过尺度再参数化实现大型变压器模型训练后的精确量化
大型变压器模型已经在视觉、语言和多模态领域取得了显著的成功。然而,由于其复杂的结构,它们在推理过程中被批评为高延迟和资源消耗。训练后量化(PTQ),只需要一个小的数据集进行校准,避免了端到端再训练,是压缩这些大型模型的一个很有前途的解决方案。遗憾的是,现有的PTQ方法通常表现出严重的性能损失,特别是在低位设置中。我们发现,性能瓶颈源于量化过程中对硬件兼容性的过度考虑,迫使他们不情愿地使用简单的量化器,尽管以准确性为代价。基于上述见解,我们提出了RepQuant,一种具有量化-推理解耦范式的新型PTQ框架来解决上述问题,并且它与多种变压器变体兼容。RepQuant在量化过程中使用复杂量化器,在推理过程中使用简化量化器,并通过量化尺度再参数化实现两者之间的数学等价转换,从而保证了量化的准确和推理的高效。更具体地说,我们关注极端分布的两个组件:具有严重通道间变化的LayerNorm激活和具有幂律特征的Softmax激活。最初,我们分别应用通道量化和log$\sqrt{2}$量化,这是针对它们的分布量身定制的。特别地,对于前者,我们引入了一种可学习的每通道双裁剪方案,该方案旨在以细粒度有效地识别非平衡激活中的异常值。然后,我们将尺度重新参数化为硬件友好的分层量化和log2量化进行推理。此外,量化权重重建被无缝集成到上述程序中,以进一步推动性能极限。在不同的大规模变压器变体上进行了广泛的实验,包括视觉、语言和多模态变压器,RepQuant令人鼓舞地展示了显著的性能优势和强大的鲁棒性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Emerging Topics in Computing
IEEE Transactions on Emerging Topics in Computing Computer Science-Computer Science (miscellaneous)
CiteScore
12.10
自引率
5.10%
发文量
113
期刊介绍: IEEE Transactions on Emerging Topics in Computing publishes papers on emerging aspects of computer science, computing technology, and computing applications not currently covered by other IEEE Computer Society Transactions. Some examples of emerging topics in computing include: IT for Green, Synthetic and organic computing structures and systems, Advanced analytics, Social/occupational computing, Location-based/client computer systems, Morphic computer design, Electronic game systems, & Health-care IT.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书