Price
€21Train a Small Language Model from Scratch
Build and train your own transformer language model in PyTorch, from tokenizer to text generation.
- Advanced
- 21 lessons · 4h 3m of video
- English
- Updated Oct 2026
The route
Curriculum
5 modules · 21 lessons · 4h 3m of video
-
1
41m
Tokenizers
4 lessons
-
2
58m
Attention from scratch
5 lessons
-
3
49m
The transformer block
4 lessons
-
4
1h 1m
Training at small scale
5 lessons
-
5
34m
Sampling and evaluation
3 lessons
Destination
What you will be able to do
- Build a byte-pair tokenizer
- Implement self-attention and transformer blocks
- Write a stable training loop
- Measure loss and perplexity
- Generate text with temperature and top-k sampling
Before you buy
You will need
- Confident Python
- Basic understanding of neural networks
About this course
The journey
The best way to understand language models is to build one. You write every part yourself in PyTorch: a tokenizer, embeddings, self-attention, transformer blocks, the training loop and sampling.
Then you train a small model on a public-domain text collection on a single GPU or a free cloud notebook, measure it, and generate text with it. Nothing is hidden behind a library call.
How this course is made
This course was created by KOODIJAAM OÜ using AI tools: the lessons, exercises and example code are AI-generated, and the preview video is generated automatically from the course code.
You can watch the preview and read the full lesson list on this page before you buy. If you find a mistake, tell us — we fix it, and the fix reaches everyone who owns the course.
Information desk
Frequently asked questions
Still unsure about something? Write to support@koodijaam.com and a human answers, usually the same working day.
What students say
No reviews yet
Nobody has reviewed this course yet, so there is no score to show. Buy it, work through it, and your review could be the one that helps the next developer decide.
Roblox, Luau, SAS, Microsoft, .NET, Blazor, Avalonia, Neovim, NGINX, OpenResty, LÖVE, PyTorch, NumPy and other product names are trademarks of their respective owners. Koodijaam is an independent course provider and is not affiliated with or endorsed by them.
One-time payment · no expiry