SAE Lens
SAELens exists to help researchers:
- Train sparse autoencoders.
- Analyse sparse autoencoders / research mechanistic interpretability.
- Generate insights which make it easier to create safe and aligned AI systems.
SAELens inference works with any PyTorch-based model, not just TransformerLens. While we provide deep integration with TransformerLens via HookedSAETransformer, SAEs can be used with Hugging Face Transformers, NNsight, or any other framework by extracting activations and passing them to the SAE's encode() and decode() methods.
Please refer to the documentation for information on how to:
- Download and Analyse pre-trained sparse autoencoders.
- Train your own sparse autoencoders.
- Generate feature dashboards with the SAE-Vis Library.
SAE Lens is the result of many contributors working collectively to improve humanity's understanding of neural networks, many of whom are motivated by a desire to safeguard humanity from risks posed by artificial intelligence.
This library is maintained by Joseph Bloom, Curt Tigges, Anthony Duong and David Chanin.
Loading Pre-trained SAEs.
Pre-trained SAEs for various models can be imported via SAE Lens. See this page for a list of all SAEs.
Migrating to SAELens v6
The new v6 update is a major refactor to SAELens and changes the way training code is structured. Check out the migration guide for more details.
Tutorials
- SAE Lens + Neuronpedia
- Loading and Analysing Pre-Trained Sparse Autoencoders
- Understanding SAE Features with the Logit Lens
- Training a Sparse Autoencoder
- Training SAEs on Synthetic Data
- SynthSAEBench: Evaluating SAE Architectures on Synthetic Data
Join the Slack!
Feel free to join the Open Source Mechanistic Interpretability Slack for support!
Other SAE Projects
- dictionary-learning: An SAE training library that focuses on having hackable code.
- Sparsify: A lean SAE training library focused on TopK SAEs.
- Overcomplete: SAE training library focused on vision models.
- SAE-Vis: A library for visualizing SAE features, works with SAELens.
- SAEBench: A suite of LLM SAE benchmarks, works with SAELens.
Citation
Please cite the package as follows:
@misc{bloom2024saetrainingcodebase,
title = {SAELens},
author = {Bloom, Joseph and Tigges, Curt and Duong, Anthony and Chanin, David},
year = {2024},
howpublished = {\url{https://github.com/decoderesearch/SAELens}},
}
Release files for sae-lens 6.51.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sae_lens-6.51.2.tar.gz | 277.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sae_lens-6.51.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 591.7 kB
Release files / sae_lens-6.51.2.tar.gz
| Download URL | sae_lens-6.51.2.tar.gz |
|---|---|
| Size | 277.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0555f9d37feb625ac5054362200b349e48854c9bf41f0243b2313a0717aabe4a
|
|
BLAKE2b-256 checksum How to use checksums |
21a2e00e4158a344a848e31c2fa113bece9ee9d664fe8062b23f1b8dac711e31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logRelease files / sae_lens-6.51.2-py3-none-any.whl
| Download URL | sae_lens-6.51.2-py3-none-any.whl |
|---|---|
| Size | 314.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
516c34d926395655cbacf77fc602da790f05ccbaa5073256c3de2cc60b80c2bd
|
|
BLAKE2b-256 checksum How to use checksums |
5642f92dd99931096c89c0c0f9e0d670997991accbad8ea21468014a1277bb2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency log