Learn ML
A 12-episode video series that teaches ML engineering by building real projects.
This isn't "here's how to write a for loop." This is "here's what you need to understand to build ML systems" -- the concepts, the intuition, and the hands-on experience that AI coding tools can't replace.
The Format
Every episode has two parts:
The Knowledge (5-10 min) -- Concept explanation, intuition, and mental models. Interactive slides you can follow along with in your browser.
The Work (10-15 min) -- Build something real. Step-by-step Python scripts where each one demonstrates a concept with clear input and output.
Episodes
| # | Topic | Project | Slides | Video |
|---|---|---|---|---|
| 1 | PyTorch | Pokemon card price predictor | Slides | Coming soon |
| 2 | Transformers | Build a mini-GPT | Slides | Coming soon |
| 3 | Hugging Face | Model comparison tool | ||
| 4 | Embeddings | Searchable speech database | ||
| 5 | Fine-tuning (SFT) | Domain-specific assistant | ||
| 6 | LoRA / QLoRA | 7B model on consumer GPU | ||
| 7 | DPO | Align your fine-tuned model | ||
| 8 | Evaluation | Domain evaluation suite | ||
| 9 | GPU Optimization | 2x training throughput | ||
| 10 | Distributed Training | Scale beyond one GPU | ||
| 11 | Reinforcement Learning | Game AI agent | ||
| 12 | Triton & Kernels | Understand ML infrastructure |
Getting Started
Requirements
- Python 3.11 or 3.12
- An NVIDIA GPU with CUDA support (tested on RTX 3060)
- ~2GB disk space for PyTorch
Setup
Create a virtual environment and install dependencies:
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux / Mac
source .venv/bin/activate
# Install PyTorch (with CUDA)
pip install torch --index-url https://download.pytorch.org/whl/cu124
# Install other dependencies
pip install pandas matplotlib scikit-learn pyarrow requestsRunning an Episode
Each episode lives in its own directory under episodes/. Scripts are numbered and meant to be run in order -- each one builds on the previous.
cd episodes/01-price-predictor
# Step 1 produces output that Step 2 needs, and so on
python step1_tensors.py
python step2_model.py
python step3_training_step.py
python step4_train.py
python step5_evaluate.pyViewing Slides
Open any .html file in the slides/ directory in your browser. Navigate with arrow keys, spacebar, or the buttons in the corner. Touch/swipe works on mobile.
Episode Details
Episode 1: PyTorch
Concepts: Tensors (shape, dtype, device), autograd, the training loop, nn.Module, DataLoader
Project: Train a neural network to predict Pokemon card market prices from card attributes (rarity, type, HP, etc.) using real data from the Pokemon TCG API.
| Script | What it does | Output |
|---|---|---|
fetch_data.py | Pulls 2,000+ real Pokemon cards from the API | pokemon_cards.csv |
step1_tensors.py | Convert CSV to tensors, inspect shape/dtype/device | card_tensors.pt |
step2_model.py | Build the neural network, explore parameters | -- |
step3_training_step.py | One training step: forward, loss, backward, update | -- |
step4_train.py | Full training loop, 100 epochs | trained_model.pt |
step5_evaluate.py | Test predictions, metrics, plots | results.png |
Episode 2: Transformers
Concepts: Attention (Q/K/V), multi-head attention, causal masking, positional encoding, the transformer block (feed-forward, residuals, layer norm), decoder-only generation
Project: Build a mini-GPT from scratch and train it to generate text. We trained ours on One Piece episode synopses.
Note: You need to provide your own training text. Place it in
episodes/02-mini-gpt/input.txt. Any plain text works -- novels, articles, wiki pages. Aim for 500KB-3MB.
| Script | What it does | Output |
|---|---|---|
step1_attention.py | Implement attention from scratch, visualize weights | vocab.pt, input.txt |
step2_multihead_mask.py | Multi-head attention + causal mask | config.pt |
step3_transformer_block.py | Build the full model: blocks + embeddings + output | model_config.pt |
step4_train.py | Train on your text (~5-15 min on GPU) | trained_minigpt.pt |
step5_generate.py | Generate text from prompts, temperature comparison | training_loss.png |
Philosophy
- Concepts over code -- Understand what's happening. AI writes the boilerplate.
- Real projects -- Not toy examples. Actual useful things.
- Step by step -- Each script demonstrates one concept with clear input and output.
- AI-resistant skills -- Systems understanding, debugging intuition, domain expertise.
License
MIT