- Starter AI
- Posts
- Deep Dive: Building GPT from scratch
Deep Dive: Building GPT from scratch
learning from Andrej Karpathy

Welcome to the Deep Dive into GPTs series of Starter AI.
If you can code and you’d like to learn AI from scratch, this series is for you.
Who am I, and why write this?
My name is Miko Pawlikowski, and I spent the last decade building platforms & doing SRE. You might have seen my book on Chaos Engineering, and you might have bumped into me at SREday. I love that stuff, and most of my writing is about that.
So what’s up with AI?
2023 was a breakthrough year for LLMs (Large Language Models). Humanity as a whole figured out that taking a massive amount of text and processing it with a large stash of GPUs allows for the creation of an entirely new breed of software. The kind of software that feels creepily “human”: answer questions, write code, summarise text, translate, and do what really looks like logical reasoning.
All of that came after 2022 brought a different kind of breakthrough: stable diffusion. The two together laid foundations for projects like Midjourney, which can generate images (photorealistic, or in nearly any style) from a single prompt. Things are getting weird.
And it turns out that achieving these results is not as difficult as the science fiction writers had us think (Google’s memo about having ‘no moat’ underlines that).
So while I still don’t think Skynet is just around the corner (I hope this ages well), last year was when I realised that this new tech is here to stay, and it’s time to learn it. Whether we’re entering the AI era, after smartphones, after the internet, remains to be seen. But from a programmer’s point of view, the landscape has shifted, even after the hype dies down.
So in this series of Starter AI, I’ll be sharing with you my journey on how to learn it. It’s hard to learn a new domain from scratch while working full time, and it’s even harder with the informational overload happening currently in AI.
So my hope is that lining things up for you, and motivating you to push will maximise your chances of succeeding.
So, where do we start?
Enter Andrej Karpathy
If you ever googled anything AI, Andrej’s name probably came up.
What makes him stand out from the crowd of deep learning geniuses is that when he’s not busy being a founding member of OpenAI, or Senior Director of AI at Tesla, or jumping back to OpenAi, he’s sharing a lot of what he learns online, for free.
Check out his homepage: https://karpathy.ai/
Andrej’s homepage
He also doesn’t project an aura of a millionaire tech founder, but rather a down-to-earth guy who’s really excited about his area of expertise. Which only adds to the respect.
The amount of learning resources on AI is increasing very rapidly. But I found Andrej’s videos the most manageable to learn from. In the last six months or so, I’ve gone through his videos, and learned a ton.