arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.06300cs.CVcs.AI
收藏

加速视觉变换器在大脑处理单元上的应用

Accelerating Vision Transformers on Brain Processing Unit

Suzhou Institute for Advanced Research,USTC University of Science and Technology of China(苏州先进研究所,中国科学技术大学)

Jinchi Tang, Yan Guo

AI总结:

本文提出了一种方法,通过将视觉变换器中的线性层替换为卷积运算符,使其能够充分利用BPUs的加速能力,从而在ImageNet上实现了80.4%的准确率和3.8倍的推理加速。

摘要:

随着深度学习技术的发展,专用神经处理硬件如大脑处理单元(BPUs)已作为卷积神经网络加速的专用平台出现,提供了优化的INT8计算能力用于卷积操作。同时,视觉变换器(ViT)模型,如数据高效的图像变换器(DeiT),已展现出卓越的性能,并在计算机视觉任务中扮演着越来越重要的角色。然而,由于CNN优化硬件与视觉变换器计算特征之间的架构不匹配——即变换器中的线性层处理三维数据,而BPUs的加速设计是针对四维卷积操作——在部署视觉变换器时很难甚至无法利用BPUs的优势。为了解决这一挑战,我们提出了一种新的方法,通过将线性层和层归一化操作替换为精心设计的卷积运算符来重构视觉变换器。这使DeiT能够充分利用BPUs的加速能力,同时允许重构模型继承原始权重参数,而无需重新训练或微调。据我们所知,这是首次成功部署视觉变换器并完全利用BPUs的案例。具体而言,量化后的DeiT-Base模型在ImageNet上实现了80.4%的准确率,相比原来的81.8%,同时获得了高达3.8倍的推理加速。我们对花类分类数据集进行微调的DeiT模型也取得了优异的表现,DeiT-Base模型仅出现了0.5%的准确率下降,进一步证明了我们方法的有效性。

英文摘要:

With the advancement of deep learning technologies, specialized neural processing hardware such as Brain Processing Units (BPUs) have emerged as dedicated platforms for CNN acceleration, offering optimized INT8 computation capabilities for convolutional operations. Meanwhile, Vision Transformer (ViT) models, such as the Data-efficient Image Transformer (DeiT), have demonstrated superior performance and play increasingly crucial roles in computer vision tasks. However, due to the architectural mismatch between CNN-optimized hardware and Vision Transformer computation characteristics--namely, that linear layers in Transformers operate on three-dimensional data while BPU acceleration is designed for four-dimensional convolution operations-it is difficult or even impossible to leverage BPU's advantages when deploying Vision Transformers. To address this challenge, we propose a novel approach that restructures the Vision Transformer by replacing linear layers and layer normalization operations with carefully designed convolutional operators. This enables DeiT to fully utilize the acceleration capabilities of BPUs, while allowing the original weight parameters to be inherited by the restructured models without retraining or fine-tuning. To the best of our knowledge, this is the first successful deployment of Vision Transformers that fully leverages BPU classification datasets demonstrate the effectiveness of our approach. Specifically, the quantized DeiT-Base model achieves 80.4% accuracy on ImageNet, compared to the original 81.8%, while obtaining up to a 3.8* inference speedup. Our finetuned DeiT model on the flower classification dataset also achieves excellent performance, with only a 0.5% accuracy drop for the DeiT-Base model, further demonstrating the effectiveness of our method.

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

↑