出自知乎文章:Transformer之Decoder的QKV来源
图画的很清晰,Decoder分为两个部分,Self Attention和Encoder Attention:
Self Attention
Encoder Attention
京公网安备 11010502049817号