snlp-2
Transformers for NLP
Overview
In this unit, we'll look at transformer architectures and attention mechanisms. 👀
Outcomes
By the end of this unit, you'll be able to …
- trace a small scaled dot product attention calculation
- explain which positions encoder, causal decoder, and encoder-decoder attention can use
- describe how BERT uses transformer encoder blocks [2019]
- describe the structure of BERT
- describe the pretraining tasks used for BERT
Resources
|
Readings |
Self-attention mechanisms Transformers (first academic paper) The Illustrated Transformer BERT (first academic paper) Bidirectional Transformer Encoders |
|
|
PyTorch |
The Annotated Transformer |
|
Learn
Unit checklist
Practice
Try to put these ideas into practice for your shared task and class competition submissions.
- Ashish Vaswani and Noam M. Shazeer and Niki Parmar and Jakob Uszkoreit and Llion Jones and Aidan N. Gomez and Lukasz Kaiser and Illia Polosukhin (2017). Attention is All you Need. NIPS.
- Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics 4171-4186 10.18653/v1/N19-1423
- Jacob Devlin and Ming-Wei Chang and Kenton Lee and Kristina Toutanova (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.
- Goldberg, Yoav (2017). Neural Network Methods for Natural Language Processing. Morgan & Claypool Publishers https://ebookcentral.proquest.com/lib/uaz/reader.action?docID=4843762
- Ruder, Sebastian (2017). Deep Learning for NLP Best Practices. https://www.ruder.io/deep-learning-nlp-best-practices