当前位置: 首页 > news >正文

[NeurIPS 2022] Leveraging Inter-Layer Dependency for Post-Training Quantization

Contents

  • Introduction
  • Method
  • Experiments
  • References

Introduction

  • 作者提出一种端到端的 PTQ 训练策略 Network-Wise Quantization (NWQ),并通过 Annealing Softmax (ASoftmax) 和 Annealing Mixup (AMixup) 改进了 AdaRound,降低了训练收敛难度

Method

  • Activation Regularization (AR). 采用端到端而非 layer/block-wise 优化每个 block 的量化损失
    在这里插入图片描述

  • Annealing Softmax (ASoftmax). 类似于 AdaRound,采用 Adaptive Rounding,但不同的是作者采用 Softmax 而非 Sigmoid,这使得 rounding 范围由 0~1 扩展到了 n n n~ m m m,但相应得训练参数量也增加到了原来的 m − n + 1 m-n+1 mn+1 倍 (不过作者默认采用 n = 0 , m = 1 n=0,m=1 n=0,m=1,所以 ASoftmax 的优势很大可能来自与 AdaRound 的第二点不同,也就是加速模型收敛;如果扩展 m , n m,n m,n,那么随着训练参数量的增加,如果校准数据比较少,模型容易过拟合)
    在这里插入图片描述在这里插入图片描述在这里插入图片描述此外,不同于 AdaRound 采用正则项促使 h ( V ) h(\mathbf V) h(V) 趋近 0/1,而作者认为这个正则项和量化损失其实是冲突的 (量化损失会促使 h ( V ) h(\mathbf V) h(V) 趋近 w s − ⌊ w s ⌋ \frac{\mathbf w}{s}-\lfloor\frac{\mathbf w}{s}\rfloor swsw),这会导致 AdaRound 不容易收敛;对此,作者借助 softmax temperature 帮助模型更好收敛
    在这里插入图片描述其中, τ t \tau^t τt 代表 iter t t t 时刻的 temperature,从 1 线性衰减到 0.01;作者还给出了 V i \mathbf V_i Vi初始化策略 V i = log ⁡ ( σ ′ ( V ) i ) \mathbf V_i=\log(\sigma'(\mathbf V)_i) Vi=log(σ(V)i),这样可以使得初始 rounding 与原始权重尽可能接近,证明可参考附录 A
    在这里插入图片描述

  • Annealing Mixup (AMixup). 采用 mixup 混合全精度模型输出和量化模型输出,作为 AR 中的优化目标 a l a_l al,其中全精度模型输出在 iter t t t 所占比例从 P s = 0.5 P_s=0.5 Ps=0.5 线性衰减到 P e = 0 P_e=0 Pe=0 从而帮助模型更好收敛
    在这里插入图片描述

Experiments

  • Comprehensive Comparison.
    在这里插入图片描述
  • Ablation Study. (1) AR.
    在这里插入图片描述(2) ASoftmax.
    在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述(3) AMixup.
    在这里插入图片描述在这里插入图片描述

References

  • Zheng, DanDan, Yuanliu Liu, and Liang Li. “Leveraging inter-layer dependency for post-training quantization.” Advances in Neural Information Processing Systems 35 (2022): 6666-6679.
http://www.lryc.cn/news/493195.html

相关文章:

  • ubuntu+ROS推视频流至网络
  • PHP 去掉特殊不可见字符 “\u200e“
  • 深度学习—BP算法梯度下降及优化方法Day37
  • elasticsearch8.16 docker-compose 多机器集群安装
  • Flink--API 之 Source 使用解析
  • uniapp在小程序连接webScoket实现余额支付
  • Spring Boot【三】
  • R 因子
  • 【博主推荐】C# Winform 拼图小游戏源码详解(附源码)
  • 深入解析 MySQL 启动方式:`systemctl` 与 `mysqld` 的对比与应用
  • 【python】windows pip 安装 module 提示 Microsoft Visual C++ 14.0 is required 处理方法
  • python爬虫案例——猫眼电影数据抓取之字体解密,多套字体文件解密方法(20)
  • go sync.WaitGroup
  • Libevent库-http通信不同请求方式的处理
  • 关于node全栈项目打包发布linux项目问题总集
  • 常见的上、下采样方法
  • 如何解决 java.rmi.NotBoundException: RMI 中没有绑定的对象问题?亲测有效的解决方法!
  • 设计模式:14、抽象工厂模式(配套)
  • Linux环境基础开发工具使用
  • AI生成的一个.netcore 经典后端架构
  • 深度学习-48-AI应用实战之基于face_recognition的人脸识别
  • 【Rabbitmq篇】高级特性----事务,消息分发
  • Python进程和线程适用场景
  • flutter开发环境—Windows
  • 展示和添加篮球队信息--laravel与elementplus
  • 写一份客服网络安全意识培训PPT
  • 具体的技术和工具在县级融媒体建设3.0中有哪些应用?
  • 【uniapp】轮播图
  • Rust编程语言代码详细运行、编译方法
  • node.js基础学习-http模块-JSONP跨域传值(四)