CourseNatural Language Processing: The Complete Course · Module 7: Sequence Models and Transformers with Hugging Face · part 49 of 73
Part 49 · Module 7: Sequence Models and Transformers with Hugging Face

Lesson 3: Hugging Face pipelines, tokenisers and model heads

34 min read·14 Oct 2026
Module 7 · Lesson 3 · About 50 minutes · Needs: basic Python; subword tokenisers and input ids (Module 2 Lesson 2); report() from Module 5 Lesson 1 helps, and is pasted here

The situation

Monday 19 October 2026, project week 7. Rosa has heard that a ready-made model can read messages in three lines of code. "Before you spend a week fine-tuning anything, what does the off-the-shelf stuff do on our inbox?"

Ines picks the first hand-written test message, HT01: "Oh brilliant, the Volt 2 battery died halfway up the hill again. Really loving my £2,199 paperweight." It is a warranty fault, it is angry, and it is sarcastic. Dev needs it first. This lesson runs it through every layer of the Hugging Face stack, then scores two ready-made models on all 80 HARD_TEST messages (simulated data throughout).

HT01, HAND-WRITTEN TEST SET Oh brilliant, the Volt 2 battery died halfway up the hill again. Really loving my £2,199 paperweight. warranty_fault gold intent neg gold sentiment sarcasm what makes it hard
The lesson follows HT01: a sarcastic warranty fault whose gold labels (green) every model must match; amber marks what makes it hard.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.