arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.09301cs.AR
收藏

Softermax:一种用于Transformers的高效Softmax硬件/软件协同设计

Softermax: Hardware/Software Co-Design of an Efficient Softmax for Transformers

Jacob R. Stevens, Rangharajan Venkatesan, Steve Dai, Brucek Khailany, Anand Raghunathan

摘要:

Transformers已经改变了自然语言处理领域。这种性能在很大程度上归功于堆叠的自注意层的使用,每个层都由矩阵乘法和softmax操作组成。因此,与其他神经网络不同,softmax操作占Transformers总运行时间的很大一部分。为了解决这个问题,我们提出了Softtermax,一个硬件友好的softmax设计。Softtermax由基替换、低精度softmax计算和在线归一化计算组成。我们显示,Softermax的能效是可比基线的2.35倍,而对网络准确性的影响可以忽略不计。

英文摘要:

Transformers have transformed the field of natural language processing. This performance is largely attributed to the use of stacked self-attention layers, each of which consists of matrix multiplies as well as softmax operations. As a result, unlike other neural networks, the softmax operation accounts for a significant fraction of the total run-time of Transformers. To address this, we propose Softermax, a hardware-friendly softmax design. Softermax consists of base replacement, low-precision softmax computations, and an online normalization calculation. We show Softermax results in 2.35x the energy efficiency at 0.90x the size of a comparable baseline, with negligible impact on network accuracy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑