/ module 01 · Foundations
Neural Network Basics
Every LLM is a neural network: billions of tiny units that multiply, add and squash numbers. Before tokens and transformers, get a feel for one neuron, then watch a small network teach itself to separate patterns a single neuron never could.
- Explain what a neuron's weights, bias and activation do
- Say why one neuron can only draw a straight line
- Describe how gradient descent lowers the loss step by step
Try this first: Drag weight 1 below zero and watch the colored boundary flip.
concept
One neuron, three steps
A neuron takes inputs, multiplies each by a weight, adds a bias, and passes the sum z through an activation function. On a 2D plane, that draws a straight line: one side says "yes", the other "no".
Classifying the two clusters: 100% correct. Try making weight 1 negative and watch the boundary flip. Blue dots should sit on blue.
training
Learning = rolling downhill
Nobody sets the weights by hand in a real network. Training measures the error with a loss, uses backpropagation to find which direction each weight should move, then takes a small step: gradient descent. Repeat thousands of times. GPT-style models do exactly this, with billions of weights and next-token loss.
A single neuron can only draw a line, so it fails on XOR and circles. Add a hidden layer and the network can bend the boundary.
Try: XOR with 0 hidden neurons never passes ~75%. Set 3 or more and press Train. Spiral needs 8 neurons and patience; crank the learning rate to 3 to see training go unstable.
Check yourself
Tick each one you could explain to a friend. If you can't yet, scroll back up and replay the lab.