All coursesDeep Learning for NLP:
Deep Learning for NLP:
from the Perceptron to the Transformer
Build the architecture behind modern language models from scratch, with full mathematical rigour.
Level: intermediate43 lessons
01 — Before you start
Prerequisites
This course is mathematically rigorous. Before you start, you'll need:
- Intermediate PythonFunctions, classes, basic NumPy.
- Linear algebraVectors, matrices, matrix multiplication.
- CalculusPartial derivatives and the chain rule.
02 — Content
Syllabus
5 blocks · 43 lessons · ~18h reading01NLP FundamentalsTokenisation, vocabularies and the first vector representations of text.8 lessons · 2h 44m
- The problem of representing language8 min
- Tokenisation: words, characters, subwords20 min
- Vocabulary, frequency and the OOV problem20 min
- One-hot encoding and the curse of dimensionality22 min
- Bag of words and TF-IDF24 min
- Dense representations: the core idea21 min
- Word2Vec: skip-gram and CBOW24 min
- GloVe and the limits of static embeddings25 min
02The Multilayer PerceptronFrom the perceptron to a multilayer network trained with gradient descent and backpropagation.10 lessons · 4h 50m
- The artificial neuron22 min
- Activation functions and non-linearity30 min
- XOR: why we need hidden layers25 min
- The forward pass in matrix form30 min
- Loss functions: MSE and cross-entropy30 min
- Gradient descent30 min
- The chain rule, in earnest30 min
- Backpropagation: the full derivation35 min
- Implementing an MLP from scratch30 min
- Project: a sentiment classifier28 min
03Recurrent Neural NetworksSequences, memory and the problem of the vanishing gradient.8 lessons · 3h 39m
04The Bridge to AttentionThe context bottleneck and the alignment that solves it.6 lessons · 2h 42m
05The TransformerSelf-attention, multiple heads and positional encoding.11 lessons · 4h 45m
- Adiós a la recurrencia22 min
- Auto-atención: la secuencia se mira a sí misma29 min
- La raíz que faltaba en la atención28 min
- Varias cabezas, varios repartos29 min
- Cada posición, un puñado de relojes29 min
- Apilar sin perder lo de abajo28 min
- Escribir no es leer: el decoder y su máscara28 min
- Quince cajas, cinco números24 min
- Proyecto: un Transformer desde cero30 min
- BERT y GPT: una columna cada uno20 min
- Fine-tuning en la práctica18 min
03 — About Gustavo
Your instructor
Author's note
04 — Frequently asked questions
Frequently asked questions
How much does it cost?
Nothing. The course is completely free.
What do I need to know before starting?
Intermediate Python, linear algebra (vectors and matrices) and calculus (partial derivatives and the chain rule). They're listed in the prerequisites section.
How long will it take?
Around 40 hours if you do the exercises. Go at your own pace; there are no deadlines.
What do I need to install?
Nothing. Everything — the Python code included — runs directly in your browser.