arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.03460cs.CV

LowFormer:面向卷积Transformer骨干网络的硬件高效设计

LowFormer: Hardware Efficient Design for Convolutional Transformer Backbones

University of Udine(乌迪内大学)

Moritz Nottebaum, Matteo Dunnhofer, Christian Micheloni

AI总结:

LowFormer通过分析实际吞吐量和延迟而非MACs,提出硬件高效的卷积Transformer骨干设计准则,并引入简化多头自注意力,在GPU、移动GPU和ARM CPU上实现显著加速且精度不降。

摘要:

高效视觉骨干网络的研究正逐渐演变为卷积与Transformer模块混合的模型。要在速度与精度之间取得优异权衡,必须在架构层面和组件层面进行巧妙结合。大多数已有工作专注于最大化精度,并将MACs(乘加运算次数)作为效率指标。然而,由于内存访问成本和并行度等因素,MACs往往无法准确衡量模型的实际运行速度。我们不以MACs为指标,而是从实际吞吐量和延迟的角度分析了骨干网络中常见模块和架构设计选择,因为吞吐量与延迟的组合更能代表模型在实际应用中的效率。我们将分析所得结论应用于宏观设计,提出了一套提升硬件效率的设计准则。此外,我们引入了一种简化版的多头自注意力机制,该设计与我们的分析结论相一致。我们结合宏观与微观设计,构建了一个新的硬件高效骨干网络家族,称为LowFormer。LowFormer在吞吐量和延迟方面实现了显著加速,同时达到与当前最先进的同类高效骨干网络相当或更好的精度。为证明所提硬件高效设计的泛化能力,我们在GPU、移动端GPU和ARM CPU上评估了该方法。我们进一步表明,下游任务目标检测和语义分割同样受益于该硬件高效架构。代码和模型已开源,地址为 https://github.com/altair199797/LowFormer。

英文摘要:

Research in efficient vision backbones is evolving into models that are a mixture of convolutions and transformer blocks. A smart combination of both, architecture-wise and component-wise is mandatory to excel in the speedaccuracy trade-off. Most publications focus on maximizing accuracy and utilize MACs (multiply accumulate operations) as an efficiency metric. The latter however often do not measure accurately how fast a model actually is due to factors like memory access cost and degree of parallelism. We analyzed common modules and architectural design choices for backbones not in terms of MACs, but rather in actual throughput and latency, as the combination of the latter two is a better representation of the efficiency of models in real applications. We applied the conclusions taken from that analysis to create a recipe for increasing hardware-efficiency in macro design. Additionally we introduce a simple slimmed-down version of MultiHead Self-Attention, that aligns with our analysis. We combine both macro and micro design to create a new family of hardware-efficient backbone networks called LowFormer. LowFormer achieves a remarkable speedup in terms of throughput and latency, while achieving similar or better accuracy than current state-of-the-art efficient backbones. In order to prove the generalizability of our hardware-efficient design, we evaluate our method on GPU, mobile GPU and ARM CPU. We further show that the downstream tasks object detection and semantic segmentation profit from our hardware-efficient architecture. Code and models are available at https://github.com/ altair199797/LowFormer.

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

↑