Hardware Accelerator for Approximation-Based Softmax and Layer Normalization in Transformers
Electronics · 07.06.2025 · 14 (12) · 2337
DOI: 10.3390/electronics14122337 ↗Kurz gefasst
Fachartikel in der Zeitschrift Electronics, online erschienen am 07.06.2025. Verfasst von Raehyeong Kim und 4 weiteren Autor:innen. Die Arbeit wurde bisher 13-mal zitiert (Crossref) und nennt 45 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: SeoulTech (Seoul National University of Science and Technology).
Abstract (Originalsprache)
Transformer-based models have achieved remarkable success across various AI tasks, but their growing complexity has led to significant computational and memory demands. While most optimization efforts have focused on linear operations such as matrix multiplications, non-linear functions like Softmax and layer normalization (LayerNorm) are increasingly dominating inference latency, especially for long sequences and high-dimensional inputs. To address this emerging bottleneck, we present a hardware accelerator that jointly approximates these non-linear functions using piecewise linear approximation for the exponential in Softmax and Newton–Raphson iteration for the square root in LayerNorm. The proposed unified architecture dynamically switches operation modes while reusing hardware resources. The proposed accelerator was implemented on a Xilinx VU37P FPGA and evaluated with BERT and GPT-2 models. Experimental results demonstrate speedups of up to 7.6× for Softmax and 2.0× for LayerNorm, while maintaining less than 1% accuracy degradation on classification tasks with conservative approximation settings. However, generation tasks showed greater sensitivity to approximation, underscoring the need for task-specific tuning.
Förderung
- SeoulTech (Seoul National University of Science and Technology)
Zitieren
APA
Kim, R., Lee, D., Kim, J., Park, J., & Lee, S. (2025). Hardware Accelerator for Approximation-Based Softmax and Layer Normalization in Transformers. Electronics, 14(12), 2337. https://doi.org/10.3390/electronics14122337
Vancouver
Kim R, Lee D, Kim J, Park J, Lee S. Hardware Accelerator for Approximation-Based Softmax and Layer Normalization in Transformers. Electronics. 2025;14(12):2337. doi:10.3390/electronics14122337
BibTeX
@article{Kim2025,
author = {Kim, Raehyeong and Lee, Dayoung and Kim, Jinyeol and Park, Joungmin and Lee, Seung},
title = {Hardware Accelerator for Approximation-Based Softmax and Layer Normalization in Transformers},
journal = {Electronics},
year = {2025},
volume = {14},
number = {12},
pages = {2337},
doi = {10.3390/electronics14122337}
}
EUVIMED