Visualization tool for machine learning models in Jupyter notebooks
Top 51.2% on sourcepulse
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
pip install inspectus
Highlighted Details
Maintenance & Community
Licensing & Compatibility
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.
9 months ago
1 week