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

基于结构化剪枝和低秩近似的视觉Transformer压缩

Vision Transformer Compression with Structured Pruning and Low Rank Approximation

University of California, Los Angeles(加州大学洛杉矶分校)

Ankur Kumar

摘要:

Transformer架构由于其能够随大型数据集扩展而受到欢迎。因此,需要减少模型大小和延迟,特别是对于设备上部署。我们专注于为图像识别任务提出的视觉Transformer(Dosovitskiy等人,2021),并探索为此目的应用不同的压缩技术,例如低秩近似和修剪。具体来说,我们研究了最近在Zhu等人(2021)中提出的结构化修剪方法,并发现大多数前馈块都是用这种方法修剪的,准确性也严重下降。我们提出了一种混合压缩方法来缓解这种情况,其中我们使用低秩近似来压缩注意力块,并使用先前提到的修剪,其中每个Transformer层中的前馈块的速率较低。我们的技术结果在50%的压缩与14%的相对增加的分类错误,而我们得到44%的压缩与20%的相对增加的错误时,只有修剪应用。我们提出了进一步的改进,以弥补准确性差距,但把它作为一个未来的工作。

英文摘要:

Transformer architecture has gained popularity due to its ability to scale with large dataset. Consequently, there is a need to reduce the model size and latency, especially for on-device deployment. We focus on vision transformer proposed for image recognition task (Dosovitskiy et al., 2021), and explore the application of different compression techniques such as low rank approximation and pruning for this purpose. Specifically, we investigate a structured pruning method proposed recently in Zhu et al. (2021) and find that mostly feedforward blocks are pruned with this approach, that too, with severe degradation in accuracy. We propose a hybrid compression approach to mitigate this where we compress the attention blocks using low rank approximation and use the previously mentioned pruning with a lower rate for feedforward blocks in each transformer layer. Our technique results in 50% compression with 14% relative increase in classification error whereas we obtain 44% compression with 20% relative increase in error when only pruning is applied. We propose further enhancements to bridge the accuracy gap but leave it as a future work.

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

↑