1 · Capture
MRI any model with weight access (MLX, HuggingFace, or causal-bank backends). Full-vocabulary residual state, every layer, every measurement in its own lane. No hardcoded prompts, all data from HF benchmarks.
The pipeline
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.
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.
| Producer | Consumer | |
|---|---|---|
| Runs | where the models are (GPU + weights) | anywhere, including a browser at the edge |
| Does | mri · decompose · eval · audit · the MCP suite | the viewer + the model-free profile-* analyses |
| You install | pip install heinrich | nothing, 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
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_geometrycaptures 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.
.mri artifact · Architecture.tex)