Research on Transformer Model Compression and Hardware-Friendly Deployment Based on EBSP+GQSA Fusion Method
Abstract
Existing quantization and sparsity algorithms are basically intended for tradition neural network, which makes them unsuitable to adapt to the Transformer architecture. This paper proposes a dynamically adjustable EBSP+GQSA fusion compression method. We improved the EBSP algorithm by introducing a dynamic sparsity strategy and block-level dynamic shift factors to enhance its adaptability to attention weights. Simultaneously, we optimized the GQSA algorithm by proposing a dynamic grouping strategy and layer-wise weight analysis to improve compression flexibility and efficiency. Experimental results on typical Transformer models, including BERT-base, ViT-base, and GPT-2-small, demonstrate that the EBSP+GQSA fusion method achieves minimal accuracy loss (<1%), the highest compression ratio (>70%), the greatest inference speedup (>2×), and the most significant energy reduction (>55%), outperforming the individual use of EBSP or GQSA. This method significantly enhances the deployment capability of models on resource-constrained edge devices, providing a feasible technical path for efficient Transformer inference.
References
- Liu, Fangxin, et al. "Ebsp: evolving bit sparsity patterns for hardware-friendly inference of quantized deep neural networks." Proceedings of the 59th ACM/IEEE Design Automation Conference. 2022.
- Zeng, Chao, et al. "Gqsa: Group quantization and sparsity for accelerating large language model inference." arXiv preprint arXiv: 2412.17560 (2024).
- Belbachir, Ahmed Nabil, et al. "High-speed embedded-object analysis using a dual-line timed-address-event temporal-contrast vision sensor." IEEE Transactions on Industrial Electronics 58.3 (2010): 770-783.
- Sahani, Mrutyunjaya, and Mihir Narayan Mohanty. "Realization of different algorithms using raspberry Pi for real-time image processing application." Intelligent Computing, Communication and Devices: Proceedings of ICCD 2014, Volume 2. New Delhi: Springer India, 2014. 473-479.
- Szegedy, Christian, et al. "Rethinking the inception architecture for computer vision." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.
- Andargie, Fitsum Assamnew, et al. "Energy efficient object detection on the mobile GP-GPU." 2017 IEEE AFRICON. IEEE, 2017.
- Abeydeera, Maleen, et al. "4K real-time HEVC decoder on an FPGA." IEEE Transactions on Circuits and Systems for Video Technology 26.1 (2015): 236-249.
- Appiah, Kofi, et al. "Implementation and applications of tri-state self-organizing maps on FPGA." IEEE Transactions on Circuits and Systems for Video Technology 22.8 (2012): 1150-1160.
- Camunas-Mesa, Luis, et al. "A 32$\, \times\, $32 Pixel Convolution Processor Chip for Address Event Vision Sensors With 155 ns Event Latency and 20 Meps Throughput." IEEE Transactions on Circuits and Systems I: Regular Papers 58.4 (2010): 777-790.
- Chen, Tianshi, et al. "Diannao: A small-footprint high-throughput accelerator for ubiquitous machine-learning." ACM SIGARCH Computer Architecture News 42.1 (2014): 269-284.
- Bai, Hongxiao, and Yun Li. "Structured Sparsity in the NVIDIA Ampere Architecture and Applications in Search Engines." (2023).