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

TinyFormer: 在微型设备上高效设计和部署变换器

TinyFormer: Efficient Transformer Design and Deployment on Tiny Devices

School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院);Qingdao Research Institute, Beihang University(北京航空航天大学青岛研究所);Department of Computer Science and Engineering, The Chinese University of Hong Kong(香港中文大学(深圳)计算机科学与工程系);Fert Beijing Research Institute, School of Integrated Circuit Science and Engineering, Beihang University(北京航空航天大学集成电路科学与工程学院)

Jianlei Yang, Jiacheng Liao, Fanding Lei, Meichen Liu, Lingkun Long, Junyi Chen, Han Wan, Bei Yu, Weisheng Zhao

AI总结:

TinyFormer是一种专为微型设备设计的高效变换器框架,通过SuperNAS、SparseNAS和SparseEngine实现资源高效的模型设计与部署,显著提升推理速度。

摘要:

在各种嵌入式物联网应用中,开发深度学习模型在微型设备(如微控制器单元,MCUs)上引起了广泛关注。然而,由于其严重的硬件资源限制,将最近的先进模型(如变换器)高效地设计和部署在微型设备上具有挑战性。在本工作中,我们提出了TinyFormer,这是一个专门设计用于在MCUs上开发和部署资源高效的变换器模型的框架。TinyFormer由SuperNAS、SparseNAS和SparseEngine组成。分别地,SuperNAS旨在从庞大的搜索空间中搜索合适的supernet。SparseNAS从已确定的supernet中评估出最佳的稀疏单路径变换器模型。最后,SparseEngine高效地将所搜索的稀疏模型部署到MCUs上。据我们所知,SparseEngine是首个能够执行稀疏变换器模型在MCUs上推理的部署框架。在CIFAR-10数据集上的评估结果表明,TinyFormer可以在遵守1MB存储和320KB内存的硬件限制条件下,设计出准确率为96.1%的高效变换器。此外,TinyFormer在稀疏推理方面实现了显著的加速,最高可达CMSIS-NN库的12.2倍。TinyFormer被认为将为TinyML场景带来强大的变换器,并大大扩展深度学习应用的范围。

英文摘要:

Developing deep learning models on tiny devices (e.g. Microcontroller units, MCUs) has attracted much attention in various embedded IoT applications. However, it is challenging to efficiently design and deploy recent advanced models (e.g. transformers) on tiny devices due to their severe hardware resource constraints. In this work, we propose TinyFormer, a framework specifically designed to develop and deploy resource-efficient transformer models on MCUs. TinyFormer consists of SuperNAS, SparseNAS, and SparseEngine. Separately, SuperNAS aims to search for an appropriate supernet from a vast search space. SparseNAS evaluates the best sparse single-path transformer model from the identified supernet. Finally, SparseEngine efficiently deploys the searched sparse models onto MCUs. To the best of our knowledge, SparseEngine is the first deployment framework capable of performing inference of sparse transformer models on MCUs. Evaluation results on the CIFAR-10 dataset demonstrate that TinyFormer can design efficient transformers with an accuracy of 96.1% while adhering to hardware constraints of 1MB storage and 320KB memory. Additionally, TinyFormer achieves significant speedups in sparse inference, up to 12.2x comparing to the CMSIS-NN library. TinyFormer is believed to bring powerful transformers into TinyML scenarios and to greatly expand the scope of deep learning applications

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

↑