arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.09113cs.ARcs.AI
收藏

M$^2$-ViT:使用两级混合量化加速混合视觉Transformer

M$^2$-ViT: Accelerating Hybrid Vision Transformers with Two-Level Mixed Quantization

School of Electronic Science and Engineering, Nanjing University(南京大学电子科学与工程学院);School of Integrated Circuits, Sun Yat-sen University(中山大学集成电路学院)

Yanbiao Liang, Huihong Shi, Zhongfeng Wang

AI总结:

针对混合视觉Transformer边缘部署难的问题,提出两级混合量化策略M$^2$-ViT及专用加速器,在保持精度的同时平均节省80%能耗延迟积。

摘要:

尽管视觉Transformer(ViTs)取得了显著成功,但其密集的计算和庞大的内存开销对在边缘设备上的部署构成了挑战。为解决此问题,高效的ViTs应运而生,通常采用卷积-Transformer混合架构以同时提升准确率和硬件效率。尽管先前的工作探索了高效ViTs的量化,以期将高效混合ViT架构与量化的优势结合,但其聚焦于均匀量化,忽略了混合量化的潜在优势。同时,尽管已有若干研究针对标准ViTs探讨混合量化,但由于高效混合ViT具有独特的算法和硬件特性,这些方法无法直接应用。为弥补这一空白,我们提出了M$^2$-ViT,通过两级混合量化来加速卷积-Transformer混合高效ViTs。具体而言,我们引入了一种硬件友好的两级混合量化(M$^2$Q)策略,其特征在于同时采用混合量化精度和混合量化方案(即均匀量化与二次幂量化),以充分利用高效ViTs的架构特性。我们进一步构建了配备异构计算引擎的专用加速器,将算法优势转化为实际的硬件改进。实验结果验证了我们的有效性,与先前工作相比,在具备可比量化精度的同时,平均节省了$80\%$的能耗延迟积(EDP)。

英文摘要:

Although Vision Transformers (ViTs) have achieved significant success, their intensive computations and substantial memory overheads challenge their deployment on edge devices. To address this, efficient ViTs have emerged, typically featuring Convolution-Transformer hybrid architectures to enhance both accuracy and hardware efficiency. While prior work has explored quantization for efficient ViTs to marry the best of efficient hybrid ViT architectures and quantization, it focuses on uniform quantization and overlooks the potential advantages of mixed quantization. Meanwhile, although several works have studied mixed quantization for standard ViTs, they are not directly applicable to hybrid ViTs due to their distinct algorithmic and hardware characteristics. To bridge this gap, we present M$^2$-ViT to accelerate Convolution-Transformer hybrid efficient ViTs with two-level mixed quantization. Specifically, we introduce a hardware-friendly two-level mixed quantization (M$^2$Q) strategy, characterized by both mixed quantization precision and mixed quantization schemes (i.e., uniform and power-of-two), to exploit the architectural properties of efficient ViTs. We further build a dedicated accelerator with heterogeneous computing engines to transform our algorithmic benefits into real hardware improvements. Experimental results validate our effectiveness, showcasing an average of $80\%$ energy-delay product (EDP) saving with comparable quantization accuracy compared to the prior work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑