transformer结构简析

简化版教程,详细版可以看这篇

self-attention

单个attention

self-attention

MHA

decoder

Cross-Attention

stable diffusion中使用

参考