Module · 1 lessons

Capstone

One final build that ties the whole course together: assemble your from-scratch NumPy transformer — embeddings, causal multi-head attention, blocks, and the language-modeling head — train it end to end on the Lantern Bay corpus, and generate text, all in one script you understand line by line.

At a glance

Level
Advanced
Lessons
1 lessons
Time to complete
3–4 hours
Cost
Free forever · no sign-up

Welcome to the Capstone, the final stop in the course. Every module built one part of the transformer and proved it correct in isolation. This project puts them all in one place and runs them end to end: you’ll build the complete mini-GPT, train it until it learns, and let it write — a full language model, from the first matrix multiply to the last generated character, entirely by your own hand in NumPy.

You’ll assemble the architecture from the pieces you already have — token and position embeddings, stacked causal transformer blocks of multi-head attention and feed-forward layers, a final layer norm, and the language-modeling head — then run the training loop with Adam, watch the loss fall from the random baseline of about 3.18 toward fluency, and generate a passage with temperature and top-k sampling. A closing report traces each part of the finished model back to the module that taught it.

Start the lesson to build, train, and sample from your own transformer, top to bottom.

Lessons in this module

Achievement

Complete all 1 lessons to finish the Capstone module.

Start module
Sponsor

Keep DATATWEETS free. Help fund practical data, AI, and engineering lessons for learners worldwide.

Buy Me a Coffee at ko-fi.com