Skip to content
Mohammad Oumari
← All projects
buildingbuildingai2025source · private

ai-inspector

Look inside a transformer, one token at a time.

Role · Solo

PythonGPT-2Transformers

Model

GPT-2, full depth

Runs

Locally

A local tool for learning how language models actually work by inspecting a real model's internals interactively. v1 inspects GPT-2 at full depth.

Interactive beats explained

There is a large amount of writing about attention heads and residual streams, and reading it produces a feeling of understanding that evaporates on contact with a real forward pass. Watching one specific token move through one specific model, and being able to poke it, produces a different and more durable kind of knowledge.

So the tool is built around a single token's journey rather than around aggregate statistics.

Capability-driven architecture

The internals are adapter-based rather than hard-coded to GPT-2. Each model exposes what it can show, and the UI renders against capabilities rather than against a specific architecture — so Llama, Mistral, or Qwen can be added later without touching the interface. Getting that boundary right on the first model was most of the design work.