PEANO-ViT:视觉Transformer中非线性操作的高能效近似方法 PEANO-ViT: Power-Efficient Approximations of Non-Linearities in Vision Transformers 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2024-06-21
👁️ 预览文献
💡 AI 中文简介
视觉Transformer在FPGA上部署时,层归一化、softmax和GELU等非线性函数计算复杂、功耗大。PEANO-ViT提出无除法层归一化近似、多尺度除法策略和分段线性GELU近似,大幅降低硬件资源消耗。在DeiT-B上精度损失不超过0.5%,层归一化、softmax和GELU的能效分别提升1.91倍、1.39倍和8.01倍,使ViT能在资源受限的FPGA上高效运行。
领域计算机视觉/硬件加速与能效计算
适合谁读需要一定专业背景(熟悉深度学习硬件部署和FPGA设计)
核心贡献1. 提出无除法层归一化近似技术,同时近似除法和平方根;2. 设计多尺度除法策略和Pade近似指数函数以消除softmax中的除法;3. 采用分段线性近似GELU,绕过复杂计算。
关键数据精度损失≤0.5%(DeiT-B);能效提升:层归一化1.91倍,softmax 1.39倍,GELU 8.01倍;显著减少DSP、LUT和寄存器数量。
推荐理由如果你关注ViT在边缘设备上的高效部署,这篇论文用巧妙的数学近似大幅降低功耗,精度几乎不掉,非常值得一读。
关键词["视觉Transformer", "FPGA", "非线性函数近似", "能效优化", "硬件加速", "层归一化"]

原文摘要

查看英文原文摘要

The deployment of Vision Transformers (ViTs) on hardware platforms, specially Field-Programmable Gate Arrays (FPGAs), presents many challenges, which are mainly due to the substantial computational and power requirements of their non-linear functions, notably layer normalization, softmax, and Gaussian Error Linear Unit (GELU). These critical functions pose significant obstacles to efficient hardware implementation due to their complex mathematical operations and the inherent resource count and architectural limitations of FPGAs. PEANO-ViT offers a novel approach to streamlining the implementation of the layer normalization layer by introducing a division-free technique that simultaneously approximates the division and square root function. Additionally, PEANO-ViT provides a multi-scale division strategy to eliminate division operations in the softmax layer, aided by a Pade-based approximation for the exponential function. Finally, PEANO-ViT introduces a piece-wise linear approximation for the GELU function, carefully designed to bypass the computationally intensive operations associated with GELU. In our comprehensive evaluations, PEANO-ViT exhibits minimal accuracy degradation (<= 0.5% for DeiT-B) while significantly enhancing power efficiency, achieving improvements of 1.91x, 1.39x, 8.01x for layer normalization, softmax, and GELU, respectively. This improvement is achieved through substantial reductions in DSP, LUT, and register counts for these non-linear operations. Consequently, PEANO-ViT enables efficient deployment of Vision Transformers on resource- and power-constrained FPGA platforms.