← How AI Models Are Trained: A Visual Guide to Building Models from Scratch
Your journey
27 stops. Sign in to see your ticks and stars on the map. Go at your own pace.
Start Here
📍 You are hereWhat It Means to Train a ModelTraining means a model guesses, sees how wrong it was, and changes its numbers a little.Lesson- Data, Features and LabelsTraining data is a table of examples.Lesson
Your First Model: Fitting a Line
A Model Is a Formula with KnobsOur first model is a straight line: price = w × size + b.Lesson- Measuring Mistakes: The LossThe loss is one number for all of a model's mistakes.Lesson
- Gradient Descent: Turning the Knobs DownhillGradient descent finds which way each knob makes the loss grow.Lesson
- Lab: Train a Line from ScratchIn this lab you write the loss, the slopes and the update step in Python.Lesson
Classifying Things
From Numbers to Yes or No: Logistic RegressionThe model adds up clues with weights.Lesson- Training, Validation and Test SetsSplit your examples into three piles.Lesson
- Overfitting and UnderfittingA model that is too simple misses the pattern.Lesson
- Judging a Classifier: Accuracy, Precision and RecallCount the right and wrong answers by type.Lesson
- Check Your Understanding: Training BasicsQuiz
Neural Networks from Scratch
Neurons, Weights and ActivationsA neuron takes some numbers in and gives one number out.Lesson- The Forward PassThe forward pass is how a network makes a guess.Lesson
- Backpropagation Without the FearBackpropagation finds how much each knob caused the mistake.Lesson
- Lab: Train a Tiny Neural NetworkIn this lab you train a small network on a pattern called XOR.Lesson
- Making Training Work: Learning Rate, Batches and EpochsThree settings shape training.Lesson
Models That Write Text
Tokens and EmbeddingsA model only works with numbers.Lesson- Predicting the Next TokenA text model looks at the text so far.Lesson
- Lab: Build a Tiny Text GeneratorYou build a text model that counts which letter comes after which.Lesson
- Attention and Transformers in PicturesAttention lets each word look back at earlier words.Lesson
- How Large Language Models Are TrainedLarge language models are trained in three stages.Lesson
Training Your Own Models in Practice
Getting and Cleaning Data ResponsiblyBefore training, make sure you may use the data.Lesson- The Same Ideas in PyTorchPyTorch is a free library that does the same training steps you did by hand.Lesson
- Fine-Tuning an Existing Model Instead of Starting OverFine-tuning means you take a model that is already trained.Lesson
- Evaluating, Saving and Sharing a ModelTest the model once on data it has never seen.Lesson
- Check Your Understanding: Networks, Text and PracticeQuiz
- Final Project: Train and Evaluate Your Own ModelPick a small task and data you may use.Project
End of the course
Every stop you finish brings you closer.