各种Attention机制原理

下面是9种Attention以及Attention变种的方法,其中LRA表示性能,横坐标表示运行速度,圈圈大小表示占的内存大小。

Transformer 是传统的Attention机制。

Big Bird 就是小孩子才做选择,啥都综合在一起。综合global attention, local attention 和随机attention。

Synthesizer新的想法,attention matrix不需要q,a产生,直接当network的参数。

Reformer 用clustering的方法,只关注重要区域的attention机制

Local attention方法,速度比较快,性能不太好的方法。

Sinkhore attention方法直接用network决定哪些位置用attention哪些位置不用。

Linformer, performer, Linear Transformer 是速度比较快,性能稍微差一些的一些方法。

 

posted @ 2022-04-01 07:27  CrescentTing  阅读(118)  评论(0编辑  收藏  举报