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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
lcj关闭了lcj文献求助
刚刚
DQY发布了新的文献求助10
刚刚
mama完成签到,获得积分20
2秒前
常存喜乐完成签到 ,获得积分10
2秒前
大模型应助快乐篮球采纳,获得10
2秒前
GYR发布了新的文献求助10
3秒前
3秒前
棉花团完成签到,获得积分10
3秒前
3秒前
3秒前
4秒前
4秒前
4秒前
小马甲应助李里哩采纳,获得10
5秒前
strive发布了新的文献求助10
5秒前
小蘑菇应助satchzhao采纳,获得10
6秒前
梓树发布了新的文献求助10
7秒前
彭于晏应助喜喜不嘻嘻采纳,获得10
7秒前
故槿完成签到 ,获得积分10
8秒前
乙未发布了新的文献求助10
9秒前
9秒前
大模型应助honey采纳,获得10
9秒前
HY发布了新的文献求助10
9秒前
10秒前
模糊老师完成签到,获得积分10
11秒前
11秒前
碧霄完成签到,获得积分10
12秒前
沉默的瑞宝完成签到 ,获得积分10
12秒前
Adam_Lan完成签到,获得积分10
12秒前
顾矜应助明理的帆布鞋采纳,获得10
13秒前
13秒前
乐乐应助乙未采纳,获得10
14秒前
Hello应助儒雅致远采纳,获得10
15秒前
lalalal发布了新的文献求助10
15秒前
16秒前
轨迹应助嘿嘿采纳,获得10
16秒前
Decline发布了新的文献求助10
16秒前
大胆的映萱关注了科研通微信公众号
16秒前
GYR完成签到,获得积分10
17秒前
刘小蕊完成签到,获得积分10
17秒前
高分求助中
2025-2031全球及中国金刚石触媒粉行业研究及十五五规划分析报告 12000
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
The Cambridge History of China: Volume 4, Sui and T'ang China, 589–906 AD, Part Two 1000
The Composition and Relative Chronology of Dynasties 16 and 17 in Egypt 1000
Russian Foreign Policy: Change and Continuity 800
Qualitative Data Analysis with NVivo By Jenine Beekhuyzen, Pat Bazeley · 2024 800
Translanguaging in Action in English-Medium Classrooms: A Resource Book for Teachers 700
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5695061
求助须知:如何正确求助?哪些是违规求助? 5099914
关于积分的说明 15215127
捐赠科研通 4851509
什么是DOI,文献DOI怎么找? 2602393
邀请新用户注册赠送积分活动 1554207
关于科研通互助平台的介绍 1512167