Week 11 • Thursday

Block 108: Hugging Face Transformers: Intro

Load and use pre-trained transformer models for NLP tasks.

Concepts

Code Examples

See exercise below.

Exercise

Use pipeline('sentiment-analysis') to classify 5 sentences. Examine confidence scores. Use pipeline('ner') to extract entities from a news headline.

Homework

What is the difference between BERT and GPT in terms of pre-training objective? Explain in simple terms. Friday