We’ve open-sourced our LLM attention visualization library

Inspectus is a powerful visualization tool for large language models, accessible through a simple Python API in Jupyter notebooks. Offering various views, such as the Attention Matrix, Query Token Heatmap, Key Token Heatmap, and Dimension Heatmap, it allows users to understand how tokens interact during processing. The tool can be easily implemented by importing the library and using it with Huggingface transformers. The content includes tutorials on utilizing the tool with Huggingface models and creating custom attention maps. Overall, Inspectus provides a user-friendly way to gain insights into language model behaviors. (Word count: 100)

https://github.com/labmlai/inspectus

To top