LLM visualization based on NRGPT research
Higher β → sharper minima
Inference as gradient descent on the energy function:
Sum of attention and feed-forward components:
Routes information via key-query alignment:
Aligns tokens with memory patterns:
Energy decreases monotonically:
The energy landscape emerges from the model's learned weights:
We simulate the landscape using:
Parameters you control:
The Desmos 3D plot likely uses a similar formula:
A sum of Gaussian bumps at various positions (x_i, y_i) with different amplitudes a_i and widths σ_i, plus periodic wave patterns.
In a trained LLM, the landscape is not random — it encodes all the knowledge learned during training. Each valley represents a stable "concept" or "pattern" the model has learned. Tokens flow toward these attractors during inference.
The ultimate goal is to make LLM inference interpretable. Instead of a black box, we see tokens navigating a landscape shaped by learned knowledge. Each valley is a "concept basin" — words and ideas the model has learned cluster together. Understanding this landscape could help us:
Mouse: Rotate (drag), Zoom (scroll), Pan (right-drag)
Click: Place token on surface
New Landscape: Generate fresh random configuration