[论文解读] MSP: An FPGA-Specific Mixed-Scheme, Multi-Precision Deep Neural Network Quantization Framework
本文提出MSP,一种新型FPGA专用混合方案多精度量化框架,结合幂次和(SPoT)与定点量化,协同利用FPGA上的LUT和DSP资源。通过支持层内多精度量化(5% 8位权重),MSP在ImageNet上实现70.47%的Top1准确率,相比定点量化实现3.53倍加速,同时保持准确率并最大化硬件利用率。
With the tremendous success of deep learning, there exists imminent need to deploy deep learning models onto edge devices. To tackle the limited computing and storage resources in edge devices, model compression techniques have been widely used to trim deep neural network (DNN) models for on-device inference execution. This paper targets the commonly used FPGA (field programmable gate array) devices as the hardware platforms for DNN edge computing. We focus on the DNN quantization as the main model compression technique, since DNN quantization has been of great importance for the implementations of DNN models on the hardware platforms. The novelty of this work comes in twofold: (i) We propose a mixed-scheme DNN quantization method that incorporates both the linear and non-linear number systems for quantization, with the aim to boost the utilization of the heterogeneous computing resources, i.e., LUTs (look up tables) and DSPs (digital signal processors) on an FPGA. Note that all the existing (single-scheme) quantization methods can only utilize one type of resources (either LUTs or DSPs for the MAC (multiply-accumulate) operations in deep learning computations. (ii) We use a quantization method that supports multiple precisions along the intra-layer dimension, while the existing quantization methods apply multi-precision quantization along the inter-layer dimension. The intra-layer multi-precision method can uniform the hardware configurations for different layers to reduce computation overhead and at the same time preserve the model accuracy as the inter-layer approach.
研究动机与目标
- 解决在资源受限FPGA上部署低精度DNN时,如何实现高硬件效率与最小准确率损失的挑战。
- 通过协同优化异构FPGA资源(LUT与DSP),克服单一量化方案(如仅使用LUT或仅使用DSP)的局限性。
- 通过支持层内多精度量化而非层间方法,降低硬件配置复杂度与计算开销。
- 即使在对精度损失敏感的首层与末层进行量化时,也能实现无损准确率性能。
- 提供统一、硬件友好的量化框架,支持混合精度与混合方案操作,实现FPGA上高效部署。
提出的方法
- 提出一种幂次和(SPoT)量化方案,利用LUT实现位移与加法操作,减少对DSP的依赖,并相比原始幂次方案显著降低准确率下降。
- 引入混合方案(MS)量化,根据FPGA资源可用性动态结合SPoT与定点量化,最大化LUT与DSP的利用率。
- 设计一种层内多精度(MP)策略,为每层权重分配5%的8位精度,无需各层使用不同字长,即可保持模型准确率。
- 通过FPGA资源利用率分析优化混合量化比例(如65% SPoT、30% 定点、5% 8位),在准确率与性能间实现平衡。
- 采用统一框架将SPoT、定点与8位量化集成于同一层内,实现无损准确率与高效硬件映射。
- 在Xilinx XC7Z020与XC7Z045 FPGA上验证框架,时钟频率为100MHz,测量ResNet-18与MobileNet-v2的吞吐量、延迟与资源利用率。
实验结果
研究问题
- RQ1与单一方案方法相比,结合SPoT与定点量化的混合方案量化方法是否能提升FPGA资源利用率?
- RQ2在硬件效率与准确率保持方面,层内多精度量化是否优于层间多精度量化?
- RQ3SPoT量化是否能通过LUT上的位移操作,在保持计算效率的同时减少准确率下降?
- RQ4所提出的MSP框架在真实FPGA平台(如XC7Z020与XC7Z045)上能在多大程度上实现加速并保持准确率?
- RQ5混合方案与层内多精度量化相结合,对FPGA上DNN推理的吞吐量与资源利用率有何影响?
主要发现
- MSP在ImageNet上使用ResNet-18实现70.47%的Top1准确率,相比基线浮点模型准确率高出0.71%。
- 与定点量化相比,MSP在FPGA上实现端到端推理时间3.53倍加速,ResNet-18在XC7Z045上的吞吐量从120.5 GOPS提升至325.0 GOPS。
- 所有配置下DSP利用率均保持在100%,而当SPoT比例提高时,LUT利用率从19%提升至69%,表明实现了有效的资源平衡。
- 层内多精度策略即使在首层与末层被量化时也能实现无损准确率,而以往方法通常避免对这些层进行量化。
- 消融实验表明,混合方案量化(MS)相比单一方案方法在速度与准确率上均有提升,而层内MP策略进一步增强性能且不损失准确率。
- 通过FPGA资源利用率与性能分析验证,最优量化比例(65% SPoT、30% 定点、5% 8位)实现了效率与准确率的最佳平衡。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。