# cdpierse/transformers-interpret

Model explainability that works seamlessly with 🤗 transformers. Explain your transformers model in just 2 lines of code.

Repository: https://github.com/cdpierse/transformers-interpret
Canonical: https://ross.abutalabs.com/products/transformers-interpret
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Topics: nlp, machine-learning, natural-language-processing, explainable-ai, transformers, model-explainability, transformers-model, captum, deep-learning, neural-network, interpretability, computer-vision
Last push: 2023-08-30T22:52:59+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2289, "days_push": 1099, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1416, forks 99 (observed 2026-08-28T04:04:39.764122+00:00)

## What it is
A Python library providing model explainability for Hugging Face Transformers models, built on Captum. It explains text classification, question answering, and computer vision models in two lines of code, with visualizations in notebooks or as savable PNG/HTML files.

## Use cases
- explain transformer model predictions with token attributions
- visualize which words drive a sentiment classifier's output
- interpret question answering model answers
- explain image classification models built on transformers
- generate attribution visualizations for NLP models in notebooks
- debug why a fine-tuned model makes certain predictions

## When to choose
- you use Hugging Face transformers and want quick, minimal-code model explanations
- you need token-level or pixel-level attribution visualizations
- you want Captum-based interpretability without writing Captum boilerplate

## When to avoid
- your models are not from the transformers library
- you need explainability for non-neural or non-PyTorch models
- you need actively maintained support for the latest transformers versions

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, nlp, deep-learning, developer-tools
- domain: machine-learning, computer-vision, deep-learning
- platform: python
- tags: explainable-ai, interpretability, captum, huggingface-transformers, model-explainability, attribution, natural-language-processing

## Member repositories
- cdpierse/transformers-interpret (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:39.764122+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:04.999431+00:00, confidence not recorded.
  - readme: https://github.com/cdpierse/transformers-interpret (fetched 2026-08-28T04:04:39.764122+00:00, sha ecfab868ef02)
- Data as of 2026-08-30T08:39:29.467469+00:00.
