Skip to main content
QUICK REVIEW

[论文解读] Memory-Driven Mixed Low Precision Quantization For Enabling Deep Network Inference On Microcontrollers

Manuele Rusci, Alessandro Capotondi|arXiv (Cornell University)|May 30, 2019
Advanced Memory and Neural Computing被引用 41
一句话总结

该论文提出一种基于内存驱动的混合精度量化方法和一个整数量化通道归一化(Integer Channel-Normalization,ICN)激活,以在微控制器上实现端到端的仅整数量化深度网络推理,在 STM32H7(2MB Flash 及 512kB RAM)上达到 68% 的 Top1,比先前的 8 位方法高 8%。

ABSTRACT

This paper presents a novel end-to-end methodology for enabling the deployment of low-error deep networks on microcontrollers. To fit the memory and computational limitations of resource-constrained edge-devices, we exploit mixed low-bitwidth compression, featuring 8, 4 or 2-bit uniform quantization, and we model the inference graph with integer-only operations. Our approach aims at determining the minimum bit precision of every activation and weight tensor given the memory constraints of a device. This is achieved through a rule-based iterative procedure, which cuts the number of bits of the most memory-demanding layers, aiming at meeting the memory constraints. After a quantization-aware retraining step, the fake-quantized graph is converted into an inference integer-only model by inserting the Integer Channel-Normalization (ICN) layers, which introduce a negligible loss as demonstrated on INT4 MobilenetV1 models. We report the latency-accuracy evaluation of mixed-precision MobilenetV1 family networks on a STM32H7 microcontroller. Our experimental results demonstrate an end-to-end deployment of an integer-only Mobilenet network with Top1 accuracy of 68% on a device with only 2MB of FLASH memory and 512kB of RAM, improving by 8% the Top1 accuracy with respect to previously published 8 bit implementations for microcontrollers.

研究动机与目标

  • 在设备内存约束下自动选择每个激活和权重张量的最小位宽。
  • 通过混合精度量化在微控制器上实现端到端的整数仅推理。
  • 引入 Integer Channel-Normalization (ICN) 激活以支持子字节、按通道量化。
  • 在严格内存预算下展示 MobilenetV1 家族在 STM32H7 MCU 上的延迟-精度权衡。

提出的方法

  • 对激活和权重使用 8、4 或 2 位的统一量化进行混合精度量化。
  • 将推理建模为仅整数量化的运算,并使用基于规则的迭代过程来满足内存约束。
  • 引入并应用 Integer Channel-Normalization (ICN) 层,将伪量化图转化为仅整数部署。
  • 执行量化感知再训练以在量化后恢复精度。
  • 支持按通道量化,避免将批量归一化参数折叠到权重中以防止精度崩溃。
  • 在运行 CMSIS-NN 优化的 STM32H7 上对 MobilenetV1 家族进行延迟-精度评估。

实验结果

研究问题

  • RQ1具备受内存约束的微控制器是否能够通过混合精度量化来支持端到端的仅整数深度网络?
  • RQ2如何在保持准确性的同时,自动为每个张量分配位宽以满足设备内存约束?
  • RQ3Integer Channel-Normalization (ICN) 对次字节量化的准确性和部署可行性有何影响?
  • RQ4在 MCU 目标上,按通道 ICN 与逐层量化在准确性和内存占用方面有何比较?

主要发现

  • 基于 STM32H7(2MB Flash,512kB RAM)的端到端整数仅 MobilenetV1 部署达到 68% Top1 精度。
  • 该 68% 模型比先前发表的微控制器 8 位整数实现高 8%。
  • PL+ICN INT4 抑制 BN 折叠引起的精度崩溃,使训练在 PL+FB INT4 崩溃的情况下收敛。
  • PC+ICN INT4 产生 66.41% Top1 精度,内存占用约 2.12 MB,展示了按通道量化结合 ICN 的好处。
  • MixQ-PC-ICN 配置提供帕累托效率的精度-延迟权衡,PC+ICN 在比 MixQ-PL 略高的延迟开销(约 ~20%)下实现更高精度。
  • 在 2MB ROM / 512kB RAM 预算下,某些配置达到最高 68% Top1 精度,优于在类似约束下的若干先前混合精度方法。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。