Skip to content
LLM Visualization explained: the 3D model of how AI writes
Tools explained

LLM Visualization explained: the 3D model of how AI writes

LLM Visualization is a free 3D walkthrough of a tiny GPT-style model, and this guide explains each stage it shows and how to use it without code.

9 min read

0

LLM Visualization is a free, interactive 3D model of a working GPT-style AI network, built by Brendan Bycroft and hosted at bbycroft.net/llm. You open it in a web browser and step through the math a large language model (LLM) runs each time it predicts the next token, one of the small chunks of text an AI model reads and writes.

The network you watch is tiny. It is called nano-gpt, it has about 85,000 parameters, and its only job is to sort six letters into alphabetical order, which keeps every step small enough to follow by eye. The page opens straight into the walkthrough with no sign-up, and you need no coding to use it.

Last checked November 23, 2026: the walkthrough's chapters, on-screen labels and model sizes on bbycroft.net/llm, and the project's README and license on GitHub.

What is LLM Visualization?

LLM Visualization is a walkthrough website that shows, in 3D, how a GPT-style language model turns a short input into a prediction of what comes next. The project's README on GitHub describes it as "a 3D model of a working implementation of a GPT-style network", built on "the network topology that's used in OpenAI's GPT-2, GPT-3, (and maybe GPT-4)." Topology here means the layout: which parts the model has and how numbers flow between them.

The screen has two halves. On the left, a panel of short written chapters explains each stage. On the right, the 3D model animates the stage you are reading about. The site's key for the colors: "each green cell represents a number being processed, and each blue cell is a weight."

The walkthrough covers inference, the step where an already-trained model produces an answer. It does not cover training. The model's weights were trained in advance, and, in the site's words, the calculation "runs directly in your browser."

The guide says it was inspired by minGPT, a minimal GPT model written by Andrej Karpathy, and the demo model comes from that project. The code is open source under the MIT license, except Bycroft's personal homepage files and some third-party assets such as fonts.

What the 3D model actually shows you, step by step

The 3D model shows one prediction from start to finish: six letters go in at the top, pass down through a stack of layers, and come out at the bottom as odds for which letter comes next.

The example the site uses is the sequence C B A B B C, which the model has to sort into ABBBCC. Each letter is a token, and each token gets a number from the model's vocabulary (A is 0, B is 1, C is 2), so the input the model sees is 2 1 0 1 1 2.

At the sixth position, the model outputs a probability for each of A, B and C. In the site's example it is "pretty sure" the next letter is A. That letter is added to the end of the sequence and the whole model runs again for the next one. The site calls the GPT family a "context-based token predictor", and it names GPT-3.5 Turbo, a member of that family, as the foundation of ChatGPT.

The table of contents splits the model into eight components. The table below sums up each chapter in one line, from the site's own explanations.

Chapter (as named on the site)What happens there
EmbeddingEach token's number becomes a column of 48 decimal numbers, made by adding a "token embedding" (which letter it is) to a "position embedding" (where it sits in the sequence).
Layer NormEach column is rescaled so its average is 0 and its spread (standard deviation) is 1, which helps keep the model stable during training.
Self AttentionEach position compares itself with the positions before it and pulls in information from the ones that look relevant. It can only look backward.
ProjectionThe results from the attention "heads" are stacked back together, multiplied by one more set of weights, and added on top of the input (the "residual connection").
MLPA small two-layer neural network processes each column on its own: it widens the column to four times its length, applies a function called GELU, and shrinks it back.
TransformerSelf-attention plus the MLP make one transformer block. GPT models stack these blocks, each one feeding the next.
SoftmaxA list of scores is turned into probabilities between 0 and 1 that add up to 1.
OutputA final layer turns each column into a score for every token in the vocabulary (called logits), and softmax turns those scores into the odds for the next token.
LLM Visualization, Chapter: Self Attention. Text panel: "The self-attention layer is perhaps the heart of the Transformer and of GPT." 3D view labels: Q Bias, Q Weights, Q vectors, K Bias, K Weights, K vectors, V Bias, V Weights, V vectors, Layer Norm, Attention Matrix, Attn Matrix Softmax, V Output. Buttons: GPT-2 (small), nano-gpt, GPT-2 (XL), GPT-3, Continue, Skip.
The Self Attention chapter: the written explanation on the left, and the query (Q), key (K) and value (V) weights and vectors in the 3D view on the right. Screenshot of LLM Visualization (bbycroft.net/llm), November 23, 2026.

The site calls self-attention "perhaps the heart of the Transformer and of GPT", and it is the only stage where the positions in the sequence exchange information. Every position makes three lists of numbers: a query, a key and a value. Its query is compared with the keys of the earlier positions, the closest matches get the most weight, and the position takes in a weighted mix of their values.

Because each position only checks positions before it, the site describes this as "causal" self-attention: tokens "can't 'see into the future'."

The guide is careful about what the stacked layers do. It says "it's hard to say exactly what each of these layers is doing", and gives the general idea that earlier layers pick up lower-level patterns while later layers capture higher-level relationships and meaning.

The Output chapter also explains temperature. The model picks its next token by "sampling from the distribution": a token with a probability of 0.9 is chosen 90% of the time. A higher temperature makes the choices more even, and a lower temperature concentrates them on the most likely tokens.

How to use LLM Visualization without any coding

Open bbycroft.net/llm in a web browser, read the panel on the left, and press Space or click Continue to move through each step while the 3D view on the right animates it. The first screen is "Chapter: Overview".

  1. Read the first chapter, Introduction, which sets up the letter-sorting example.
  2. Press Space, or click the Continue button, to reveal the next step.
  3. Jump to any stage from the Table of Contents, or use the arrows beside the chapter title.
  4. In the Embedding chapter, hover over cells in the input embedding matrix to see each calculation and where its numbers came from.
  5. Use the buttons above the 3D view to switch between nano-gpt, GPT-2 (small), GPT-2 (XL) and GPT-3.

The chapters run in the order the data moves through the model: Introduction and Preliminaries, then Embedding, Layer Norm, Self Attention, Projection, MLP, Transformer, Softmax and Output. Reading them in that order follows one prediction from the letters going in to the odds coming out.

Developers can also run the project on their own machine. The README gives two commands: yarn to install its dependencies and yarn dev to start it.

Is it the real ChatGPT inside?

No, the model doing the work is nano-gpt, a demo network with about 85,000 parameters whose only job is to sort the letters A, B and C. It shares its basic design with OpenAI's GPT models, but it is a different, far smaller model, and the site says it has "effectively learned all the answers" to that one sorting problem.

Parameters are the numbers a model learns during training. On screen they are the blue cells. The size buttons above the 3D view show how far apart the demo and a real GPT model are: the nano-gpt label reads n_params = 85,584, and the GPT-2 (small) label reads n_params = 124,439,808, more than 1,400 times as many.

LLM Visualization with the GPT-2 (small) button selected. Labels in the 3D view: "GPT-2 (small) n_params = 124,439,808" and "nano-gpt n_params = 85,584". The left panel shows Chapter: Output and the Table of Contents.
Switching the 3D view to GPT-2 (small) puts its 124,439,808 parameters next to nano-gpt's 85,584. Screenshot of LLM Visualization (bbycroft.net/llm), November 23, 2026.

Only nano-gpt runs with working weights. The README says the renderer "works with the smaller gpt2 size, although the weights aren't downloaded (it's 100's of MBs)", and that the first network shown with working weights is the tiny letter sorter. The numbers you step through in the chapters all come from nano-gpt.

GitHub README for bbycroft/llm-viz. "Projects. The main projects are: LLM Visualization: 3D interactive model of a GPT-style LLM network running inference. [WIP] CPU Simulation: A 2D digital schematic editor with full a execution model, showcasing a simple RISC-V based CPU. LLM Visualization. This project displays a 3D model of a working implementation of a GPT-style network. That is, the network topology that's used in OpenAI's GPT-2, GPT-3, (and maybe GPT-4). The first network displayed with working weights is a tiny such network, which sorts a small list of the letters A, B, and C. This is the demo example model from Andrej Karpathy's minGPT implementation. The renderer also supports visualizing arbitrary sized networks, and works with the smaller gpt2 size, although the"
The project README on GitHub describes the topology, the minGPT demo model and the GPT-2 size limit. Screenshot of the bbycroft/llm-viz repository, November 23, 2026.

On GPT-4, both the README and the site hedge. The README says "maybe GPT-4", and the site says the GPT family "might also be related to GPT-4, but specific details remain unknown." Nothing on the site shows the models ChatGPT runs on today.

Other ways to 'see' an LLM: research tools and AI that draws charts

The same search also turns up a different meaning: research on software that uses LLMs to make, explain and improve charts and other data visualizations. Emergent Mind's research summary on LLM-augmented visualization software describes several patterns in the papers it covers. Two are easy to picture.

In the first, the model writes the chart code (for example Python with Matplotlib, JavaScript with D3, or Vega-Lite) from a plain-language description of the data. In the second, people talk to a chart through a chat interface to move around it, update it and ask questions about it. The summary lists scientific visualization, education, medical imaging, architectural design and creative software among the fields using these systems.

Questions people ask

Is LLM Visualization free?

Yes. The site opens in a browser with no sign-in or payment, and the code is published on GitHub under the MIT license.

Who made LLM Visualization?

Brendan Bycroft made it. The project lives in the GitHub repository for his homepage and projects, next to a second project, a CPU simulator that is still a work in progress.

Does it show how ChatGPT is trained?

No, the guide says it "focuses on inference, not training": the model's weights were trained beforehand, and the walkthrough shows how a trained model turns an input into a prediction.

How does an LLM pick its next word?

It picks one token at a time. The Output chapter shows the model using the probabilities from the last position to choose the next token, which is added to the sequence before the whole model runs again.

What is a transformer in the visualization?

A transformer block is one self-attention stage followed by one MLP stage. The site says these blocks "form the bulk of any GPT model" and are repeated, with the output of one block feeding into the next.

What does temperature do?

Temperature changes how spread out the model's choices are. The Output chapter explains that the scores are divided by the temperature before softmax, so a higher temperature makes the odds more even and a lower one concentrates them on the likeliest tokens.

Can I see GPT-3 in LLM Visualization?

Yes, as a layout: the GPT-3 button above the 3D view switches to it. The working numbers in the walkthrough come from nano-gpt.

Where to go next if you want to understand AI models

If you came here to find out which AI model to use, start with Pat's tests. His ranking of the best AI model by job comes from 21 same-prompt builds, and the head-to-head tests of the big AI models show each model getting the same prompts, with what every build cost.

If you want better answers from the models you already use, read how to write a good AI prompt next. It has a fill-in template and the results of a 27-run prompt test.

Sources

What did you think of this post?

Comments

Sign in to join the conversation.

You might also like.

Articles, builds, skills and tools on the same idea.
More The Human Angle

AI FOR MORTALS.

Your daily AI edge that will make everyone wonder how you do it all.

Every weekday, the practical AI updates that matter, and exactly what to do with them.

The latest in AI, in plain English. Free, every weekday.