Hardware-efficient Softmax Approximation for Self-Attention Networks

Softmax函数 计算机科学 数据路径 瓶颈 延迟(音频) 变压器 语言模型 现场可编程门阵列 并行计算 人工智能 人工神经网络 计算机硬件 嵌入式系统 电信 物理 量子力学 电压
作者
Nazim Altar Koca,Anh Tuan,Chip-Hong Chang
标识
DOI:10.1109/iscas46773.2023.10181465
摘要

Self-attention networks such as Transformer have become state-of-the-art models for natural language processing (NLP) problems. Softmax function, which serves as a normalizer to produce attention scores, turns out to be a severe throughput and latency bottleneck of a Transformer network. Softmax datapath consists of data-dependent sequential nonlinear exponentiation and division operations, which are not amenable to pipelining and parallelism, nor can they be directly linearized for pretrained models without substantial accuracy drop. In this paper, we proposed a hardware efficient Softmax approximation which can be used as a direct plug-in substitution into pretrained transformer network to accelerate NLP tasks without compromising its accuracy. Experiment results on FPGA implementation show that our design outperforms vanilla Softmax designed using Xilinx IPs with 15x less LUTs, 55x less registers and 23x lower latency at similar clock frequency and less than 1% accuracy drop on main language benchmark tasks. We also propose a pruning method to reduce the input entropy of Softmax for NLP problems with high number of inputs. It was validated on CoLA task to achieve a further 25% reduction of latency.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
kewy发布了新的文献求助10
刚刚
刚刚
keke发布了新的文献求助10
1秒前
wanci应助月亮不说话采纳,获得10
1秒前
2秒前
wuwen发布了新的文献求助10
2秒前
欢喜怀蝶发布了新的文献求助10
3秒前
牛牛小天使应助恩吉尔采纳,获得10
4秒前
5秒前
5秒前
6秒前
Fisher发布了新的文献求助30
6秒前
6秒前
JV发布了新的文献求助10
6秒前
123发布了新的文献求助10
6秒前
weizheng完成签到,获得积分0
8秒前
丘比特应助好了采纳,获得10
10秒前
11秒前
甜甜的孤菱应助恩吉尔采纳,获得10
12秒前
JJ发布了新的文献求助10
12秒前
ZJING9完成签到,获得积分10
13秒前
13秒前
Hello应助炙热的文博采纳,获得30
13秒前
量子星尘发布了新的文献求助10
14秒前
CodeCraft应助为科研奋斗采纳,获得10
14秒前
15秒前
wuwen完成签到,获得积分10
18秒前
18秒前
jie完成签到 ,获得积分10
18秒前
19秒前
mhs发布了新的文献求助10
20秒前
00完成签到 ,获得积分0
22秒前
23秒前
24秒前
24秒前
doubleuz完成签到,获得积分10
25秒前
碧蓝老黑完成签到,获得积分10
26秒前
hata完成签到,获得积分10
26秒前
27秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Burger's Medicinal Chemistry, Drug Discovery and Development, Volumes 1 - 8, 8 Volume Set, 8th Edition 1800
Cronologia da história de Macau 1600
Contemporary Debates in Epistemology (3rd Edition) 1000
International Arbitration Law and Practice 1000
文献PREDICTION EQUATIONS FOR SHIPS' TURNING CIRCLES或期刊Transactions of the North East Coast Institution of Engineers and Shipbuilders第95卷 1000
BRITTLE FRACTURE IN WELDED SHIPS 1000
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 纳米技术 计算机科学 化学工程 生物化学 物理 复合材料 内科学 催化作用 物理化学 光电子学 细胞生物学 基因 电极 遗传学
热门帖子
关注 科研通微信公众号,转发送积分 6162999
求助须知:如何正确求助?哪些是违规求助? 7990938
关于积分的说明 16614606
捐赠科研通 5270648
什么是DOI,文献DOI怎么找? 2812080
邀请新用户注册赠送积分活动 1792181
关于科研通互助平台的介绍 1658379