Skip to content

HeinrichA model-forensics instrument

It measures what a language model computes, the internal residual geometry, not what it says. This is the documentation for the instrument. For the art, enter the Observatory.

What it is ​

Heinrich captures a model's internal geometry, residual-stream projections, attention patterns, activation traces, alongside language-level signals, and presents them as an isolated signal stack: each measurement in its own lane, no ground-truth calibration to round off the disagreements, interpretation left to the reader.

It runs on any model with weight access. It produces .mri artifacts. The Observatory is one consumer of those artifacts, a browser you can fly a real model's residual stream through. This documentation is the other half: how the instrument works, how to point it at your own model, and what it found.

The two halves ​

ProducerConsumer
Runswhere the models are (GPU + weights)anywhere, including a browser at the edge
Doesmri · decompose · eval · audit · the MCP suitethe viewer + the model-free profile-* analyses
You installpip install heinrichnothing, open hcirnieh.com

The .mri artifact is the API between them. You don't port the producer to the edge. You give it a publish target. → Architecture

Three principles ​

Measurement and calibration interfere. There is no FPR/FNR calibration. Each scorer produces raw labels; the report presents distributions and disagreements. The disagreement is the signal.

One forward pass, not two. generate_with_geometry captures text and first-token geometry from the same computation.

The DB is the single source of truth. All prompts from HF benchmarks via require_prompts(), no hardcoded fallbacks. All directions, sharts, generations, and scores in SQLite with schema migrations.

Start here ​