Accuracy-preserving Layer Normalization Approximations for Efficient Transformer Hardware Accelerators

Nazim Altar Koca, Anh Tuan, Chip-Hong Chang2025 · DOI

Abstract

Transformers have emerged as leading models for solving natural language processing (NLP) problems. Layer normalization (LN) has been found to be a throughput and latency bottleneck for Transformer networks. The LN datapath involves sequential processing that is dependent on the input data, and GPU and CPU unfriendly nonlinear square root and reciprocal operations. These make pipelining and hardware simplification challenging without compromising the accuracy of pretrained models. In this paper, we propose a hardware-efficient and accuracy-preserving design for LN approximation. The LN core can be directly plugged into pretrained Transformer networks to accelerate NLP tasks without fine tuning. The FPGA implementation of our design outperforms the state-of-the-art FPGA implementation of LN, with 3.5 × higher throughput per LUT and 1.3 × higher throughput per DSP. Our approximation introduces negligible average and worst-case accuracy drops of only 0.28% and 1.09%, respectively on the main language benchmark tasks. Additionally, a better pipelined design with pairwise variance calculation is proposed to reduce the number of iterations for LN, resulting in a further 27% reduction in latency with a slight increase in hardware resource requirement.
BibTeX
@misc{koca2025accuracy,
  author = {Nazim Altar Koca and Anh Tuan and Chip-Hong Chang},
  title = {{Accuracy-preserving Layer Normalization Approximations for Efficient Transformer Hardware Accelerators}},
  year = {2025},
  doi = {10.1109/iscas56072.2025.11044257},
}

Loading related content...

Figure