How neural networks actually work
This page is deliberately separate from the live tool above. Every demo below computes real math live in your browser — real weighted sums, real convolutions, real softmax — but the specific numbers (weights) are illustrative, not trained on anything, since we don't have access to Llama's actual trained parameters (no hosted API exposes that). Where a demo genuinely represents what the live tool's model does architecturally, we say so explicitly.
Artificial Neuron (ANN)
Every neural network, no matter how large, is built from this same operation repeated millions of times: multiply each input by a weight, add a bias, and squash the result through an activation function. Adjust the sliders and watch the real output change.
z = w1·x1 + w2·x2 + b
z = (0.60 × 0.80) + (-0.40 × 0.30) + 0.10
z = 0.460
output = sigmoid(z) = 1 / (1 + e⁻ᶻ)
output = 0.613
Convolutional Neural Network (CNN)
CNNs are built for grid-shaped data like images. Instead of connecting every pixel to every neuron, a small kernel (here, 3×3) slides across the image, computing a weighted sum at each position. Different kernels detect different features — edges, blurs, sharpened detail. Try the presets, or edit the numbers directly.
Recurrent Neural Network (RNN)
RNNs process a sequence one step at a time, carrying a “hidden state” forward as memory of everything seen so far. Step through the sequence below and watch how each new hidden state depends on both the current input and the previous state — that dependency on history is the whole idea.
Transformer & Self-Attention
Neither CNN nor RNN is what powers the live visualizer above — Llama 3.3 (the model behind it) is a Transformer, and its core mechanism is self-attention: every token looks at every other token and decides how much to “pay attention” to it. Type a sentence below — it's run through the same real tokenizer the live tool uses, then real attention scores (dot products, scaling, softmax) are computed on the spot.
| the | cat | sat | on | the | mat | |
|---|---|---|---|---|---|---|
| the | 0.67 | |||||
| cat | 0.16 | 0.31 | ||||
| sat | 0.18 | 0.19 | 0.36 | 0.17 | ||
| on | 0.18 | 0.52 | ||||
| the | 0.21 | 0.48 | ||||
| mat | 0.27 | 0.37 |
Rows = the token “asking”, columns = the tokens it attends to. Each row sums to 1 (it's a real softmax) — brighter cells mean that token contributed more to the row token's updated representation.
This is the closest we can get to genuine transformer internals without self-hosting a model with direct weight access (Groq's API, like every hosted inference API, never exposes real attention weights) — that's a planned, separate, heavier build, not something any hosted API can provide.