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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
烟花应助DA采纳,获得10
刚刚
大事年表完成签到,获得积分10
1秒前
Accept完成签到,获得积分10
1秒前
九天完成签到 ,获得积分0
2秒前
5秒前
乐乐乐发布了新的文献求助10
6秒前
闻山应助科研通管家采纳,获得10
6秒前
田様应助科研通管家采纳,获得10
6秒前
闻山应助科研通管家采纳,获得10
7秒前
kawayifenm完成签到,获得积分10
7秒前
7秒前
7秒前
充电宝应助科研通管家采纳,获得10
7秒前
7秒前
7秒前
7秒前
脑洞疼应助科研通管家采纳,获得10
7秒前
丘比特应助xiao99采纳,获得10
7秒前
闻山应助科研通管家采纳,获得10
7秒前
爆米花应助科研通管家采纳,获得30
7秒前
共享精神应助科研通管家采纳,获得10
7秒前
小马甲应助科研通管家采纳,获得10
7秒前
春风细雨发布了新的文献求助10
7秒前
彩色的恋风完成签到,获得积分10
8秒前
Gary完成签到,获得积分10
8秒前
9秒前
9秒前
10秒前
Jasper应助伍志伟采纳,获得10
10秒前
小海绵发布了新的文献求助10
11秒前
科研通AI6.3应助meng采纳,获得10
12秒前
钧凯发布了新的文献求助10
12秒前
程程完成签到,获得积分10
13秒前
希望天下0贩的0应助wyl采纳,获得10
15秒前
正直茗完成签到,获得积分20
16秒前
rsq完成签到,获得积分10
16秒前
17秒前
18秒前
科研通AI6.3应助phil采纳,获得10
18秒前
Mengziyang完成签到,获得积分10
19秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
PowerCascade: A Synthetic Dataset for Cascading Failure Analysis in Power Systems 2000
Picture this! Including first nations fiction picture books in school library collections 1000
Signals, Systems, and Signal Processing 610
Unlocking Chemical Thinking: Reimagining Chemistry Teaching and Learning 555
Photodetectors: From Ultraviolet to Infrared 500
信任代码:AI 时代的传播重构 450
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6357893
求助须知:如何正确求助?哪些是违规求助? 8172394
关于积分的说明 17207982
捐赠科研通 5413315
什么是DOI,文献DOI怎么找? 2865033
邀请新用户注册赠送积分活动 1842569
关于科研通互助平台的介绍 1690663