Jacobian Lens is Anthropic’s reference implementation for examining what a language model’s internal activations are inclined to produce as text. It transports residual-stream vectors from selected layers and positions into the final-layer basis using an averaged input-output Jacobian. The transformed vectors are decoded through the model’s own unembedding into ranked vocabulary predictions. The package can fit new lenses, load saved ones, apply them to prompts, and merge results from parallel fitting jobs. Interactive layer-by-position views reveal how token rankings evolve across the network and compare them with the model’s final output. It supports open-weight Hugging Face decoder models, with Qwen used in the included examples. The repository also provides synthetic evaluation data and an end-to-end notebook, but it is not maintained.

Features

  • Average-Jacobian activation transport
  • Ranked vocabulary prediction readouts
  • Support for Hugging Face decoder models
  • Custom lens fitting and checkpoint loading
  • Parallel fitting and lens merging
  • Interactive layer-by-position visualizations

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow jlens

jlens Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of jlens!

Additional Project Details

Programming Language

Python

Related Categories

Python Libraries

Registered

1 day ago