GitHub radar

Jacobian Lens: See How LLMs Think

Anthropic has published a companion codebase to their global workspace paper. It’s a tool for decoding what an arbitrary intermediate representation of a language model is “thinking” before it becomes the final output.

Anthropic’s Jacobian Lens is an exciting new technique for interpreting models. Given an arbitrary intermediate representation within a language model, the Jacobian Lens performs a linear projection onto the final layer of the model, which can then be decoded back into a list of high probability tokens. This gives us insight into what the model was thinking about at different points during inference. They hypothesize in their paper that language models maintain a “global workspace” of verbalized internal representations. This is a window directly into the global workspace! The Jacobian Lens works on any HuggingFace decoder transformer model off-the-shelf.

Why a vibe-coder should care

This is a powerful tool for those developing AI applications because it allows us to understand why our models are producing certain outputs. We can identify when our models are hallucinating, ensure our finetuned models are learning the right things, and gain a deeper understanding of how knowledge is represented and retrieved in large language models.

Open on GitHub