https://blog.csdn.net/Magical_Bubble/article/details/89083225
Seq2Seq model with “self-attention”
https://zhuanlan.zhihu.com/p/54743941
放弃幻想,全面拥抱Transformer:自然语言处理三大特征抽取器(CNN/RNN/TF)比较
https://jalammar.github.io/illustrated-transformer/
transformer 英文介绍
https://zhuanlan.zhihu.com/p/54356280
TRANSFORMER 中文介绍,上面的翻译
再然后可以进阶一下,参考哈佛大学NLP研究组写的“The Annotated Transformer. ”,代码原理双管齐下,讲得也很清楚。
http://nlp.seas.harvard.edu/2018/04/03/attention.html
https://mp.weixin.qq.com/s/_rP-0WgqRCyKq5toXLCEvw
http://jalammar.github.io/illustrated-transformer/
上图是Transformer中,第一个sub-layer的结构示意图。其特别之处只有输入接收的为字向量和位置编码的和,其他sub-layer的输入为上一层sub-layer的输出。每一个sub-layer,除上述差异之外,别无二致,所以我们只需要了解一个就可以。
通常,会有多层这样的sub-layer,在Bert-base中,有12层,GPT-2.0则更深,所以参数量都很大。GPT-2.0的参数量达到了“丧心病狂”的3亿之多,是名副其实的大模型了。