File size: 1,401 Bytes
23d9781
 
 
 
 
 
f7b23ea
23d9781
 
 
 
 
 
 
 
 
 
 
204fbd3
 
 
23d9781
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---

title: Tokescope (full)
emoji: 🔬
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 5.50.0
app_file: gradio_app.py
pinned: false
license: mit
short_description: Interactive observability for transformer internals
---


# Tokescope — full build (private)

Interactive observability for transformer internals: pick a focus word and a
control, and watch where the model ranks each — layer by layer — as it writes,
with rank‑band heatmaps, a per‑layer trace, a latency/closest‑cells log, and
threshold **suppress / stop** interventions. Runs ungated
`Qwen/Qwen2.5-0.5B-Instruct` on CPU by default; set the `GRADIOGRAPHER_MODEL`
variable to swap in any compatible decoder (e.g. a `gemma-3` model, with access).

This **private/gated** build carries both projection methods side by side:

- **lm** — the standard logit‑lens (final_norm + lm_head).
- **interp** — an experimental, lm_head‑free projection. Held out of the public

  build (a cheap way to explore the rank neighborhood of arbitrary tokens is a

  mild dual‑use surface); kept here, behind access control, for research.



Where the two disagree is the interesting part.



---



Built by **James J. Davison**, with Claude (Anthropic) as coding collaborator. **Responsibility for the code and its design choices rests with the human author.** MIT licensed. © 2026 James J. Davison.