whatisgithub

What is jspace?

kameshkanna/jspace — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · researcherComplexity · 4/5Setup · hard

In one sentence

An open reimplementation of Anthropic research showing how language models form a shared internal workspace of concepts, runnable on open models like Qwen and Llama.

Mindmap

mindmap
  root((jspace))
    What it does
      Traces model internals
      Detects concept workspace
      Replicates Anthropic paper
    Tech stack
      Python
      PyTorch
      HuggingFace models
    Use cases
      AI interpretability research
      Cross language analysis
      Model internals study
    Audience
      Researchers
      ML engineers
    Models supported
      Qwen
      Llama
      Mistral
      Gemma

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

Study which internal concepts a language model activates while processing a prompt.

USE CASE 2

Compare how different open models like Qwen and Llama represent information internally.

USE CASE 3

Test whether a model thinks in a particular pretraining language regardless of input language.

USE CASE 4

Reproduce interpretability research findings on your own choice of open model.

What is it built with?

PythonPyTorchHuggingFace

How does it compare?

kameshkanna/jspace0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPythonPython
Setup difficultyhardmoderateeasy
Complexity4/52/52/5
Audienceresearchergeneralgeneral

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

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires downloading large open-weight models and a capable GPU, a full experiment run takes about 50 minutes on an H100.

The README does not state a license.

So what is it?

jspace is a research project that rebuilds the methods from an Anthropic research paper about how large language models think internally, so that anyone can run the same analysis on open, publicly available AI models instead of Anthropic's own models. The original paper found that language models seem to form something like a shared internal workspace in their middle layers: at any moment, somewhere between 10 and 25 concepts are active at once, and these concepts can be put into words rather than staying as abstract, uninterpretable numbers. The paper also found that a model tends to think internally in whatever language it was mostly trained on, even when the question it is answering is written in a different language. For example, a model mostly trained on Chinese text may still think in Chinese internally even when asked a question in English. This project reproduces both of those findings using two open models, Qwen2.5-7B and Llama-3.1-8B, following the same mathematical approach as the original paper. It includes tools to compute what the README calls a Jacobian Lens, a way of tracing how information flows from an early layer of the model through to its final output, and a Workspace Analyzer that combines four different signals to detect where in the model this shared workspace appears and how many concepts are active there at once. Getting started involves cloning the repository and running a setup script that installs everything needed for either the Qwen or the Llama model. From there, a two-step process first fits the Jacobian Lens for a chosen model and saves the result, then runs the workspace analysis using that saved data along with a set of prompts. The project also exposes a Python interface so the same steps can be run directly from code rather than the command line. The repository supports several other open model families as well, including Mistral, Gemma, GPT-2, GPT-J, Falcon, and OPT, as long as they follow a standard layer structure. It also includes a language pivot experiment with 14 prompts across English, Chinese, and Japanese, and reports that both the Qwen and Llama models it tested do think in their dominant pretraining language internally regardless of what language the input is written in, matching the original paper's conclusion. Running the full experiment on both models takes about 50 minutes on an H100 GPU.

Copy-paste prompts

Prompt 1
Help me run jspace's setup script and compute a Jacobian Lens for Qwen2.5-7B-Instruct.
Prompt 2
Explain what the Workspace Analyzer's four signals measure in plain terms.
Prompt 3
Walk me through running the language pivot experiment comparing Qwen and Llama.
Prompt 4
Show me how to use the jspace Python API to analyze a single prompt with HookedModel.

Frequently asked questions

What is jspace?

An open reimplementation of Anthropic research showing how language models form a shared internal workspace of concepts, runnable on open models like Qwen and Llama.

What language is jspace written in?

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

What license does jspace use?

The README does not state a license.

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.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.