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

Lesson 1: Sequence models: reading words in order

54 min read·14 Oct 2026
Module 7 · Lesson 1 · About 40 minutes · Needs: basic Python; Module 4 (TF-IDF and logistic regression) helps; no PyTorch needed

The situation

It is Monday 19 October 2026, project week 7. Rosa has heard that "deep learning" beats word counts and wants proof before paying for GPU time. Every model so far treats a message as a bag of words: it knows which words appear, not in what order.

One message runs through the lesson: HT08 from the hand-written test set (simulated). It reads "I don't want the Volt 2, I want something without a battery for my commute. Is the Harbour any good on hills?" Ines labels it product_question. Module 4's TF-IDF model sends it to Dev's warranty queue.

HT08, HAND-WRITTEN, GOLD: PRODUCT_QUESTION "I don't want the Volt 2, I want something without..." TF-IDF + LR Module 4 word counts warranty_fault 0.209 Dev's queue
Module 4's word-count model (blue: your system) sends HT08, a product question, to the warranty queue (red: wrong), because it sees "Volt 2" and "battery" but not the "don't want" before them.

The rest of this part opens with an account

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