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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
热情果汁完成签到,获得积分10
刚刚
酷波er应助猪猪侠采纳,获得10
刚刚
蒋欣欣发布了新的文献求助10
刚刚
11111关注了科研通微信公众号
1秒前
Lucia_yx发布了新的文献求助10
1秒前
1秒前
慕青应助zjq采纳,获得10
1秒前
负负得正发布了新的文献求助10
1秒前
cj完成签到,获得积分10
1秒前
英俊的铭应助整齐棉花糖采纳,获得10
1秒前
2秒前
扶瑶可接发布了新的文献求助30
2秒前
3秒前
fox关闭了fox文献求助
3秒前
shilin0822发布了新的文献求助10
3秒前
hzhsjcjh发布了新的文献求助10
4秒前
Dawn完成签到,获得积分10
4秒前
mc完成签到,获得积分10
4秒前
无敌醉熊发布了新的文献求助10
4秒前
和谐的绿竹完成签到,获得积分10
5秒前
kshuizhuyu发布了新的文献求助20
5秒前
选民很头疼完成签到,获得积分10
6秒前
温医第一打野完成签到,获得积分10
6秒前
zzz完成签到 ,获得积分10
6秒前
剁椒鱼头发布了新的文献求助10
6秒前
完美世界应助江林采纳,获得10
6秒前
YuanLeiZhang完成签到,获得积分10
6秒前
淳于一江发布了新的文献求助10
7秒前
7秒前
safety应助李扒皮采纳,获得10
7秒前
chenxue完成签到 ,获得积分10
7秒前
飞翔的西红柿完成签到,获得积分10
7秒前
大方的曼容完成签到 ,获得积分10
8秒前
脚踏实地i发布了新的文献求助10
8秒前
砥砺前行完成签到 ,获得积分10
8秒前
9秒前
9秒前
10秒前
一一完成签到,获得积分10
10秒前
10秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Aerospace Standards Index - 2026 ASIN2026 3000
Relation between chemical structure and local anesthetic action: tertiary alkylamine derivatives of diphenylhydantoin 1000
Signals, Systems, and Signal Processing 610
Discrete-Time Signals and Systems 610
Principles of town planning : translating concepts to applications 500
Work Engagement and Employee Well-being 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 纳米技术 有机化学 物理 生物化学 化学工程 计算机科学 复合材料 内科学 催化作用 光电子学 物理化学 电极 冶金 遗传学 细胞生物学
热门帖子
关注 科研通微信公众号,转发送积分 6067911
求助须知:如何正确求助?哪些是违规求助? 7899965
关于积分的说明 16328666
捐赠科研通 5209623
什么是DOI,文献DOI怎么找? 2786585
邀请新用户注册赠送积分活动 1769485
关于科研通互助平台的介绍 1647908