In Transformer models, non-GEMM (non-General Matrix Multiplication) operations -- especially Softmax and Layer Normalization (LayerNorm) -- often dominate hardware cost due to their nonlinear nature. To address this, previous approximation studies mainly target rank-oriented tasks, which is acceptable for classification. However, edge Natural Language Processing (NLP) applications and edge generative AI are largely evaluated based on score-oriented tasks, so normalization-guaranteed non-GEMM operations are essential. We propose a hardware-efficient Softmax and LayerNorm with Guaranteed Normalization for Edge devices. Our design employs hardware-efficient approximation methods while preserving the normalization (Softmax: $\sum p = 1$, LayerNorm: $σ= 1$). Our architecture is described in Verilog HDL and synthesized using the Samsung 28nm CMOS process. In accuracy evaluation, we achieve high accuracy with minimal degradation: GLUE +0.07%, SQuAD -0.01%, perplexity -0.09%. Implementation results show that our architecture is small: $942\,μm^2$ for Softmax, $1199\,μm^2$ for LayerNorm. Compared to the state of the art, we achieve up to 11x and 14x reduction in area, respectively.


翻译:在Transformer模型中,非GEMM(非通用矩阵乘法)运算——尤其是Softmax和层归一化——因其非线性特性往往主导硬件成本。为应对此问题,先前的近似研究主要针对排序型任务,这在分类场景中可被接受。然而,边缘自然语言处理应用及边缘生成式人工智能主要基于评分型任务进行评估,因此具有归一化保证的非GEMM运算至关重要。我们提出一种面向边缘设备的硬件高效Softmax与层归一化方案,在采用硬件高效近似方法的同时保持归一化特性(Softmax:$\sum p = 1$,层归一化:$σ= 1$)。本架构采用Verilog HDL描述,并基于三星28nm CMOS工艺进行综合。精度评估表明,我们以最小退化实现高精度:GLUE指标提升+0.07%,SQuAD下降-0.01%,困惑度下降-0.09%。实现结果显示本架构面积紧凑:Softmax为$942\,μm^2$,层归一化为$1199\,μm^2$。与现有最优方案相比,本设计面积分别缩减高达11倍和14倍。

0
下载
关闭预览

相关内容

边缘AI行业深度:边缘AI硬件,引领硬件创新时代
专知会员服务
52+阅读 · 2024年4月18日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
Distributional Soft Actor-Critic (DSAC)强化学习算法的设计与验证
深度强化学习实验室
20+阅读 · 2020年8月11日
英伟达Faster Transformer:作者带你揭秘BERT优化
机器之心
14+阅读 · 2019年9月18日
【边缘计算】边缘计算面临的问题
产业智能官
17+阅读 · 2019年5月31日
详解GAN的谱归一化(Spectral Normalization)
PaperWeekly
11+阅读 · 2019年2月13日
Layer Normalization原理及其TensorFlow实现
深度学习每日摘要
32+阅读 · 2017年6月17日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
印度精确打击与指挥架构的断层
专知会员服务
0+阅读 · 今天14:41
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
2+阅读 · 今天14:13
深入Project Maven:为何人工智能在战场上依然失灵
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
7+阅读 · 7月19日
《无人机蜂群通信技术研究》50页
专知会员服务
8+阅读 · 7月19日
相关资讯
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
Distributional Soft Actor-Critic (DSAC)强化学习算法的设计与验证
深度强化学习实验室
20+阅读 · 2020年8月11日
英伟达Faster Transformer:作者带你揭秘BERT优化
机器之心
14+阅读 · 2019年9月18日
【边缘计算】边缘计算面临的问题
产业智能官
17+阅读 · 2019年5月31日
详解GAN的谱归一化(Spectral Normalization)
PaperWeekly
11+阅读 · 2019年2月13日
Layer Normalization原理及其TensorFlow实现
深度学习每日摘要
32+阅读 · 2017年6月17日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员