#4949th of 55 in Learning and cookbooks

transformer-explainer

Interactive browser visualization of how GPT-2 predicts the next token

Stars
9k
License
MIT
Last commit
Jun 2026
Last release
Jun 2024
Language
JavaScript
Stars, last 29 weeks+2,080
1 Apr 2026: 6,950 stars8 Apr 2026: 7,000 stars15 Apr 2026: 7,060 stars22 Apr 2026: 7,122 stars29 Apr 2026: 7,174 stars6 May 2026: 7,213 stars13 May 2026: 7,314 stars20 May 2026: 7,504 stars27 May 2026: 7,577 stars3 Jun 2026: 7,685 stars10 Jun 2026: 7,754 stars17 Jun 2026: 7,805 stars24 Jun 2026: 7,840 stars1 Jul 2026: 8,054 stars8 Jul 2026: 8,105 stars15 Jul 2026: 8,156 stars22 Jul 2026: 8,215 stars29 Jul 2026: 8,285 stars5 Aug 2026: 8,321 stars12 Aug 2026: 8,348 stars19 Aug 2026: 8,399 stars26 Aug 2026: 8,438 stars2 Sept 2026: 8,474 stars9 Sept 2026: 8,536 stars16 Sept 2026: 8,569 stars23 Sept 2026: 8,715 stars30 Sept 2026: 8,784 stars7 Oct 2026: 8,826 stars14 Oct 2026: 8,973 stars21 Oct 2026: 9,030 stars

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
Also in Learning and cookbooks
RankProjectScore
1ai-engineering-from-scratchHands-on AI engineering curriculum with 542 lessons across 20 phases72.1k starsMIT90 out of 100
2generative-ai-for-beginners21-lesson course on building generative AI apps in Python and TypeScript121.8k starsMIT81 out of 100
3ai-agents-for-beginners18-lesson course on building AI agents with Microsoft Agent Framework77.6k starsMIT79 out of 100
#4cs249r_bookOpen textbook and course materials for machine learning systems engineering29.1k starscustom license79 out of 100
#5llms-from-scratchCode for the book on building a GPT-style LLM in PyTorch107k starscustom license77 out of 100