用查表神经元优化视觉Transformer,实现低功耗边缘部署。
LL-ViT: Edge Deployable Vision Transformers with Look Up Table Neurons
- 在Transformer中引入可学习查表神经元,替代传统MLP层计算。
- 在CIFAR-10/100/Tiny-ImageNet上准确率分别达95.5%/78.8%/60.9%。
- 模型权重减少60%以上,能耗降低1.9倍,适合FPGA边缘设备部署。
视觉Transformer在计算机视觉任务中表现优异,但其高计算、内存与能耗需求制约了在FPGA上的边缘推理。尽管已有基于逻辑门和查表(LUT)的网络如LogicNets、NeuraLUT、DWN等在降低内存与计算开销方面取得进展,但在常见视觉任务如CIFAR-10/100上表现不佳。本文提出LL-ViT,一种面向边缘优化的视觉Transformer架构,将可学习的查表神经元嵌入Transformer结构中。基于分析发现多数权重与计算来自通道混合器(MLP层),我们设计了一种替代型LUT-based MLP,并配套开发了FPGA加速器。不同于简单用查表替代乘法,本方法通过神经学习自动优化查表函数,显著减小模型尺寸,提升能效。在边缘适配任务上,LL-ViT在CIFAR-10、CIFAR-100、Tiny-ImageNet上的准确率分别为95.5%、78.8%、60.9%,接近基线模型。相比整数量化ViT加速器,模型权重减少超60%,乘法操作减少50%,能耗降低1.9倍,延迟降低1.3倍,在10.9W功耗下吞吐量优于现有工作。
原文摘要 · Abstract (English)
Vision Transformers have been tremendously successful in computer vision tasks. However, their large computational, memory, and energy demands are a challenge for edge inference on FPGAs -- a field that has seen a recent surge in demand. We recognize the benefits of recent works on logic and Look Up Table (LUT) based networks, such as LogicNets, NeuraLUT, DWN, among others, in offering models that simultaneously reduce both the memory and compute footprints. However, these models natively do not perform well on common vision tasks, such as CIFAR-10/100. In this work, we propose LL-ViT, a novel edge optimized vision transformer design that integrates layers of LUT neurons within the transformer architecture. Based on our characterization that reveals that a majority of model weights and computations are from the channel mixer (MLP layer), we design an alternate LUT-based channel mixer, and simultaneously develop an FPGA-based accelerator for LL-ViT. Contrary to some attempts to replace each multiplication with a table lookup, our architecture utilizes a neural learning approach which natively learns the LUT functions. This approach allows for reduced model sizes, and a computational and energy-efficient inference solution for vision transformer models. Evaluating on edge-suitable workloads, we achieve accuracies of 95.5% on CIFAR-10, 78.8% on CIFAR-100, and 60.9% on Tiny-ImageNet datasets, comparable to the baseline transformer. LL-ViT eliminates over 60% of the model weights and 50% of the multiplications in the model, and achieves 1.9x energy efficiency and 1.3x lower latency over an integer quantized ViT accelerator, while also offering superior throughput against prior works at a 10.9W power budget.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。