English

NN-LUT: Neural Approximation of Non-Linear Operations for Efficient Transformer Inference

Machine Learning 2021-12-07 v1 Artificial Intelligence

Abstract

Non-linear operations such as GELU, Layer normalization, and Softmax are essential yet costly building blocks of Transformer models. Several prior works simplified these operations with look-up tables or integer computations, but such approximations suffer inferior accuracy or considerable hardware cost with long latency. This paper proposes an accurate and hardware-friendly approximation framework for efficient Transformer inference. Our framework employs a simple neural network as a universal approximator with its structure equivalently transformed into a LUT. The proposed framework called NN-LUT can accurately replace all the non-linear operations in popular BERT models with significant reductions in area, power consumption, and latency.

Keywords

Cite

@article{arxiv.2112.02191,
  title  = {NN-LUT: Neural Approximation of Non-Linear Operations for Efficient Transformer Inference},
  author = {Joonsang Yu and Junki Park and Seongmin Park and Minsoo Kim and Sihwa Lee and Dong Hyun Lee and Jungwook Choi},
  journal= {arXiv preprint arXiv:2112.02191},
  year   = {2021}
}

Comments

7 pages, 3 figures

R2 v1 2026-06-24T08:03:52.062Z