back to home

poloclub / transformer-explainer

Transformer Explained Visually: Learn How LLM Transformer Models Work with Interactive Visualization

6,873 stars
739 forks
10 issues
JavaScriptSvelteTypeScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing poloclub/transformer-explainer in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/poloclub/transformer-explainer)
Preview:Analyzed by RepoMind

Repository Summary (README)

Preview

Transformer Explainer: Interactive Learning of Text-Generative Models

Transformer Explainer is an interactive visualization tool designed to help anyone learn how Transformer-based models like GPT work. It runs a live GPT-2 model right in your browser, allowing you to experiment with your own text and observe in real time how internal components and operations of the Transformer work together to predict the next tokens. Try Transformer Explainer at http://poloclub.github.io/transformer-explainer and watch a demo video on YouTube https://youtu.be/TFUc41G2ikY.

MIT license arxiv badge

Live Demo

Try Transformer Explainer: http://poloclub.github.io/transformer-explainer

Research Paper

Transformer Explainer: Interactive Learning of Text-Generative Models. Aeree Cho, Grace C. Kim, Alexander Karpekov, Alec Helbling, Zijie J. Wang, Seongmin Lee, Benjamin Hoover, Duen Horng Chau. Poster, IEEE VIS 2024.

How to run locally

Prerequisites

  • Node.js v20 or higher
  • NPM v10 or higher

Steps

git clone https://github.com/poloclub/transformer-explainer.git
cd transformer-explainer
npm install
npm run dev

Then, on your web browser, access http://localhost:5173.

Credits

Transformer Explainer was created by Aeree Cho, Grace C. Kim, Alexander Karpekov, Alec Helbling, Jay Wang, Seongmin Lee, Benjamin Hoover, and Polo Chau at the Georgia Institute of Technology.

Citation

@article{cho2024transformer,
  title = {Transformer Explainer: Interactive Learning of Text-Generative Models},
  shorttitle = {Transformer Explainer},
  author = {Cho, Aeree and Kim, Grace C. and Karpekov, Alexander and Helbling, Alec and Wang, Zijie J. and Lee, Seongmin and Hoover, Benjamin and Chau, Duen Horng},
  journal={IEEE VIS Poster},
  year={2024}
}

License

The software is available under the MIT License.

Contact

If you have any questions, feel free to open an issue or contact Aeree Cho or any of the contributors listed above.

More AI explainers to check out