Point an existing OpenAI-client app at brainscope to watch its real traffic activate model layers in real time.
Steer a model's output live by extracting a direction from example pairs and adjusting a slider.
Record and replay generation traces to study exactly when an answer formed inside the model.
Audit a model for hidden or baked-in personas by watching per-layer signals.
| moudrkat/brainscope | aa2448208027-code/localaihotswap | amapvoice/pilottts | |
|---|---|---|---|
| Stars | 39 | 39 | 39 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Runs CPU-only with a tiny model out of the box, larger models need a GPU or the Docker CUDA image.
Brainscope is a tool that lets you watch what is happening inside an AI language model while it is generating answers. It works as a server that speaks the same language as OpenAI's API, so you can point an existing app at it without changing any code, and it will quietly capture and display what the model is doing layer by layer as it writes each word. The main idea is to open up the usually hidden middle of a model. As the model processes a prompt and builds its answer, brainscope shows a live view of the residual stream, the internal signal that flows from one layer to the next. You can click through each layer to see how strongly it is firing, look at individual neurons, check what the model's attention is focused on, and watch a logit lens grid that shows how the answer takes shape as it moves deeper through the layers. A related view called J-lens goes further and can show words the model is leaning toward saying before they actually appear in the output. Brainscope also supports steering, which means you can nudge the model's behavior in a chosen direction using a slider, either for a single request or as an ongoing setting. Every generation can be saved as a trace and replayed afterward, token by token, so you can study exactly when and where an answer formed. The project can also be used to check whether a model has a hidden persona or bias baked into it, by watching how its internal layers respond. Getting started is simple. You install it with pip and run a single command to launch a small CPU-friendly model, or you can use the provided Docker image, including a version built for NVIDIA GPUs if you want to try larger models. Once running, brainscope opens a browser page with a built-in chat box so you can start typing and watching immediately, or you can connect it to any application that already uses an OpenAI-style client. This project is aimed at people working with open-source language models who want to understand what is going on under the hood, whether for research, debugging, or auditing model behavior.
Brainscope is an OpenAI-compatible server that shows a live, layer-by-layer view inside a language model as it generates text, including logit lens, attention, and steering.
Mainly Python. The stack also includes Python, Hugging Face, Docker.
Setup difficulty is rated moderate, with roughly 5min to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.