AI Engineering · interactive
What a model is
A model is a function with knobs: an input goes in, a prediction comes out, and the knobs, the parameters, decide which. Training is letting the data set the knobs. Fit a delivery-time model by hand, then let the data do it, and see what each shape says about an order it has never seen.
A line · time = a + b × km
off by 6.3 min
Dots: past orders, in minutes. Line: what the model predicts at every distance. Hollow: the new orders at 7.5 and 20 km.
Off by 6.3 minutes per order. Drag the parameters in step 3, or press Fit in step 4.
Model shape
Collect examples
Inputs with the answers you want. Here: how far an order went, and how long it took.
1 km → 14 min · 2 km → 19 min · 3 km → 21 min · 4 km → 27 min · 5 km → 29 min · 6 km → 35 min · 7 km → 38 min · 8 km → 41 min · 9 km → 47 min · 10 km → 49 min · 11 km → 55 min · 12 km → 57 min
Choose a shape
The shape fixes the kind of answer the model can give and how many parameters it has. The data can only tune the parameters, not change the shape.
time = a + b × km
2 parameters: a and b.
Set the parameters
Every setting is a different model. Drag them and watch the predictions and the error move.
average error: 6.33 min
Let the data set them
Training searches for the parameters with the smallest error on the examples. For a line that's one formula; for a neural network it's gradient descent, one small nudge at a time.
best: a = 10.27, b = 3.96 · error 0.83 min
Predict for an input it never saw
The point of a model is the next order, not the old ones. A shape with the right idea in it (time grows with distance) can answer beyond its examples; a table can only repeat them.
- 7.5 km → 35 min
- 20 km → 60 min
How many parameters
- This line2
- This curve3
- The XOR network (neural-networks session)9
- GPT-2 small124 million
- Llama 3.3 70B70.6 billion
An LLM is the same idea: a fixed shape (the transformer) with billions of knobs, set by the data.
In production
Tools and technologies
Every library fits parameters to data; the shapes range from a line to a transformer.
Not tied to one language — use these names when you search docs or design a system.
- scikit-learnSoftware
Linear models, trees and more, each with a fit() that sets the parameters.
GitHub ↗ - PyTorchSoftware
Build any shape from layers; autograd fits the parameters.
GitHub ↗ - TensorFlow PlaygroundSoftware
Watch a small network's parameters move as it trains, in the browser.
Official site ↗ - Hugging Face HubService
Where trained parameters, the weights, are published and downloaded.
Official site ↗