jessevig/bertviz
BertViz: Visualize Attention in Transformer Models observed · 2026-08-28
Health v2 · maintenance only
50/100
- Activity 61
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2817
- days_rel: 458
- days_push: 237
- n_releases_24m: 1
Adoption not part of the score
8160 stars · 885 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
BertViz is an interactive Python library for visualizing attention mechanisms in Transformer language models such as BERT, GPT-2, and RoBERTa. It runs inside Jupyter or Colab notebooks via a simple API supporting most Huggingface models, offering head, model, and neuron views.
Use cases
- visualize attention heads in a BERT model
- understand how transformer layers attend to tokens
- debug why a Huggingface model attends to certain words
- create interactive attention visualizations in a Jupyter notebook
- teach students how self-attention works
- explore query and key neuron interactions in attention computation
When to choose
- you need interactive attention visualizations for Huggingface transformer models
- you work in Jupyter or Colab notebooks
- you want multiple views (head, model, neuron) of attention
- you are teaching or researching transformer interpretability
When to avoid
- you need production model serving or inference
- you use models outside the Huggingface ecosystem
- you need visualizations outside notebook environments
- you want general-purpose neural network visualization beyond attention
Facets
library · maturity stable
data-visualization nlp machine-learning machine-learning data-visualization deep-learning python jvm-scripting transformer-attention bert gpt-2 huggingface jupyter-notebook colab interpretability pytorch natural-language-processing
2 sources
- readme: https://github.com/jessevig/bertviz · fetched 2026-08-28 · f34e37673812
- registry_pypi: https://pypi.org/pypi/bertviz/json · fetched 2026-08-29 · ed8f1ac8cf9c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| jessevig/bertviz | main | 50 |
For agents
markdown · JSON · MCP: product_card(name="jessevig/bertviz")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem