entoscope

entoscope is a modular framework for mechanistic interpretability: it runs operations that analyze the internals of large language models, built on TransformerLens. It supports four operations for now, each computed by one or more methods:

Operation

Methods

Description

Lens

logit_lens, tuned_lens, parameter_lens

Projects activations and weights onto the vocabulary to show which tokens they promote.

Activation patching

exact, attribution, integrated_gradients

Patches activations from one run into another and measures how the output changes.

Probing

linear

Trains classifiers on activations to find where the model represents a property of its input.

Circuit discovery

information_flow_routes

Traces the routes through attention heads and MLPs that carry the model’s prediction.

The operations share most of what you need to learn about them:

  • Every operation has the same four parts: a config says what to run, an input pairs it with the prompts, an operator runs it, and a collector writes the results.

  • Where an operation works in the model is specified flexibly: any activation, swept over layers, heads, neurons and positions, narrowed by filters, grouped to read several together, or listed point by point.

  • A config can be built in Python or read from a YAML file, and every run saves the config it ran under next to its results.

  • plan describes a run (what it reads, how many forward passes, which files) without running the model.

  • Results are CSV files (graph files for circuits), and every operation but probing draws them on an interactive HTML page you open in a browser.

  • Every method is a registered class, and your own methods register and run the same way.

Where to go