TReX:重用视觉Transformer的注意力机制以实现高效的基于Xbar的计算
TReX- Reusing Vision Transformer's Attention for Efficient Xbar-based Computing
AI总结:
提出TReX框架,通过在ViT模型中重用注意力机制优化存内计算架构的精度-能耗-延迟-面积权衡,在Imagenet-1k和NLP任务上实现显著EDAP降低与精度提升。
摘要:
由于视觉Transformer(ViTs)的高计算开销,存内计算架构正被研究用于边缘计算场景中的节能部署。先前的工作提出了高效的算法-硬件协同设计和IMC架构改进,以提高IMC实现的ViT的能效。然而,所有先前的工作都忽略了注意力块的开销及其对IMC实现的ViT的精度-能耗-延迟-面积(accuracy-energy-delay-area)的协同依赖。为此,我们提出TReX——一个注意力重用驱动的ViT优化框架,它在ViT模型中有效地执行注意力重用,以实现最佳的精度-能耗-延迟-面积权衡。TReX最优地选择transformer编码器进行注意力重用,以实现接近等精度的性能,同时满足用户指定的延迟要求。基于我们在Imagenet-1k数据集上的分析,我们发现在DeiT-S(LV-ViT-S)ViT模型的情况下,TReX实现了2.3倍(2.19倍)的EDAP降低和1.86倍(1.79倍)的TOPS/mm2提升,精度下降约1%。此外,与最先进的token剪枝和权重共享方法相比,TReX在实现高EDAP降低的同时保持了高精度。在CoLA等NLP任务上,TReX在EDAP降低1.6倍的情况下,非理想精度比基线高2%。
英文摘要:
Due to the high computation overhead of Vision Transformers (ViTs), In-memory Computing architectures are being researched towards energy-efficient deployment in edge-computing scenarios. Prior works have proposed efficient algorithm-hardware co-design and IMC-architectural improvements to improve the energy-efficiency of IMC-implemented ViTs. However, all prior works have neglected the overhead and co-depencence of attention blocks on the accuracy-energy-delay-area of IMC-implemented ViTs. To this end, we propose TReX- an attention-reuse-driven ViT optimization framework that effectively performs attention reuse in ViT models to achieve optimal accuracy-energy-delay-area tradeoffs. TReX optimally chooses the transformer encoders for attention reuse to achieve near iso-accuracy performance while meeting the user-specified delay requirement. Based on our analysis on the Imagenet-1k dataset, we find that TReX achieves 2.3x (2.19x) EDAP reduction and 1.86x (1.79x) TOPS/mm2 improvement with ~1% accuracy drop in case of DeiT-S (LV-ViT-S) ViT models. Additionally, TReX achieves high accuracy at high EDAP reduction compared to state-of-the-art token pruning and weight sharing approaches. On NLP tasks such as CoLA, TReX leads to 2% higher non-ideal accuracy compared to baseline at 1.6x lower EDAP.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。