← Natural Language Processing learning pathNatural Language Processing · Module 7 of 10
Transformers and BERT
Understand the models behind modern NLP.
📖 Key ideas
- Transformers use self-attention to relate all words in a sentence.
- BERT is an encoder trained with masked language modelling.
- GPT-style models are decoders that predict the next token.
- Hugging Face pipeline() makes them easy to use.
- Fine-tune with your labelled data for best task results.
💡 Real-life example: BERT reads the whole sentence both ways like a careful reader; GPT writes the next word like a storyteller.
BERTBidirectional encoder model
Masked LMPredict hidden words
GPTGenerative decoder model
pipeline()Hugging Face quick-start API