#221 · Primary category: Education & Research
bertviz
BertViz: Visualize Attention in Transformer Models
Project last updated:01/08/26
GitHub Stars
8.2K
Forks
885
Contributors
6
License
Apache-2.0
Why we included this project
BertViz is the tool to reach for when you want to actually see what a transformer's attention heads are doing rather than trusting the numbers. It plugs into a Jupyter or Colab notebook with a short Python API and supports most Hugging Face models, so you can point it at BERT, GPT-2, or RoBERTa and get three lenses on the same mechanism: a head view for individual attention heads, a model view for the full sweep across all layers, and a neuron view that traces how query and key neurons combine into attention scores. That last one is especially handy when you're trying to explain, or debug, why a model fixates on certain tokens. It's a teaching and inspection tool, not something you'd ship in production, but for making the attention mechanism legible it's hard to beat.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
JavaGuide
Java Interview & Backend General Interview Guide, covering computer fundamentals, databases, distributed systems, high concurrency, system design, and AI application development.
system-prompts-and-models-of-ai-tools
A curated collection of system prompts, internal tools, and AI models from popular AI assistants and coding agents.
30-seconds-of-code
Coding articles to level up your development skills
generative-ai-for-beginners
21 Lessons, Get Started Building with Generative AI