explaingit

ninjahawk/subtext

Analysis updated 2026-05-18

214HTMLAudience · researcherComplexity · 4/5LicenseSetup · hard

TLDR

A live visual tool that shows the words a language model is internally leaning toward, moment by moment, before it actually speaks them.

Mindmap

mindmap
  root((Subtext))
    What it does
      Live internal readout
      Jacobian lens
      Word by word view
    Tech stack
      Python
      PyTorch
      HTML
    Use cases
      Watch model reasoning
      Study internal planning
      Replay sessions
    Audience
      Researchers
    License
      Apache 2.0

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Watch a language model's internal reasoning unfold in real time during a live conversation.

USE CASE 2

Study how a model settles on a judgment or plan internally before it appears in its written reply.

USE CASE 3

Record a conversation session and replay it later in a browser for closer analysis.

USE CASE 4

Reproduce interpretability research findings on an open, consumer-hardware sized model.

What is it built with?

PythonPyTorchHTMLWebSocket

How does it compare?

ninjahawk/subtextkeyai/calculusmadeeasy-zhjimliu/science-skills
Stars214215216
LanguageHTMLHTMLHTML
Setup difficultyhardeasymoderate
Complexity4/51/53/5
Audienceresearcherwriterresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a GPU to run the local model live, though recorded sessions can be replayed without one.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Subtext is a visualization tool that lets you watch what is happening inside a language model while it reads a message and writes its reply, in real time. It is based on recent research from Anthropic that found a small part of a model's internal activity behaves like a shared workspace: its contents can be put into words, nudged on purpose, and are used by the model while it works through multi step reasoning, even though most of the model's activity stays hidden from any output. The tool this repo builds continuously reads that internal workspace using a method called the Jacobian lens, which takes an internal signal from any layer of the model and asks which words that signal is currently leaning toward producing. What makes Subtext different from earlier demos of this idea is that it runs live during an ongoing conversation, including while the model is still reading your message, not only while it answers. As the model works, the tool shows words appearing on screen that represent what the model's internal state is leaning toward at that instant, before those words are ever spoken out loud. For example, in the included demo the model quietly settles on the word incorrect internally several tokens before its reply actually contains the words not correct. The display uses vertical position to represent how deep inside the model a signal is coming from, and uses size and brightness to represent how strong that internal leaning is. You can hover over a word to see how it changed over the layers, click it to inspect its full history, pause and scrub back through a past reply token by token, and browse a ranked list of every word the model leaned toward during a response. Under the hood, Subtext runs a small open language model called Qwen3.5-4B locally using PyTorch, streams its readings to a single browser page over a live connection, and includes a script that checks its own readings against a reference implementation for accuracy. Sessions can be recorded and replayed later in any browser without needing a graphics card. The project is released under the Apache 2.0 license, which allows free use, modification, and commercial use as long as you keep the copyright notice.

Copy-paste prompts

Prompt 1
Explain what the Jacobian lens shown in this repo is measuring, in plain language.
Prompt 2
Walk me through setting up Subtext to watch a live conversation with the included model.
Prompt 3
Explain the difference between the reading phase and the thinking phase this tool visualizes.
Prompt 4
Show me how to use the scrubber and word ranking panel to inspect a past reply.

Frequently asked questions

What is subtext?

A live visual tool that shows the words a language model is internally leaning toward, moment by moment, before it actually speaks them.

What language is subtext written in?

Mainly HTML. The stack also includes Python, PyTorch, HTML.

What license does subtext use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is subtext to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is subtext for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.