LRQuant: A Unified and Learnable Framework to Post-training Quantization for Transformer-based Large Foundation Models.

计算机科学 变压器 量化(信号处理) 基础(证据) 软件工程 算法 电气工程 工程类 电压 历史 考古
作者
Jiaqi Zhao,Chao Zeng,Ming Wang,L Han,Yuzhang Shang,Jing Zhang,Liqiang Nie
出处
期刊:PubMed [National Institutes of Health]
卷期号:PP
标识
DOI:10.1109/tpami.2025.3599479
摘要

Post-training quantization (PTQ) for transformer-based large foundation models (LFMs) significantly accelerates model inference and relieves memory constraints, without incurring model training. However, existing methods face three main issues: 1) The scaling factors, which are commonly used in scale reparameterization based weight-activation quantization for mitigating the quantization errors, are mostly hand-crafted defined which may lead to suboptimal results; 2) The formulation of current quantization error defined by L2-norm ignores the directional shifts after quantization; 3) Most methods are devised tailored for single scenario, i.e., only evaluated on LLMs or only designed for weight-only quantization, which lacks of a comprehensive evaluation on diverse benchmarks and a broad application scope. To address these challenges, this paper introduces a unified Learnable and Robust post-training Quantization framework for transformer based LFMs and various quantization scenarios, called LRQuant. Firstly, we consider an efficient block-wise learnable paradigm to find optimal scaling factors which are initialized by logarithmic activation equivalent and get suitable clipping range of quantization steps. In addition, we empirically find that only relying on MSE loss could hardly lead to optimal quantization results, so we reformulate the quantization error and then propose a novel loss function based on the negative logarithm of cosine similarity (NLC loss) between outputs of full-precision and quantized block. To fully investigate the potentiality of our learnable paradigm, we propose a more superior version LRQuant+. Specifically, we first propose a dynamically weighted scheme to balance MSE and NLC loss, and then devise learnable rotation vectors to further directly reduce directional gaps. In addition, we improve the block-wise optimization framework into a novel two-branch nature which jointly considers the error propagation and homologous reconstruction error. Extensive experiments demonstrate the superiority of our LRQuant and LRQuant+, as well as their unified effectiveness across various LFMs for both weight-activation and weight-only quantization, especially under challenging quantization scenarios, i.e., W4A4 and W2A16 on LLMs, ViTS, and MLLMs. Codes are available at https://github.com/zjq0455/LRQuant.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
大壮完成签到,获得积分10
刚刚
Hello应助一人做事一人汤采纳,获得30
刚刚
九号球完成签到,获得积分10
刚刚
偷喝汽水完成签到,获得积分10
刚刚
1秒前
1秒前
1秒前
粒粒糖发布了新的文献求助10
1秒前
118QQ完成签到,获得积分10
1秒前
1秒前
2秒前
2秒前
2秒前
杨桃发布了新的文献求助10
2秒前
情怀应助科研狗采纳,获得10
2秒前
3秒前
3秒前
young发布了新的文献求助10
3秒前
蒙子沐发布了新的文献求助10
4秒前
水波不兴发布了新的文献求助10
4秒前
Akim应助害怕的雁菱采纳,获得10
4秒前
5秒前
小二郎应助华hua采纳,获得10
5秒前
乙酰CoA发布了新的文献求助10
6秒前
烂漫念蕾完成签到,获得积分10
6秒前
Copyright应助carl采纳,获得10
6秒前
小二郎应助筱瞳采纳,获得10
6秒前
6秒前
ctttt发布了新的文献求助10
7秒前
rico发布了新的文献求助10
7秒前
初景发布了新的文献求助30
7秒前
7秒前
英吉利25发布了新的文献求助10
7秒前
星辰大海应助lei采纳,获得10
7秒前
蓝天发布了新的文献求助10
8秒前
8秒前
taoli发布了新的文献求助10
10秒前
10秒前
10秒前
77发布了新的文献求助10
11秒前
高分求助中
Principles of Economics, 11th Edition 10000
University Physics with Modern Physics, 16th edition 10000
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
48V Low-voltage Power Distribution Network (PDN) Architecture Industry Report, 2024 800
ズームレンズの光学設計に関する研究 800
Fundamentals of Pharmaceutical and Biologics Regulations: A Global Perspective, Second Edition 700
Matrix Methods in Data Mining and Pattern Recognition Second Edition 610
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7294891
求助须知:如何正确求助?哪些是违规求助? 8913448
关于积分的说明 18872546
捐赠科研通 6961297
什么是DOI,文献DOI怎么找? 3210143
关于科研通互助平台的介绍 2379484
邀请新用户注册赠送积分活动 2186400