Prediction Ridge (ι’ζ΅ε±±θ) is an interactive 3D animation that treats a melody as a sequence which is constantly predicting its next step β and uses that picture to explain what a large language model does.
There is no long essay behind the animation. The page gives you a small stage: the current note, the next candidate note (for example 1 / Do), a timeline running from 00 to 32, and a prediction-certainty percentage. Press play and the melody advances note by note; the percentage shows how confident the model is about what comes next at each step.
The animation uses a simplified probability model to simulate sequence prediction. It is not a direct visualisation of the neuron activations inside a real LLM β the source page says so explicitly.
It is a small piece of interaction rather than a lecture: Play advances the melody, Reset returns to the first note; you drag to rotate the 3D view, scroll to zoom, and double-click to restore the default camera. Watching the certainty figure move as the tune progresses is the whole lesson.
Music and language share a structure that matters here: both are sequences where each step is only meaningful in the context of what came before. After a certain run of notes, some continuations feel natural and others feel wrong. A melody that jumps at random stops sounding like a melody.
| In the song | In a language model |
|---|---|
| A note | A token (a word, part of a word, or a punctuation mark) |
| The notes played so far | The context β everything the model can see |
| The next note to play | The next token to generate |
| Musical tension, resolution, key | Grammar, style, factual consistency, topic |
| Prediction certainty | The probability the model assigns to each candidate token |
| The ridge in the 3D landscape | The narrow band of high-probability continuations |
The metaphor is useful because it removes the mystique. A model is not retrieving a finished paragraph from a drawer; it is choosing one small step at a time, with the choice shaped by everything already played.
In the melody version, steps 1β4 are the animation: at each of the 32 positions the page holds a distribution over the next note, displays the leading candidate together with a certainty figure, then commits to a note and moves the cursor forward.
The page is called Prediction Ridge for a reason. Imagine the space of all possible next moves as a landscape. Most continuations are flat, unlikely ground. The plausible ones form a narrow ridge running through it. Generation is a walk along that ridge β at every step the model picks a point on the ridge, then re-draws the landscape from the new position.
It explains why LLMs are fluent, why they are sensitive to the exact wording of a prompt, why they can continue almost any pattern (prose, code, a melody), and why they sometimes drift: a small early choice changes the landscape for every later choice.
It does not explain where the probabilities come from. The ridge is the product of training on a very large amount of text, where the model repeatedly adjusted its parameters to make the observed next token more likely. The song analogy shows the shape of the process, not its cause β and, as the page warns, the animation is a simplified model, not a look inside a network.
This is an English overview of the Chinese interactive page. The animation itself β the 3D ridge, playback controls and note-by-note certainty readout β is on the Chinese original.
πΉ Open the Chinese animation β β All English articles
FunnyAI Β· LLM series v1 Β· Prediction Ridge