Training patterns
Each square is one input: ink = 1, empty = 0. Click either teaching pattern to edit it.
Each square is one input: ink = 1, empty = 0. Click either teaching pattern to edit it.
25 learned weightsneutral
Mistakes per epochgoal: zero
The rule: only a mistake changes the weights. Correct answers leave the machine untouched.
Keep the weighted sums. Replace the hard threshold with smooth activations, add attention, repeat the transformation in layers—and train everything together.
48 transformer blocks · width 1,600
A token never jumps directly from input to answer. Its 1,600-number representation is refined twice on every floor: first by attention, then by an MLP.
A transformer block is one repeated processing module: attention, MLP, normalization and residual connections. In GPT‑2’s published “48 layers,” layer usually means one complete block—not one individual neuron.
An attention head lets the current token score earlier tokens and blend their information. GPT‑2 runs 25 heads in parallel, each in a 64-dimensional slice, then combines their results.
The MLP applies the same two learned transformations to each token separately. Its 6,400 intermediate activations are the part most similar to modern neuron-like units.
Here, “layer” means one transformer block. Attention heads learn jointly; they do not have predefined jobs.
“The perceptron sees no letters—only 25 zeros and ones. Each input has a weight: a learned vote.”
“It multiplies inputs by weights, adds a bias, and crosses a threshold. When it is wrong, the weights move toward the correct answer.”
Watch examples seen, actual weight updates, and completed epochs separately. The first zero-mistake epoch is the stopping condition.
Load T or A, then flip pixels. Ask the room for a prediction before revealing what the weighted score does.
Say “modern networks contain many neuron-like units and often billions of parameters.” Do not equate a modern neuron exactly with this threshold perceptron; multilayer networks add differentiable activations and backpropagation.
Contrast this demo’s 26 adjustable parameters with GPT-2 XL’s 1.542 billion. The 48-floor tower separates attention from its neuron-like MLP units.
A “layer” in the 48-layer count means a complete transformer block. Walk left-to-right through attention, the residual path, and the MLP; then explain that the same structure repeats 48 times.
Edit a teaching pattern. The demo resets because you changed the lesson. Try making T and A identical: no classifier can learn contradictory labels for identical input.