A comprehensive interactive HTML tutorial that takes you from basic mathematics to understanding the complete transformer architecture and GPT models.
- Mathematical Foundations: Vectors, matrices, and operations
- Neural Network Basics: Neurons, layers, and training
- Attention Mechanism: The breakthrough that changed everything
- Transformer Architecture: Complete end-to-end understanding
- GPT and Language Models: How ChatGPT actually works
- Interactive Playground: Hands-on experiments with transformer concepts
- Clone this repository
- Open
index.htmlin your web browser - Follow the chapters in order for the best learning experience
- Chapter 1: Mathematical Foundations
- Chapter 2: Neural Network Basics
- Chapter 3: The Attention Mechanism
- Chapter 4: Transformer Architecture
- Chapter 5: GPT and Language Models
- Playground: Interactive demos and calculators
- 📖 Progressive learning from simple math to complex AI
- 🎮 Interactive visualizations and calculators
- 📱 Responsive design that works on all devices
- 🧮 Mathematical equations rendered with KaTeX
- 💡 Real-world examples and practical implementations
- 🎯 Step-by-step explanations with visual aids
This tutorial was created using Claude Code as an AI-powered tutorial maker! Here's the fascinating process:
-
📹 Video Source: Downloaded Andrej Karpathy's excellent video "Let's build GPT: from scratch, in code, spelled out"
-
📝 Transcription: Used MacWhisper to transcribe the entire 2-hour video, creating a searchable text version of all the content
-
🤖 AI Tutorial Generation: Used Claude Code in planning mode with this prompt:
"I want to learn more about transformers. This directory has a video for simple GPT explanation, I was thinking we can do a good HTML tutorial from Zero (Simple math) to the end. You can use ffmpeg to extract PNG frames to understand more or even use them in the tutorial."
-
🔍 Content Analysis: Claude Code analyzed the video transcript and extracted key frames at strategic timestamps to understand the content structure
-
📋 Tutorial Planning: Claude created a comprehensive plan covering:
- Mathematical foundations
- Neural network basics
- Attention mechanisms
- Complete transformer architecture
- GPT training and generation
-
💻 Implementation: Claude Code built the entire tutorial with:
- Modern HTML5 and CSS3
- Interactive JavaScript demos
- Mathematical notation with KaTeX
- Responsive design
- Professional styling
-
🎮 Interactive Elements: Added engaging features like:
- Dot product calculators
- Softmax visualizers
- Attention weight matrices
- Text generation simulators
- Model size calculators
- 🎯 Targeted Learning: The AI analyzed the video content to create focused, progressive lessons
- 📖 Multiple Learning Styles: Combines video content with text, visuals, and interactivity
- 🔧 Hands-On Practice: Interactive elements let you experiment with concepts immediately
- 📱 Accessibility: Web-based format works anywhere, anytime
- 🎨 Professional Quality: AI-generated content with human-level educational design
A comprehensive tutorial that bridges the gap between beginner math and advanced AI concepts, making transformers accessible to anyone with curiosity and basic programming knowledge.
- Zero Assumptions: Starts from basic math, no AI background needed
- Visual Learning: Attention matrices, interactive demos, and step-by-step examples
- Practical Focus: Real code examples and implementation details
- Modern Approach: Uses the latest educational techniques and web technologies
- AI-Powered Creation: Demonstrates how AI can be used to create educational content
- Original Video by Andrej Karpathy
- Attention Is All You Need - The original Transformer paper
- GPT Papers - OpenAI's GPT research
This tutorial was generated by AI but can be improved by humans! Feel free to:
- Report issues or suggest improvements
- Add more interactive examples
- Enhance explanations
- Fix any errors you find
This educational content is provided under MIT License. Feel free to use, modify, and share!
- Andrej Karpathy for the excellent source video
- Claude Code for the AI-powered tutorial generation
- MacWhisper for video transcription capabilities
- The entire AI/ML community for making this knowledge accessible
Built with ❤️ using AI-powered education tools