Watch a language model's internal reasoning unfold in real time during a live conversation.
Study how a model settles on a judgment or plan internally before it appears in its written reply.
Record a conversation session and replay it later in a browser for closer analysis.
Reproduce interpretability research findings on an open, consumer-hardware sized model.
| ninjahawk/subtext | keyai/calculusmadeeasy-zh | jimliu/science-skills | |
|---|---|---|---|
| Stars | 214 | 215 | 216 |
| Language | HTML | HTML | HTML |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 1/5 | 3/5 |
| Audience | researcher | writer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires a GPU to run the local model live, though recorded sessions can be replayed without one.
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.
A live visual tool that shows the words a language model is internally leaning toward, moment by moment, before it actually speaks them.
Mainly HTML. The stack also includes Python, PyTorch, HTML.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.