Skip to content
Tracks
Stages
Smart tutor
Theme
Light
Language
العربية
Start free
Darb
Tracks
Stages
Smart tutor
/
Sign in
Start free
Loading…
Home
Tracks
Tutor
Account
Keyboard shortcuts
/
Search
n
Next lesson
p
Previous lesson
b
Save or unsave the lesson
r
Today's review
d
My board
Ctrl+Enter
Check a solution or run the code
?
This list
Open the assistant
Need help?
Curriculum
Stage 1: Junior
Language and transformers
Attention step by step, until you build a small transformer and train it on Arabic text.
Lessons
1
Tokenisation
BPE and SentencePiece, and why an Arabic sentence costs more tokens.
2
Embeddings
Meaning as a vector and cosine similarity by hand, and where it misleads.
3
Attention
Query, key and value computed on paper for a four word sentence, then in code.
4
The transformer block
Multi-head attention, layer norm, residuals and the feed-forward, together.
5
Position
Why a transformer needs order, and RoPE as today's common answer.
6
Pretraining
Next token prediction, and how ability emerges from so naive an objective.
7
Build a small transformer
From zero in PyTorch, a million parameters, ready for Arabic text.
8
Project: a transformer on an Arabic book
Train it on one book and generate text. It will be bad, and that is the proof.