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.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Lun发布了新的文献求助10
1秒前
1秒前
斯文败类应助暴躁的念之采纳,获得10
1秒前
小二完成签到,获得积分10
1秒前
镓氧锌钇铀应助TRACEY采纳,获得10
2秒前
xgg完成签到,获得积分20
2秒前
stel7发布了新的文献求助10
2秒前
yan发布了新的文献求助10
3秒前
4秒前
Martin发布了新的文献求助10
4秒前
xiayx完成签到 ,获得积分10
4秒前
大模型应助王邵梅采纳,获得10
5秒前
晏清发布了新的文献求助30
5秒前
英俊的铭应助ZhijunXiang采纳,获得10
6秒前
6秒前
午夜煎饼完成签到,获得积分10
6秒前
橙啦完成签到 ,获得积分10
7秒前
hsa_ID完成签到,获得积分20
8秒前
健壮的紫夏完成签到,获得积分10
9秒前
9秒前
浅蓝发布了新的文献求助10
9秒前
9秒前
9秒前
10秒前
hikari发布了新的文献求助10
10秒前
11秒前
11秒前
NN应助了大憨采纳,获得10
11秒前
xml完成签到,获得积分20
12秒前
等月光完成签到,获得积分10
13秒前
执着的小熊猫完成签到 ,获得积分10
13秒前
CipherSage应助yan采纳,获得10
13秒前
lululull发布了新的文献求助10
14秒前
14秒前
xml发布了新的文献求助10
15秒前
wjx发布了新的文献求助10
15秒前
hikari发布了新的文献求助10
16秒前
拉长的湘完成签到,获得积分10
18秒前
sennialiu完成签到,获得积分10
18秒前
18秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Fermented Coffee Market 2000
PARLOC2001: The update of loss containment data for offshore pipelines 500
Critical Thinking: Tools for Taking Charge of Your Learning and Your Life 4th Edition 500
Phylogenetic study of the order Polydesmida (Myriapoda: Diplopoda) 500
A Manual for the Identification of Plant Seeds and Fruits : Second revised edition 500
Vertebrate Palaeontology, 5th Edition 340
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 内科学 生物化学 物理 计算机科学 纳米技术 遗传学 基因 复合材料 化学工程 物理化学 病理 催化作用 免疫学 量子力学
热门帖子
关注 科研通微信公众号,转发送积分 5259600
求助须知:如何正确求助?哪些是违规求助? 4421190
关于积分的说明 13762060
捐赠科研通 4295031
什么是DOI,文献DOI怎么找? 2356695
邀请新用户注册赠送积分活动 1353099
关于科研通互助平台的介绍 1314206