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

学习在视觉Transformer中合并令牌

Learning to Merge Tokens in Vision Transformers

ETH Zurich(苏黎世联邦理工学院);Google Research(谷歌研究院)

Cedric Renggli, André Susano Pinto, Neil Houlsby, Basil Mustafa, Joan Puigcerver, Carlos Riquelme

摘要:

Transformers被广泛应用于解决自然语言理解和计算机视觉任务。虽然扩展这些架构可以提高性能,但通常会以更高的计算成本为代价。为了使大规模模型在现实世界的系统中保持实用,需要减少其计算开销。在这项工作中,我们提出了PatchMerger,这是一个简单的模块,通过在两个连续的中间层之间合并补丁或令牌来减少网络必须处理的补丁或令牌的数量。我们表明,PatchMerger实现了显着的加速在不同的模型大小,同时匹配的上游和下游的微调后的原始性能。

英文摘要:

Transformers are widely applied to solve natural language understanding and computer vision tasks. While scaling up these architectures leads to improved performance, it often comes at the expense of much higher computational costs. In order for large-scale models to remain practical in real-world systems, there is a need for reducing their computational overhead. In this work, we present the PatchMerger, a simple module that reduces the number of patches or tokens the network has to process by merging them between two consecutive intermediate layers. We show that the PatchMerger achieves a significant speedup across various model sizes while matching the original performance both upstream and downstream after fine-tuning.

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

↑