LLM from scratch, part 28 – training a base model from scratch on an RTX 3090
I felt like it should be possible to train a GPT-2 small level model on my own hardware using modern tools and open datasets from scratch. It was!
Currently mostly AI because in 2026 of course it is. Grinding through the nuts and bolts of LLMs and trying to work out why this stuff works...
Visit gilesthomas.com → RSS feedOn Hacker News Feb 2025 – Jun 2026
AI & Machine Learning 6Software Engineering 4Networking & Internet 2Life, Learning & Writing 2Infrastructure & DevOps 2Math & Algorithms 1
I felt like it should be possible to train a GPT-2 small level model on my own hardware using modern tools and open datasets from scratch. It was!
Moving on from a toy self-attention mechanism, it's time to find out how to build a real trainable one. Following Sebastian Raschka's book 'Build a Large Language Model (from Scratch)'. Part 8/??
A pause to take stock: realising that attention heads are simpler than I thought explained why we do the calculations we do.
Finally, we train an LLM! The final part of Chapter 5 of Build an LLM (from Scratch) runs the model on real text, then loads OpenAI’s GPT-2 weights for comparison.