arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.11650cs.CVcs.AI
收藏

面向边缘设备分布式推理的高效分区Vision Transformer

Efficient Partitioning Vision Transformer on Edge Devices for Distributed Inference

School of Computing, National University of Singapore(国家大学学院计算机科学学院);Information and Artificial Intelligence Institute, Zhejiang University of Finance & Economics Dongfang College(浙江财经大学东方学院信息与人工智能研究院);Department of Computer Science, ETH Zurich(苏黎世联邦理工学院计算机科学系);College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);Lumia Ltd.(Lumia有限公司);Institute of Data Science, National University of Singapore(国家大学数据科学研究所)

Xiang Liu, Yijun Song, Xia Li, Yifei Sun, Huiying Lan, Zemin Liu, Linshan Jiang, Jialin Li

AI总结:

针对Vision Transformer难以在资源受限边缘设备部署的问题,提出ED-ViT框架,通过按类别划分子模型+逐类别剪枝实现分布式推理,可大幅缩减模型规模与推理延迟,精度接近原模型,性能优于现有前沿边缘部署方法。

摘要:

深度学习模型正越来越多地被部署在资源受限的边缘设备上,用于实时数据分析。近年来,Vision Transformer(视觉Transformer)及其变体在各类计算机视觉任务中展现出了卓越性能。然而,这类模型庞大的计算需求与较低的推理延迟要求,给其在资源受限边缘设备上的部署带来了严峻挑战。为解决这一问题,我们提出了一种名为ED-ViT的新型框架,旨在将复杂的Vision Transformer高效拆分并部署到多台边缘设备上协同执行。我们的方法核心是将Vision Transformer模型划分为若干子模型,每个子模型专门负责处理特定的数据类别子集。为进一步降低计算开销与推理延迟,我们引入了一种逐类别剪枝技术,用于缩减每个子模型的规模。我们在5个数据集上采用3种模型架构开展了大量实验,并在边缘设备上进行了实际部署验证,结果表明:该方法能显著降低边缘设备上的推理延迟,同时模型规模最高可分别缩减至原来的1/28.9和1/34.1,且测试精度与原始Vision Transformer相当。此外,我们还将ED-ViT与两种当前最先进的、在边缘设备上部署CNN(卷积神经网络)和SNN(脉冲神经网络)模型的方法进行了对比,从精度、推理时间、整体模型规模等指标展开评估。全面的评估结果验证了所提出的ED-ViT框架的有效性。

英文摘要:

Deep learning models are increasingly utilized on resource-constrained edge devices for real-time data analytics. Recently, Vision Transformer and their variants have shown exceptional performance in various computer vision tasks. However, their substantial computational requirements and low inference latency create significant challenges for deploying such models on resource-constrained edge devices. To address this issue, we propose a novel framework, ED-ViT, which is designed to efficiently split and execute complex Vision Transformers across multiple edge devices. Our approach involves partitioning Vision Transformer models into several sub-models, while each dedicated to handling a specific subset of data classes. To further reduce computational overhead and inference latency, we introduce a class-wise pruning technique that decreases the size of each sub-model. Through extensive experiments conducted on five datasets using three model architectures and actual implementation on edge devices, we demonstrate that our method significantly cuts down inference latency on edge devices and achieves a reduction in model size by up to 28.9 times and 34.1 times, respectively, while maintaining test accuracy comparable to the original Vision Transformer. Additionally, we compare ED-ViT with two state-of-the-art methods that deploy CNN and SNN models on edge devices, evaluating metrics such as accuracy, inference time, and overall model size. Our comprehensive evaluation underscores the effectiveness of the proposed ED-ViT framework.

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

↑