Skip to main content
QUICK REVIEW

[논문 리뷰] Mix and Match: A Novel FPGA-Centric Deep Neural Network Quantization Framework

Sung-En Chang, Yanyu Li|arXiv (Cornell University)|2020. 12. 08.
Advanced Neural Network Applications참고 문헌 75인용 수 7
한 줄 요약

이 논문은 가중치 행렬의 서로 다른 행에 대해 혼합된 양자화 체계—거듭제곱의 합(스페셜 포워드, SP2)과 고정소수점—를 적용함으로써 이질적인 FPGA 자원을 활용하는 새로운 FPGA 중심의 DNN 양자화 프레임워크인 Mix and Match를 제안한다. 가중치 분포 특성에 맞게 양자화 체계를 매칭시킴으로써, DSP 전용 구현 대비 2.1×–4.1×의 성능 향상을 달성하면서 정확도를 유지하거나 향상시킨다.

ABSTRACT

Deep Neural Networks (DNNs) have achieved extraordinary performance in various application domains. To support diverse DNN models, efficient implementations of DNN inference on edge-computing platforms, e.g., ASICs, FPGAs, and embedded systems, are extensively investigated. Due to the huge model size and computation amount, model compression is a critical step to deploy DNN models on edge devices. This paper focuses on weight quantization, a hardware-friendly model compression approach that is complementary to weight pruning. Unlike existing methods that use the same quantization scheme for all weights, we propose the first solution that applies different quantization schemes for different rows of the weight matrix. It is motivated by (1) the distribution of the weights in the different rows are not the same; and (2) the potential of achieving better utilization of heterogeneous FPGA hardware resources. To achieve that, we first propose a hardware-friendly quantization scheme named sum-of-power-of-2 (SP2) suitable for Gaussian-like weight distribution, in which the multiplication arithmetic can be replaced with logic shifter and adder, thereby enabling highly efficient implementations with the FPGA LUT resources. In contrast, the existing fixed-point quantization is suitable for Uniform-like weight distribution and can be implemented efficiently by DSP. Then to fully explore the resources, we propose an FPGA-centric mixed scheme quantization (MSQ) with an ensemble of the proposed SP2 and the fixed-point schemes. Combining the two schemes can maintain, or even increase accuracy due to better matching with weight distributions.

연구 동기 및 목표

  • FPGA에서 모든 DNN 가중치 행에 동일한 양자화 체계를 적용할 경우 발생하는 비효율성을 해결하기 위해.
  • 가중치 분포 특성에 맞게 LUT와 DSP 등 이질적인 FPGA 자원을 활용하기 위해.
  • 정확도, 성능, 자원 활용도를 최적화하는 하드웨어 인식형 양자화 프레임워크를 개발하기 위해.
  • LUT와 DSP를 사용하는 혼합 정밀도 연산을 지원하는 효율적이고 파arameterized된 GEMM 아키텍처를 구현하기 위해.
  • 다양한 DNN 모델과 FPGA 플랫폼에서 프레임워크를 평가하여 FPGA 기반 DNN 추론에서 뛰어난 성능과 정확도를 입증하기 위해.

제안 방법

  • 가우시안 유사 가중치 분포에 적합한 새로운 하드웨어 友好的 양자화 체계인 거듭제곱의 합(Sum-of-Power-of-2, SP2)을 제안하여, 비트 시프트와 덧셈을 통한 LUT 기반 곱셈을 효율적으로 구현한다.
  • 균일한 가중치 분포에 적합한 고정소수점 양자화를 사용하여, FPGA의 DSP 블록을 통해 효율적으로 구현한다.
  • SP2 가중치를 위한 LUT 기반 코어와 고정소수점 가중치를 위한 DSP 기반 코어를 갖춘 파arameterized GEMM 아키텍처를 설계한다.
  • FPGA 자원 특성 분석에 기반해 양자화 비율과 모델 정확도를 동시에 최적화하는 MSQ(Mixed Scheme Quantization) 학습 알고리즘을 개발한다.
  • 가중치 분포와 하드웨어 효율성에 따라 각 가중치 행을 SP2 또는 고정소수점 체계에 할당하는 파artitioning 전략을 구현한다.
  • FPGA 자원 제약 조건을 고려하면서 정량화 오차를 최소화하고 처리량을 극대화하는 자원 인식형 학습 루프를 통합한다.
Figure 1: Quantization levels by fixed-point, power-of-2, and SP2 in 4-bit weight representation precision, and weight probability distribution of the 4th layer in MobileNet-V2.
Figure 1: Quantization levels by fixed-point, power-of-2, and SP2 in 4-bit weight representation precision, and weight probability distribution of the 4th layer in MobileNet-V2.

실험 결과

연구 질문

  • RQ1DNN 가중치 행렬의 서로 다른 행에 다른 양자화 체계를 적용하는 것이 균일한 양자화 체계 대비 FPGA 추론 성능 향상에 기여하는가?
  • RQ2SP2 양자화가 가우시안 유사 가중치 분포에서 FPGA 환경에서 LUT 자원을 효과적으로 활용하기 위해 어떻게 적용될 수 있는가?
  • RQ3정확도, 성능, 자원 활용도 측면에서 FPGA에서 SP2와 고정소수점 양자화 체계 간 최적의 트레이드오프는 무엇인가?
  • RQ4혼합 체계 양자화 프레임워크는 정확도를 유지하거나 향상시키면서도 FPGA에서 추론 처리량을 크게 향상시킬 수 있는가?
  • RQ5제안된 MSQ 학습 알고리즘은 다양한 가중치 분포와 FPGA 하드웨어 제약 조건에 어떻게 적응하는가?

주요 결과

  • 제안된 Mix and Match 프레임워크는 Zynq XC7Z020 및 XC7Z045 FPGA에서 DSP 전용 구현 대비 2.1×에서 4.1×까지 높은 성능을 달성한다.
  • MSQ 체계는 가중치 분포 특성에 더 잘 매칭되어 기준 양자화 방법 대비 정확도를 유지하거나 향상시킨다.
  • 최적의 SP2/고정소수점 비율을 사용할 경우 XC7Z045에서는 최대 549.3 FPS, XC7Z020에서는 최대 493 GOPS의 처리량을 기록한다.
  • XC7Z045에서 5.747 GOPS/kLUT의 높은 LUT 활용 효율성을 달성하여 자원 활용 효율성이 뛰어나다.
  • 제안된 SP2 양자화 체계는 효율적인 LUT 기반 곱셈을 가능하게 하여 DSP 의존도를 감소시키고 자원 활용도를 향상시킨다.
  • 이질적인 코어를 갖춘 파arameterized GEMM 아키텍처는 다양한 DNN 모델에서 유연하고 고처리량 추론을 가능하게 한다.
Figure 2: Resource ratio of different FPGA devices. For each device, LUT, FF, and BRAM numbers are all normalized with respect to DSP number.
Figure 2: Resource ratio of different FPGA devices. For each device, LUT, FF, and BRAM numbers are all normalized with respect to DSP number.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.