Let's Build GPT from Scratch
Karpathy builds a GPT model from scratch in code — the canonical hands-on intro to transformer training.
About this course
In this hands-on course, Andrej Karpathy—a leading figure in deep learning and AI education—walks you through building a GPT model entirely from scratch in code. Rather than treating transformers as a black box, you'll understand exactly how they work by implementing them yourself. This is the gold standard introduction to transformer training, perfect for anyone serious about moving beyond theory into practical understanding.
What you'll learn
- Build a working GPT model from first principles, understanding every component
- Implement transformer architecture: attention mechanisms, multi-head attention, and feed-forward layers
- Train a neural network on real data and debug training loops like a professional
- Understand tokenization, embedding, and positional encoding in depth
- Generate text with your own trained model and improve output quality
- Grasp the mathematical foundations behind modern large language models
- Read and interpret research papers on transformers with confidence
Who this is for
You're ready for this course if you already know Python and have studied machine learning basics. You should be comfortable reading code and thinking mathematically, because you'll be writing the transformer from scratch—not just using a library.
- AI researchers and engineers — build deep technical mastery of transformers before specializing further
- Engineering students — get hands-on experience with cutting-edge AI that will set you apart in placements and internships
Prerequisites
Strong Python programming skills, basic understanding of neural networks (backpropagation, gradient descent), and comfort with linear algebra and calculus. This is an advanced course—it assumes you've already learned the fundamentals of deep learning.
Why this matters for Indian learners
India's AI job market is exploding. Major Indian tech companies (TCS, Infosys, Wipro) and startups across Bangalore, Hyderabad, and Mumbai are desperately hiring AI engineers who understand transformer models deeply. This course gives you the rare, genuine expertise that separates candidates who can *build* AI from those who just use off-the-shelf tools. For placements, freelancing, or starting your own AI venture, this knowledge is a major differentiator.
Frequently asked questions
Is this course really free?
Yes, completely free. Andrej Karpathy uploaded this to YouTube as a gift to the AI community. No hidden paywalls or premium versions.
How long will it take to complete?
The video is 2 hours, but expect to spend 3–4 weeks total if you're coding along (which you should). Plan for 1.5–2 hours per week of focused, uninterrupted work. You'll pause, rewind, and experiment—that's the whole point.
Will I get a certificate?
No official certificate comes with this course. But you'll have something better: a fully working GPT model you built yourself, which you can show employers and include in a portfolio.
At a glance
- Provider
- Andrej Karpathy
- Level
- Advanced
- Duration
- 2 hrs
- Format
- Recorded
- Certificate
- No
- Price
- Free
More free courses
Other AIshala-vetted free courses