English

Accelerating ViT Inference on FPGA through Static and Dynamic Pruning

Distributed, Parallel, and Cluster Computing 2024-04-15 v2 Hardware Architecture Computer Vision and Pattern Recognition

Abstract

Vision Transformers (ViTs) have achieved state-of-the-art accuracy on various computer vision tasks. However, their high computational complexity prevents them from being applied to many real-world applications. Weight and token pruning are two well-known methods for reducing complexity: weight pruning reduces the model size and associated computational demands, while token pruning further dynamically reduces the computation based on the input. Combining these two techniques should significantly reduce computation complexity and model size; however, naively integrating them results in irregular computation patterns, leading to significant accuracy drops and difficulties in hardware acceleration. Addressing the above challenges, we propose a comprehensive algorithm-hardware codesign for accelerating ViT on FPGA through simultaneous pruning -combining static weight pruning and dynamic token pruning. For algorithm design, we systematically combine a hardware-aware structured block-pruning method for pruning model parameters and a dynamic token pruning method for removing unimportant token vectors. Moreover, we design a novel training algorithm to recover the model's accuracy. For hardware design, we develop a novel hardware accelerator for executing the pruned model. The proposed hardware design employs multi-level parallelism with load balancing strategy to efficiently deal with the irregular computation pattern led by the two pruning approaches. Moreover, we develop an efficient hardware mechanism for efficiently executing the on-the-fly token pruning.

Keywords

Cite

@article{arxiv.2403.14047,
  title  = {Accelerating ViT Inference on FPGA through Static and Dynamic Pruning},
  author = {Dhruv Parikh and Shouyi Li and Bingyi Zhang and Rajgopal Kannan and Carl Busart and Viktor Prasanna},
  journal= {arXiv preprint arXiv:2403.14047},
  year   = {2024}
}

Comments

FCCM 2024

R2 v1 2026-06-28T15:28:06.731Z