High-Precision and Efficiency Hardware Implementation for GELU via Its Internal Symmetry

The Gaussian Error Linear Unit (GELU), a crucial component of the transformer model, poses a significant challenge for hardware implementation. To address this issue, this paper proposes internal symmetry piecewise approximation (ISPA) and error peak search strategy (EPSS) for high-precision and high-efficiency implementation of the GELU activation function. ISPA only approximates the positive axis of the erf in GELU and then leverages its internal symmetry to calculate the negative axis part. With ISPA, the mean square error (MSE) between the fitted result and the true value can reach 4.29×10−9 with 16 parts of the approximation segment, outperforming the regular method, which achieves 1.19×10−6 with 16 parts. Furthermore, EPSS can automatically find suitable and high-precision intervals for our piecewise approximation method. To evaluate the effectiveness of ISPA and EPSS, we conducted experiments on three different ViT models and observed negligible loss of prediction accuracy. The hardware implementation is on an XCZU9EG FPGA running at 450 MHz. Experimental results indicate that ISPA outperforms existing methods.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2025-04-29
DOI
https://doi.org/10.3390/electronics14091825
Citations
1
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
2.27

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

High-Precision and Efficiency Hardware Implementation for GELU via Its Internal Symmetry

Mingyong Zhuang, Jianyang Zhou, Yu-ling Wu, Jianxin Huang
1 citations
Electronics
Parallel Computing and Optimization Techniques
2.27
article

High-Precision and Efficiency Hardware Implementation for GELU via Its Internal Symmetry

Mingyong Zhuang, Jianyang Zhou, Yu-ling Wu, Jianxin Huang
article en
1 citations

Abstract

The Gaussian Error Linear Unit (GELU), a crucial component of the transformer model, poses a significant challenge for hardware implementation. To address this issue, this paper proposes internal symmetry piecewise approximation (ISPA) and error peak search strategy (EPSS) for high-precision and high-efficiency implementation of the GELU activation function. ISPA only approximates the positive axis of the erf in GELU and then leverages its internal symmetry to calculate the negative axis part. With ISPA, the mean square error (MSE) between the fitted result and the true value can reach 4.29×10−9 with 16 parts of the approximation segment, outperforming the regular method, which achieves 1.19×10−6 with 16 parts. Furthermore, EPSS can automatically find suitable and high-precision intervals for our piecewise approximation method. To evaluate the effectiveness of ISPA and EPSS, we conducted experiments on three different ViT models and observed negligible loss of prediction accuracy. The hardware implementation is on an XCZU9EG FPGA running at 450 MHz. Experimental results indicate that ISPA outperforms existing methods.

ElectronicsVol. 14(9)
Xiamen University of Technology (CN)
Fujian Provincial Department of Science and Technology
Openalex Percentile: Top 16%
Parallel Computing and Optimization Techniques
2.27
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.