吉林大学学报(工学版) ›› 2026, Vol. 56 ›› Issue (3): 793-801.doi: 10.13229/j.cnki.jdxbgxb.20240809

• 计算机科学与技术 • 上一篇    

基于敏感度分析的后训练式对话摘要混合精度量化

刘宇鹏(),张禹豪,孟鑫   

  1. 哈尔滨理工大学 计算机科学与技术学院,哈尔滨 150080
  • 收稿日期:2024-07-19 出版日期:2026-03-01 发布日期:2026-03-31
  • 作者简介:刘宇鹏(1978-),男,教授,博士. 研究方向:自然语言处理,机器翻译,医疗对话系统,智慧医疗,推荐系统,量子计算,情感分析.E-mail: flyeaglelyp@hrbust.edu.cn
  • 基金资助:
    国家自然科学青年基金项目(61300115);中国博士后科学基金项目(2014m561331);黑龙江省教育厅科技攻关项目(12521073)

Mixed-precision quantization of post-trained conversation summarization based on sensitivity analysis

Yu-peng LIU(),Yu-hao ZHANG,Xin MENG   

  1. School of Computer Science and Technology,Harbin University of Science and Technology,Harbin 150080,China
  • Received:2024-07-19 Online:2026-03-01 Published:2026-03-31

摘要:

本文提出了一种后训练对话摘要模型上层级混合精度整数量化方法,采用较为精确的基于增广Hessian矩阵方法评估层敏感度,考虑层间相关性的同时可以有效保留层内信息。由于对话摘要模型激活中存在大量离群值,直接对其量化会导致模型精度大幅下降。对此,本文又提出了一种先平滑,后混合精度量化的方法。首先使用平滑因子将激活离群值平移到权重,再根据权重和激活根据敏感度评估得分进行混合精度量化。该方法可以将模型由16 bit或32bit浮点数量化为4~16 bit混合精度,将模型存储需求降低,同时加快推理速度。在基准数据集SAMSum上,与经典基线系统比较取得了标志性性能提高,几乎和不量化模型性能持平。

关键词: 敏感度, 混合精度, 离群值, 对话式摘要

Abstract:

This paper proposes a mixed precision integer quantization method for the layer of a trained dialogue summarization model, which uses a more accurate method based on augmented Hessian matrix to evaluate layer sensitivity, considering inter-layer correlation while effectively preserving intra-layer information. Due to the large number of outliers in the conversation summarization model activation, quantifying them directly will result in significant decrease in model accuracy. In this paper, we propose a method of smoothing first and then mixed precision quantization. Activation outliers are first translated to weights using smoothing factors, and then weights and activations are quantified with mixed precision based on sensitivity assessment scores. This method can quantize the model from 16 bit or 32 bit floating-point to 4-16 bit mixed precision, which reduces the storage requirement of the model and accelerates the inference speed. On the benchmark dataset SAMSum, a significant performance improvement is achieved compared with the classical baseline system, which is almost the same as the performance of the non-quantized model.

Key words: sensitivity, mixed precision, outliers, conversation summarization

中图分类号: 

  • TP312

图1

量化前后对比"

图2

混合精度量化方法结构图"

图3

3种搜索方案对比"

图4

敏感度对比"

表1

实验模型介绍"

模型名称介 绍
LBART22基于BART23的预训练模型,在对话摘要任务上微调模型,共1亿4千万参数
DSMC 24基于Transformer的非预训练模型,参数量约7千万

表2

对比模型介绍"

量化方法主要思想量化位宽(A为激活,W为权重)
QBert25基于分组的量化方案,使用二阶泰勒展开来评估权重A8W8
MREM-P3将模型分成多个模块,采用并行策略同时为每个模块最小化量化带来的重构误差A8W8
BRECQ4利用神经网络的基本构建块,逐个进行重构,同时在跨层依赖和泛化误差之间取得了良好平衡A8W8
QDrop26通过随机丢弃来实现激活量化,并首次将激活的量化推进到2 bitA4W8
MrBiQ27利用多级二值化表示权重并允许不同数据表示激活A8W8
AdaQuant13通过分别优化每个层或块的参数,并使用校准集来设置激活动态范围,以最小化量化误差A4W8

图5

在DSMC上对比其他研究"

图6

在LBART上对比其他研究"

图7

在99.99%和98%评分搜索下的每层bit位宽设置"

表3

量化后不同位宽数量"

评分4 bit8 bit16 bit
99.99%311278
98%181741

表4

LBART在不同精度下的评估次数"

方法LBART 99%LBART 99.9%
8 bit4 bit8 bit4 bit
Hessian6667
AugHessian6867
[1] Dettmers T, Lewis M, Belkada Y, et al. GPT3. int8 (): 8-bit matrix multiplication for transformers at scale[J]. Advances in Neural Information Processing Systems,2022,35: 30318-30332.
[2] Zafrir O, Boudoukh G, Izsak P, et al. Q8BERT: Quantized 8bit bert[C]∥Proceedings of the Fifth Workshop on Energy Efficient Machine Learning and Cognitive Computing-NeurIPS Edition, Vancouver, Canada, 2019: 36-39.
[3] Bai H L, Hou L, Shang L F, et al. Towards efficient post-training quantization of pre-trained language models[J]. Advances in Neural Information Processing Systems, 2022, 35: 1405-1418.
[4] Li Y H, Gong R H, Tan X, et al. BRECQ: pushing the limit of post-training quantization by block reconstruction[C]∥International Conference on Learning Representations, Vienna, Austria, 2021, 2: 1-17.
[5] Wang K, Liu Z, Lin Y, et al. HAQ: hardware-aware automated quantization with mixed precision[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, USA, 2019: 8612-8620.
[6] Schaefer C J S, Joshi S, Li S,et al. Edge inference with fully differentiable quantized mixed precision neural networks[C]∥Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, USA, 2024: 8460-8469.
[7] Park E, Yoo S. PROFIT: a novel training method for sub-4-bit mobilenet models[C]∥Proceedings of the Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, 2020: 430-446.
[8] Yao Z W, Dong Z, Zheng Z C, et al. HAWQ-V3: dyadic neural network quantization[C]∥Proceedings of the International Conference on Machine Learning, Shenzhen, China, 2021: 11875-11886.
[9] Nahshan Y, Chmiel B, Baskin C, et al. Loss aware post-training quantization[J]. Machine Learning, 2021, 110(11-12): 3245-3262.
[10] Nagel M, Amjad R A, Van B M, et al. Up or down? Adaptive rounding for post-training quantization[C]∥Proceedings of the International Conference on Machine Learning, Vienna, Austria, 2020: 7197-7206.
[11] Yao Z W, Aminabadi R Y, Zhang M J, et al. ZeroQuant: efficient and affordable post-training quantization for large-scale transformers[J]. Advances in Neural Information Processing Systems, 2022, 35: 27168-27183.
[12] Cai Y, Yao Z, Dong Z, et al. Zeroq: a novel zero shot quantization framework[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020: 13169-13178.
[13] Hubara I, Nahshan Y, Hanani Y, et al. Accurate post training quantization with small calibration sets[C]∥Proceedings of the International Conference on Machine Learning, Online, 2021: 4466-4475.
[14] Frantar E, Alistarh D. Optimal brain compression: a framework for accurate post-training quantization and pruning[J]. Advances in Neural Information Processing Systems, 2022, 35: 4475-4488.
[15] Demidovskij A, Smirnov E.Effective post-training quantization of neural networks for inference on low power neural accelerator[C]∥International Joint Conference on Neural Networks, Glasgow, UK, 2020: 1-7.
[16] Zandonati B, Pol A A, Pierini M, et al. Fit: a metric for model sensitivity[C]∥Proceedings of ICLR, Addis Ababa, Ethiopia, 2022: 1-20.
[17] Zheng D, Liu Y, Li L. Leveraging inter-layer dependency for post-training quantization[J]. Advances in Neural Information Processing Systems, 2022, 35: 6666-6679.
[18] Wei X Y, Zhang Y C, Zhang X G, et al. Outlier suppression: pushing the limit of low-bit transformer language models[J]. Advances in Neural Information Processing Systems, 2022, 35: 17402-17414.
[19] Bondarenko Y, Nagel M, Blankevoort T. Understanding and overcoming the challenges of efficient transformer quantization[C]∥Proceedings of the Conference on Empirical Methods in Natural Language Processing, Punta Cana, Dominican Republic, 2021: 7947-7969.
[20] Zeng A, Liu X, Du Z, et al. GLM-130B: an open bilingual pre-trained model[C]∥Proceedings of ICLR, Kigali, Rwanda, 2023: 1-56.
[21] Wu H, Judd P, Zhang X, et al. Integer quantization for deep learning inference: principles and empirical evaluation[J/OL].[2024-07-06]. arXiv Preprint arXiv:.
[22] Fabbri A, Rahman F, Rizvi I, et al. ConvoSumm: conversation summarization benchmark and improved abstractive summarization with argument mining[C]∥Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, Bangkok, Thailand, 2021: 6866-6880.
[23] Lewis M, Liu Y, Goyal N, et al. BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension[C]∥Proceedings of the 58th Annual Meeting of the Association for Computational Linguistic, Florence, Italy, 2019: 7871-7880.
[24] Liu Y P, Zhang Y H, Liu G. A conversation summary generation method for medical consultations[P]. China Patent: ZL115964475A, 2023-04-14.
[25] Shen S, Dong Z, Ye J Y, et al. Q-BERT: hessian based ultra low precision quantization of bert[C]∥Proceedings of the AAAI Conference on Artificial Intelligence, New York, USA, 2020: 8815-8821.
[26] Wei X Y, Gong R H, Li Y H, et al. QDrop: randomly dropping quantization for extremely low-bit post-training quantization[C]∥Proceedings of ICLR, Online, 2022: 1-19.
[27] Jeon Y, Lee C, Cho E, et al. Mr. BIQ: post-training non-uniform quantization based on minimizing the reconstruction error[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, USA, 2022: 12319-12328.
[28] Goo C W, Chen Y N. Abstractive dialogue summarization with sentence-gated modeling optimized by dialogue acts[C]∥Proceedings of the IEEE Spoken Language Technology Workshop, Athens, Greece, 2018: 735-742.
[1] 杨果林,杨一凡,徐浩栋,罗桂军,肖洪波. 曲线盾构隧道施工期地表位移计算方法及影响因素分析[J]. 吉林大学学报(工学版), 2024, 54(7): 1997-2008.
[2] 章子玲,胡雄,亓寅,王微,陶志强,刘志峰. 基于向量投影响应面的数控机床几何误差分配方法[J]. 吉林大学学报(工学版), 2022, 52(2): 384-391.
[3] 陈东辉, 吕建华, 龙刚, 张宇晨, 常志勇. 基于ADAMS的半悬挂式农业机组静侧翻稳定性[J]. 吉林大学学报(工学版), 2018, 48(4): 1176-1183.
[4] 孙晓颖, 扈泽正, 杨锦鹏. 基于分层贝叶斯网络的车辆发动机系统电磁脉冲敏感度评估[J]. 吉林大学学报(工学版), 2018, 48(4): 1254-1264.
[5] 孙晓颖, 王震, 杨锦鹏, 扈泽正, 陈建. 基于贝叶斯网络的电子节气门电磁敏感度评估[J]. 吉林大学学报(工学版), 2018, 48(1): 281-289.
[6] 高印寒, 安占扬, 王举贤, 王天皓, 刘长英, 张俊东. 等效线束法在汽车线束时域辐射敏感度分析中的应用[J]. 吉林大学学报(工学版), 2015, 45(3): 946-952.
[7] 蔡朝晖, 张健沛, 杨静. 基于贝叶斯网络的路网位置匿名区域估计[J]. 吉林大学学报(工学版), 2014, 44(2): 454-458.
[8] 周伟, 赵胜川. 基于Mixed Logit模型的路线选择行为量化分析[J]. 吉林大学学报(工学版), 2013, 43(02): 304-309.
[9] 高印寒,马喜来,陈如娜. 基于模糊推理的汽车电磁兼容预测技术[J]. 吉林大学学报(工学版), 2006, 36(03): 399-0403.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!