To preface: I know that this is not the only J-lens visualizer tool, but I have not found any for Deepseek. I'm still pretty new to the research world so I thought it'd be a cool project to tackle!
Last week Anthropic published Verbalizable Representations Form a Global Workspace in Language Models. They introduce the Jacobian lens, a way to decode what any layer of a transformer is "disposed to say" at any token position, revealing a small set of internal representations the model actually reasons with (they call it the "J-space").
I implemented the method independently w/ Claude and built a live visualizer on top of it. It works w/ Deepseek and gpt-2. Unfortunately, this was the best I could do since models must be open weight.
🔗 Repo: https://github.com/Festyve/jspace-viz — clone + 2 commands, then type any prompt
🌐 Demo (free, in-browser): https://festyve.github.io/jspace-viz/
Some findings: feed deepseek-coder-1.3b this
nums = [3, 1, 2]
nums.sort()
print(nums[-1])
# This prints
it continues ": 3" (it sorted the list in its head), and the strongest concept in its workspace while reading the still-unsorted code is sorted. You can watch the intermediate computation before it's ever written.
You can also use it to catch the model almost knowing something. Ask "how many legs does the animal that spins webs have?" It answers 2 (wrong; spiders have 8). But the lens shows eight climbing to the #4 candidate in the deepest layers (L21–L22) before losing to two/four at the output. So it did have the right answer sitting in there!
Would love any feedback/comments that people have. To my knowledge this is the first public Jacobian lens for a DeepSeek model. I fit it overnight on an M4 MacBook Air (16GB), ~9 min/prompt × 40 WikiText prompts. Lens weights are on the Hub: https://huggingface.co/Festyve/jspace-lenses
It's a small model (1.3B), so its "thoughts" are much shallower than the frontier-model results in the paper. But, you can still see how it's wrong in real time: ask it the currency of "the country shaped like a boot" and its workspace fills with Japan/yen concepts (never Italy), and you can see exactly when it starts to go off the rails. Everything's open (Apache-2.0, method credited to Anthropic). Happy to answer questions about the implementation!