git404hub

what is jspace fr?

joshhu/jspace — explained in plain English

Analysis updated 2026-05-18

17PythonAudience · researcherComplexity · 5/5Setup · hard

tl;dr

An interactive tool that visualizes what a language model is about to say at every internal layer and token position, using a method called J-lens.

vibe map

mindmap
  root((jspace))
    What it does
      J-lens visualization
      Per layer token probabilities
      Logit lens comparison
    Tech stack
      Python
      PyTorch
      Hugging Face models
      CUDA
    Use cases
      LLM interpretability research
      Model internals exploration
      Jacobian precomputation
    Requirements
      CUDA GPU recommended
      Python 3.12 and uv
      Long precompute times

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 make with this?

VIBE 1

Inspect what a language model is about to say at every layer and token position, not just at the final output.

VIBE 2

Compare the new J-lens method against the older logit lens on the same input text.

VIBE 3

Precompute Jacobian statistics for a new Hugging Face causal language model and cache them for reuse.

what's the stack?

PythonPyTorchHugging Face TransformersCUDA

how it stacks up fr

joshhu/jspace0petru/sentimoagi-eval-official/forte
Stars171717
LanguagePythonPythonPython
Setup difficultyhardmoderatehard
Complexity5/53/54/5
Audienceresearcherdeveloperdeveloper

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

how do i run it?

Difficulty · hard time til it works · 1h+

Needs a CUDA GPU for practical use, precomputing Jacobian statistics for a new model can take 30 minutes to several hours.

No license file is mentioned in the README.

in plain english

jspace is an interactive web tool for looking inside a large language model to see what it is quietly preparing to say at each layer and each word position, before it actually generates anything. It is an implementation of a method called J-lens, based on an Anthropic research paper about how meaning shows up across the internal layers of language models. The tool works with open source models such as Qwen3 and SmolLM2, or in principle any causal language model hosted on Hugging Face. Under the hood, the method estimates how each internal layer's activity relates to what the model outputs in its very last layer, then translates that internal activity into the vocabulary the model actually speaks in, so you can read out a probability distribution over words even from early or middle layers, not just the final one. Because computing this exactly would be far too expensive, the tool instead uses a randomized estimation technique that is proven, through the project's own tests, to converge to the correct answer without bias. To use it, you install the project's dependencies, then start a local web server. In the browser you pick a model, type in some text, and run the analysis. If a model has not had its internal statistics precomputed yet, the tool falls back to a simpler comparison method called the logit lens while you kick off the background precomputation, which can take anywhere from about thirty minutes to several hours depending on model size, and automatically checkpoints its progress so it can resume if interrupted. There is also a command line option to run this precomputation directly. The web interface shows a grid where rows represent layers and columns represent word positions, with each cell showing the most likely word at that point and a background color reflecting its probability. Clicking a cell reveals a ranked list of alternatives, and you can flip between the new J-lens method and the older logit lens to compare them directly. Running this tool requires a fairly capable machine: Python 3.12 or newer, the uv package manager, and ideally a CUDA capable graphics card, since precomputing on a CPU alone is very slow. The project includes a test suite that checks the math and the caching behavior.

prompts (copy fr)

prompt 1
Run uv sync, then uv run python -m jspace serve, and walk me through the web UI at localhost:7860.
prompt 2
Precompute J-lens statistics for Qwen/Qwen3-0.6B with uv run python -m jspace precompute Qwen/Qwen3-0.6B --num-prompts 1000.
prompt 3
Explain the difference between J-lens and logit lens shown in jspace's interface for a given prompt.
prompt 4
Run uv run pytest and explain what the Jacobian estimator convergence tests check.

Frequently asked questions

what is jspace fr?

An interactive tool that visualizes what a language model is about to say at every internal layer and token position, using a method called J-lens.

What language is jspace written in?

Mainly Python. The stack also includes Python, PyTorch, Hugging Face Transformers.

What license does jspace use?

No license file is mentioned in the README.

How hard is jspace to set up?

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

Who is jspace for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.