inspectus  by labmlai

Visualization tool for machine learning models in Jupyter notebooks

Created 1 year ago
678 stars

Top 49.9% on SourcePulse

GitHubView on GitHub
Project Summary

Inspectus is a Python library designed for visualizing and analyzing the internal workings of large language models (LLMs), particularly their attention mechanisms. It targets ML researchers and engineers seeking to understand model behavior, offering interactive visualizations directly within Jupyter notebooks.

How It Works

Inspectus provides several specialized visualization components. The core attention function visualizes attention scores as heatmaps, allowing users to see token-to-token relationships. It supports raw tensors and Hugging Face model outputs, with options to specify query and key tokens. The tokens function visualizes token-level metrics (like loss or entropy) and additional metadata, enabling detailed per-token analysis. The distribution plot visualizes data distributions using percentile bands, useful for identifying outliers.

Quick Start & Requirements

Highlighted Details

  • Interactive attention matrix, query/key heatmaps, and dimension heatmaps.
  • Token visualization supports multiple metrics and custom token information.
  • Distribution plots aid in identifying data outliers.
  • Integrates directly with Hugging Face Transformers models.

Maintenance & Community

  • Developed by labmlai.
  • Citable via provided BibTeX entry.

Licensing & Compatibility

  • License: Not explicitly stated in the README. Potential ambiguity for commercial use.

Limitations & Caveats

The README does not specify the license, which may impact commercial adoption. While designed for LLMs, specific compatibility with all model architectures or frameworks beyond Hugging Face is not detailed.

Health Check
Last Commit

11 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
5 more.

lit by PAIR-code

0.1%
4k
Interactive ML model analysis tool for understanding model behavior
Created 5 years ago
Updated 3 weeks ago
Starred by Clement Delangue Clement Delangue(Cofounder of Hugging Face), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
9 more.

bertviz by jessevig

0.1%
8k
Interactive tool for visualizing attention in Transformer language models
Created 6 years ago
Updated 3 months ago
Feedback? Help us improve.