用两级混合量化加速混合型视觉Transformer,显著降低能效延迟积。
M$^2$-ViT: Accelerating Hybrid Vision Transformers with Two-Level Mixed Quantization
- 提出两级混合量化策略,结合不同精度和量化方式
- 在保持精度前提下实现80%能效延迟积优化
- 专为混合架构设计,适合边缘设备部署
尽管视觉Transformer(ViTs)取得了显著成功,但其密集计算与大内存开销限制了在边缘设备上的部署。为此,高效ViT应运而生,通常采用卷积-变压器混合架构以兼顾准确率与硬件效率。现有工作虽探索了高效ViT的量化技术,但仅关注统一量化,忽略了混合量化的潜力。同时,已有混合量化方法针对标准ViT设计,不适用于具有独特算法与硬件特性的混合ViT。为此,本文提出M²-ViT,通过两级混合量化(M²Q)策略加速卷积-变压器混合高效ViT。该策略融合不同精度与量化方案(均匀与2的幂次),充分挖掘高效ViT的架构特性。进一步,构建配备异构计算单元的专用加速器,将算法优势转化为实际硬件性能提升。实验验证表明,在保持相近量化精度的前提下,平均实现80%的能效延迟积(EDP)节省,优于先前方法。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。