【2】transformer准确说也是一种encoder-decoder模型,但是融合了多个技巧(只列出了几个典型的trick):
(1) scaled dot-product attention
(2)multi-head attention
(3)positional encoding
(4)position-wise前馈网络
(5)残差连接
【3】基于已有的语言数据,训练一个通用的半监督的大规模预训练语言模型的思路最早被印证是open ai的gpt(是一个基于transformer的自回归语言模型)。
【4】bert真正实现了基于上下文的语言模型,因为像elmo一样基于bilstm的双向自回归模型只是两个单向的组合。
【5】预训练模型(bert最典型)+特定场景的微调(fine-tune)几乎已成为自然语言处理任务的通用模式。
【6】关于形式系统的局限是一个非常有意思但又非常庞大的话题,此处不进行详述;给出一个有意思的例子,仅供大家把玩。
客官们觉得下面这句话到底是真的还是假的?
“这句话不是真的”
03
—
参考文献
1. vaswani, ashish, et al. ”attention is all you need.” advances in neural information processing systems 30 (2017).
2. popel m, bojar o. training tips for the transformer model[j]. the prague bulletin of mathematical linguistics, 2018, 110(1): 43-70.
3. <a href="http://nlp.seas.harvard.edu/2018/04/03/attention.html" target="_blank">http://nlp.seas.harvard.edu/2018/04/03/attention.html</a>
4. <a href="https://jalammar.github.io/illustrated-transformer/" target="_blank">https://jalammar.github.io/illustrated-transformer/</a>
5. <a href="https://github.com/tensorflow/tensor2tensor" target="_blank">https://github.com/tensorflow/tensor2tensor</a>
6. <a href="https://arxiv.org/pdf/1802.05365.pdf" target="_blank">https://arxiv.org/pdf/1802.05365.pdf</a>
7. radford, a., narasimhan, k., salimans, t., & sutskever, i. (2018). improving language understanding by generative pre-training.
比奇屋 www.biqi5.com