ai-setup 5 min read

Lucid – Watch and Edit What an LLM Thinks Before It Speaks

A free web tool that visualizes internal activation patterns of language models layer by layer as they process a prompt, letting you observe and manipulate concepts mid-computation.

By
Share: X in
Lucid LLM activation viewer product thumbnail

TL;DR

TL;DR: Lucid is a free browser-based tool that lets you watch a language model’s internal concept activations layer by layer as it thinks, and even edit those activations mid-computation to change the output.

What Is Lucid?

Lucid is a web-based interpretability tool built by Anthony David Adams that gives you a live window into what a language model is “thinking” before it commits to a token.

It is based on a technique called a Jacobian lens — documented in the companion repo jacobian-lens (Apache-2.0, main branch, last pushed 2026-07-08). The lens works by transporting a residual-stream vector at any layer and position into the final-layer basis, then decoding it with the model’s own unembedding into a ranked list of vocabulary tokens.

In plain terms: Lucid shows you which words and concepts the model is disposed to say at each intermediate layer, before it actually says them.

How it works

The core formula from the repo:

lens_l(h) = unembed( J_l @ h ), J_l = E[∂h_final / ∂h_l]

The Jacobian J_l is the average input-output Jacobian over a text corpus — fitted per model, then reused at inference time.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

Setup Workflow

Lucid runs entirely in the browser — no install required.

Step 1: Open the tool

Navigate to lucid.earthpilot.ai. The interface loads a prompt box and a layer-by-layer activation visualization.

Step 2: Enter a prompt

Type any prompt. The paper’s example: ask the model to describe a symbol of “three curving lines of water” and watch “ocean”, “sea”, and “surf” light up a few layers deeper before the model settles on “waves”.

Step 3: Inspect activations by layer

Each layer of the model is decoded into a ranked list of tokens. You can see concepts emerge, compete, and resolve across the forward pass.

Step 4: Edit mid-layer state (experimental)

The tool also supports inserting a concept — for example, injecting “fire” into the middle layer of the ocean prompt — which shifts the model’s subsequent output accordingly.

Step 5: Use the Docent agent

A context-aware AI agent called “Docent” can chat with you about what you observe in the visualization.

Which Models Work?

The HN author tested across multiple architectures. Key finding from the launch post:

J-lens beats a plain logit lens on some architectures and does nothing on others, and it is not about size. A 0.5B Qwen reads better than a 2.8B Pythia. Every Pythia tried gained basically nothing; the Llama and Qwen models gained a lot.

This suggests the Jacobian lens approach is architecture-dependent — it works well with Llama and Qwen family models, but provides little benefit on Pythia-based models.

Practical Evaluation Checklist

  • [x] Free, browser-based — no install
  • [x] Live layer-by-layer token activation visualization
  • [x] Concept injection / editing capability
  • [x] Docent chat agent for interpreting observations
  • [x] Based on peer-reviewed Anthropic research
  • [x] Open-source companion repo (Apache-2.0)
  • [ ] Supports a wide range of models (currently optimized for Llama/Qwen)
  • [ ] Persistent history or sharing of sessions

FAQ

Q: Is this the same as the Anthropic paper’s tool? A: No — Lucid is an independent open-source implementation of the Jacobian lens concept, built on open-weights models. The paper describes Anthropic’s proprietary approach; Lucid applies a similar principle to models like Qwen and Llama that anyone can run.

Q: Do I need an API key? A: The web tool is free to use. Under the hood it may call model APIs — check the site for the latest on authentication requirements.

Q: Can I run this locally? A: The companion repo jacobian-lens is open source and can be installed with pip install -e .. It requires a HuggingFace model and a GPU.

Q: Which models are supported? A: Llama and Qwen families show the clearest results. Pythia models show minimal benefit from the Jacobian lens technique.

Q: Is this interpretability tool useful for debugging? A: Yes — watching concepts emerge can help you understand why a model makes certain errors or偏爱 certain outputs. It is primarily a research and learning tool rather than a production debugging instrument.

Conclusion

Lucid makes the internals of language model computation visible and editable in real time. It is free, runs in the browser, and is backed by actual published research. If you are curious about how LLMs resolve ambiguity or want to see concept-level activation patterns in action, it is worth 10 minutes on the site.

The companion repo jacobian-lens gives you the code if you want to fit the lens on your own models.