#4949th of 55 in Learning and cookbooks
transformer-explainer
Interactive browser visualization of how GPT-2 predicts the next token
Live demo ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 9k
- License
- MIT
- Last commit
- Jun 2026
- Last release
- Jun 2024
- Language
- JavaScript
6,950 on 1 Apr 20269,030 on 21 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Transformer Explainer runs a live GPT-2 model in the browser and shows the internal operations of the Transformer as you type your own text. It visualizes how the components work together to predict next tokens. It can be tried on a hosted page or run locally with Node.js 20+ and npm.
Who it is for: Students and engineers learning how GPT-style Transformers work
Strengths
- Runs GPT-2 in the browser, so no server or API key is needed
- Accepts your own input text and updates the visualization live
- Short local setup: npm install, npm run dev on port 5173
- Backed by a CHI 2026 paper and a YouTube walkthrough video
Weaknesses
- Only GPT-2 is mentioned; no other models are listed
- Educational visualizer, not a tool for running or serving models
- No Docker image or compose file provided
- Last tagged release is from June 2024
What it needs
- no GPU
- Needs Node.js 20+, npm 10+
- Models: GPT-2
- port 5173
Also in Learning and cookbooks
See all 55| Rank | Project | Score |
|---|---|---|
| 1 | ai-engineering-from-scratchHands-on AI engineering curriculum with 542 lessons across 20 phases | 90 out of 100 |
| 2 | generative-ai-for-beginners21-lesson course on building generative AI apps in Python and TypeScript | 81 out of 100 |
| 3 | ai-agents-for-beginners18-lesson course on building AI agents with Microsoft Agent Framework | 79 out of 100 |
| #4 | cs249r_bookOpen textbook and course materials for machine learning systems engineering | 79 out of 100 |
| #5 | llms-from-scratchCode for the book on building a GPT-style LLM in PyTorch | 77 out of 100 |