arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.07545cs.LGcs.AR
收藏

TransAxx:采用近似计算的高效Transformer

TransAxx: Efficient Transformers with Approximate Computing

School of Electrical and Computer Engineering, National Technical University of Athens(电气与计算机工程学院,国家技术大学雅典);Department of Computer Engineering & Informatics, University of Patras(计算机工程与信息学院,帕特拉大学);Chair for Embedded Systems at Karlsruhe Institute of Technology(卡尔斯鲁厄理工学院嵌入式系统教授职位)

Dimitrios Danopoulos, Georgios Zervakis, Dimitrios Soudris, Jörg Henkel

AI总结:

本文提出TransAxx框架,首次在ViT模型上引入近似乘法计算,结合MCTS搜索与近似感知微调,在ImageNet上实现精度与功耗的高效权衡。

摘要:

最近由Transformer架构引入的视觉Transformer(ViT)模型已表现出很强的竞争力,并常常成为卷积神经网络(CNN)的热门替代方案。然而,这些模型的高计算需求限制了它们的实际适用性,尤其是在低功耗设备上。当前最先进的方法采用近似乘法器来应对DNN加速器大幅增加的计算需求,但此前尚无研究探索它们在ViT模型上的应用。在这项工作中,我们提出了TransAxx,一个基于流行的PyTorch库的框架,它能够快速、内在地支持近似算术,从而无缝评估近似计算对ViT等DNN的影响。利用TransAxx,我们分析了Transformer模型在ImageNet数据集上对近似乘法的敏感性,并执行近似感知微调以恢复精度。此外,我们提出了一种为ViT模型生成近似加速器的方法。我们的方法使用蒙特卡洛树搜索(MCTS)算法,借助硬件驱动的手工设计策略高效搜索可能配置的空间。我们的评估证明了该方法在精度与功耗之间实现显著权衡的有效性,从而在不牺牲性能的情况下获得可观的收益。

英文摘要:

Vision Transformer (ViT) models which were recently introduced by the transformer architecture have shown to be very competitive and often become a popular alternative to Convolutional Neural Networks (CNNs). However, the high computational requirements of these models limit their practical applicability especially on low-power devices. Current state-of-the-art employs approximate multipliers to address the highly increased compute demands of DNN accelerators but no prior research has explored their use on ViT models. In this work we propose TransAxx, a framework based on the popular PyTorch library that enables fast inherent support for approximate arithmetic to seamlessly evaluate the impact of approximate computing on DNNs such as ViT models. Using TransAxx we analyze the sensitivity of transformer models on the ImageNet dataset to approximate multiplications and perform approximate-aware finetuning to regain accuracy. Furthermore, we propose a methodology to generate approximate accelerators for ViT models. Our approach uses a Monte Carlo Tree Search (MCTS) algorithm to efficiently search the space of possible configurations using a hardware-driven hand-crafted policy. Our evaluation demonstrates the efficacy of our methodology in achieving significant trade-offs between accuracy and power, resulting in substantial gains without compromising on performance.

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

↑