Vibeleaderboard
Index / tool

LexFrame

pypi.org
Category
Developer Tools
Rank
No. 4093Tools index

Previous survey · No. 3969 ·

Type
TOOL
Use case
Research & Education
GitHub
47 stars
Date

About

LexFrame is a Python toolkit for interpreting language model hidden states. It passes a hidden state through the model's own remaining layers, lets it attend to its prefix, and reads the result in the model's vocabulary. This lets users read, attribute and steer predictions at every layer, including middle layers where fixed-frame lenses such as the logit lens often miss what the model already knows.

At a glance

LexFrame inspects what a language model’s intermediate states predict in its own vocabulary. It is worth trying if you have access to model weights and want to intervene on a prediction at a particular layer.

Good fit

Interpretability researchers working with a compatible Hugging Face model and tokenizer.

Consider something else when

Skip it if you only have access to a hosted text API or need an explanation for a model whose intermediate states you cannot inspect.

Start here

Run the published Eiffel Tower example. Track the next-token probabilities across layers, intervene on the Paris and London tokens, and compare the actual final prediction with the one you expected.

Cost and requirements

The Python package requires a loaded model, tokenizer and unlabeled calibration text. You supply the compute and memory for the model and intermediate activations.

Limits to know

The layer readout estimates what the selected state carries under a calibration procedure. A successful intervention on one example does not establish a general explanation for the model.

Sources checked 2026-11-05. Source-based assessment.

Suggest an improvement

Similar tools

Browse all tools →

Tags

interpretabilityllmpythontransformersresidual-streamresearch

Tech Stack

Python

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.