#182 · Primary category: MLOps & Evaluation

transformers-interpret

captum computer-vision deep-learning explainable-ai interpretability machine-learning model-explainability natural-language-processing neural-network nlp transformers transformers-model

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

Project last updated:08/30/23

GitHub Stars

1.4K

Forks

99

Contributors

8

License

Apache-2.0

Why we included this project

When a transformer classifier surprises you, the useful question is which words pushed it there. transformers-interpret wraps Captum's attribution algorithms in a thin layer that understands the transformers ecosystem, so you can get token-level feature-importance scores for sequence classification and cross-encoder models without rebuilding your pipeline. It also includes computer vision explainers and can save results as notebook visualizations or standalone HTML files, which helps when you need to write up an audit or show a non-technical reviewer where a prediction came from. Whether you are debugging odd classifier output or checking what a fine-tuned model latched onto, you get quick, concrete answers. Because it leans on established attribution math rather than a hand-rolled heuristic, the explanations have a solid basis.

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