Watch GPT-2 Think in Real Time, No GPU Required
It exists to replace static Transformer diagrams with a live, poking-sticks-at-GPT-2 laboratory inside your browser.

What it does Transformer Explainer is an interactive visualization that runs a live GPT-2 model entirely in your browser. You supply text, and it renders the internal mechanics—attention patterns, token predictions, and layer operations—as the model actually executes them. It is essentially a pedagogical debugger that turns the Transformer black box into something you can watch and manipulate.
The interesting bit Unlike a pre-baked animation, this tool performs live inference client-side and surfaces the model’s internal state in real time. That means arbitrary input produces arbitrary internal traces, letting you observe exactly how the next token emerges from specific attention heads and matrix operations without calling a remote API.
Key highlights
- Runs a live GPT-2 model fully client-side in the browser
- Visualizes internal Transformer mechanics in real time as you type custom text
- Born from an IEEE VIS 2024 research poster by Georgia Tech’s Polo Club
- Sibling to the team’s earlier browser-based explainers for CNNs, GANs, and diffusion models
- Requires no backend, API key, or external GPU
Caveats
- Scope is limited to GPT-2; the README does not mention larger or newer architectures
- The README does not specify whether the visualization exposes every layer and weight or a curated pedagogical subset
- Built as a research demo, so it is optimized for learning rather than production model debugging
Verdict Reach for this if you are teaching or learning how Transformers work and need to see the gears turn on real data. Look elsewhere if you need to profile or interpret modern large-scale LLMs.
Frequently asked
- What is poloclub/transformer-explainer?
- It exists to replace static Transformer diagrams with a live, poking-sticks-at-GPT-2 laboratory inside your browser.
- Is transformer-explainer open source?
- Yes — poloclub/transformer-explainer is open source, released under the MIT license.
- What language is transformer-explainer written in?
- poloclub/transformer-explainer is primarily written in JavaScript.
- How popular is transformer-explainer?
- poloclub/transformer-explainer has 8.3k stars on GitHub and is currently accelerating.
- Where can I find transformer-explainer?
- poloclub/transformer-explainer is on GitHub at https://github.com/poloclub/transformer-explainer.