arrow
返回

UN-η: An offline adaptive normalization method for deploying transformers

delete2024-09-01
delete0
PRE
AI
Z
Zheyang Li
K
Kai Zhang
Q
Qiming Yang
H
Huanlong Zhang
W
Wenming Tan
J
Jun Xiao *
S
Shiliang Pu
DOI:10.1016/j.knosys.2024.112141delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Transformer has become the de-facto architecture for many natural language and vision tasks thanks to its remarkable performance. As an essential part of transformers, normalization functions struggle to improve the robustness and performance of transformer architecture. In this work, we build up a unified framework to describe and compare the advantages and disadvantages of different normalization methods in transformers. As an online normalization method, Layer Normalization (LN) is initially used to normalize activations inside each token to handle variant-length inputs and improve robustness. However, the strong robustness and performance of online normalization methods is at the cost of inefficient inference. On the contrary, Transformers built with hardware-efficient offline normalization schemes such as Batch Normalization, yields subpar performance sometimes even collapsing during training. Furthermore, we discover that abnormal behaviors in activation statistics, such as significant iteration-to-iteration fluctuations and extreme outliers across layers, make a vital effect on the training process and the final result. Based on the unified framework, we propose Unified Normalization with eta (UN-eta), achieving low-cost inference and good performance. We theoretically prove the effectiveness of our method. Experimental results on various tasks including language, speech, and vision tasks have demonstrated that UN-eta can be a hardware-efficient substitute for LN. Besides, we assess the hardware efficiency of our method on GPU.
Keyword:
Neural networks
Normalization
Transformers
Acceleration
Hardware-efficient

期刊

K
Knowledge-Based Systems
IF:
7.6
论文数:
1.3W
被引数:
4.5W

机构

Z
Zhengzhou University of Light Industry
学者数:
6.4K
论文数: 4.0K
被引数: 5.4K
Z
zhejiang university
学者数:
17.7W
论文数: 12.1W
被引数: 152
引用论文

引用论文

err分享
err收藏