inspectus  by labmlai

Visualization tool for machine learning models in Jupyter notebooks

created 1 year ago
674 stars

Top 51.2% 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

9 months ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Dominik Moritz Dominik Moritz(Professor at CMU; ML Researcher at Apple), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
2 more.

ecco by jalammar

0%
2k
Python library for interactive NLP model visualization in Jupyter notebooks
created 4 years ago
updated 11 months ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), and
3 more.

lida by microsoft

0.2%
3k
Library for LLM-driven data visualization and infographic generation
created 2 years ago
updated 11 months ago
Feedback? Help us improve.