<img width="1308" alt="Screenshot 2024-03-21 at 3 08 28 pm" src="https://github.com/jbloomAus/mats_sae_training/assets/69127271/209012ec-a779-4036-b4be-7b7739ea87f6">
# SAE Lens
[](https://pypi.org/project/sae-lens/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml)
[](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml)
[](https://codecov.io/gh/jbloomAus/SAELens)
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.
Please refer to the [documentation](https://jbloomaus.github.io/SAELens/) 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](https://github.com/callummcdougall/sae_vis/tree/main).
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](https://80000hours.org/problem-profiles/artificial-intelligence/).
This library is maintained by [Joseph Bloom](https://www.jbloomaus.com/), [Curt Tigges](https://curttigges.com/), [Anthony Duong](https://github.com/anthonyduong9) and [David Chanin](https://github.com/chanind).
## Loading Pre-trained SAEs.
Pre-trained SAEs for various models can be imported via SAE Lens. See this [page](https://jbloomaus.github.io/SAELens/sae_table/) in the readme for a list of all SAEs.
## Tutorials
- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/tutorial_2_0.ipynb)
- [Loading and Analysing Pre-Trained Sparse Autoencoders](tutorials/basic_loading_and_analysing.ipynb)
[](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/basic_loading_and_analysing.ipynb)
- [Understanding SAE Features with the Logit Lens](tutorials/logits_lens_with_features.ipynb)
[](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/logits_lens_with_features.ipynb)
- [Training a Sparse Autoencoder](tutorials/training_a_sparse_autoencoder.ipynb)
[](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/training_a_sparse_autoencoder.ipynb)
## Join the Slack!
Feel free to join the [Open Source Mechanistic Interpretability Slack](https://join.slack.com/t/opensourcemechanistic/shared_invite/zt-375zalm04-GFd5tdBU1yLKlu_T_JSqZQ) for support!
## 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/jbloomAus/SAELens}},
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sae-lens",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "deep-learning, sparse-autoencoders, mechanistic-interpretability, PyTorch",
"author": "Joseph Bloom",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c8/63/94f820c59ccde7a0e64f1202cfe42b054d6e70d6b63c5243a0d359242dd3/sae_lens-5.10.7.tar.gz",
"platform": null,
"description": "<img width=\"1308\" alt=\"Screenshot 2024-03-21 at 3 08 28\u202fpm\" src=\"https://github.com/jbloomAus/mats_sae_training/assets/69127271/209012ec-a779-4036-b4be-7b7739ea87f6\">\n\n# SAE Lens\n\n[](https://pypi.org/project/sae-lens/)\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml)\n[](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml)\n[](https://codecov.io/gh/jbloomAus/SAELens)\n\nSAELens exists to help researchers:\n\n- Train sparse autoencoders.\n- Analyse sparse autoencoders / research mechanistic interpretability.\n- Generate insights which make it easier to create safe and aligned AI systems.\n\nPlease refer to the [documentation](https://jbloomaus.github.io/SAELens/) for information on how to:\n\n- Download and Analyse pre-trained sparse autoencoders.\n- Train your own sparse autoencoders.\n- Generate feature dashboards with the [SAE-Vis Library](https://github.com/callummcdougall/sae_vis/tree/main).\n\nSAE 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](https://80000hours.org/problem-profiles/artificial-intelligence/).\n\nThis library is maintained by [Joseph Bloom](https://www.jbloomaus.com/), [Curt Tigges](https://curttigges.com/), [Anthony Duong](https://github.com/anthonyduong9) and [David Chanin](https://github.com/chanind).\n\n## Loading Pre-trained SAEs.\n\nPre-trained SAEs for various models can be imported via SAE Lens. See this [page](https://jbloomaus.github.io/SAELens/sae_table/) in the readme for a list of all SAEs.\n\n## Tutorials\n\n- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/tutorial_2_0.ipynb)\n- [Loading and Analysing Pre-Trained Sparse Autoencoders](tutorials/basic_loading_and_analysing.ipynb)\n [](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/basic_loading_and_analysing.ipynb)\n- [Understanding SAE Features with the Logit Lens](tutorials/logits_lens_with_features.ipynb)\n [](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/logits_lens_with_features.ipynb)\n- [Training a Sparse Autoencoder](tutorials/training_a_sparse_autoencoder.ipynb)\n [](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/training_a_sparse_autoencoder.ipynb)\n\n## Join the Slack!\n\nFeel free to join the [Open Source Mechanistic Interpretability Slack](https://join.slack.com/t/opensourcemechanistic/shared_invite/zt-375zalm04-GFd5tdBU1yLKlu_T_JSqZQ) for support!\n\n## Citation\n\nPlease cite the package as follows:\n\n```\n@misc{bloom2024saetrainingcodebase,\n title = {SAELens},\n author = {Bloom, Joseph and Tigges, Curt and Duong, Anthony and Chanin, David},\n year = {2024},\n howpublished = {\\url{https://github.com/jbloomAus/SAELens}},\n}\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Training and Analyzing Sparse Autoencoders (SAEs)",
"version": "5.10.7",
"project_urls": {
"Homepage": "https://jbloomaus.github.io/SAELens",
"Repository": "https://github.com/jbloomAus/SAELens"
},
"split_keywords": [
"deep-learning",
" sparse-autoencoders",
" mechanistic-interpretability",
" pytorch"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d3b9939f7e72d4324e2b8cf13d91e0e029fd2ad16814d91d4bb525e230a47a05",
"md5": "b75370a4391879c39cc2fa0fdabffa73",
"sha256": "8d7737d32a7a6756759c7c316d72678f302a535610fe6f4925cc6c2f5877ca97"
},
"downloads": -1,
"filename": "sae_lens-5.10.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b75370a4391879c39cc2fa0fdabffa73",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 131431,
"upload_time": "2025-06-10T19:54:18",
"upload_time_iso_8601": "2025-06-10T19:54:18.731128Z",
"url": "https://files.pythonhosted.org/packages/d3/b9/939f7e72d4324e2b8cf13d91e0e029fd2ad16814d91d4bb525e230a47a05/sae_lens-5.10.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c86394f820c59ccde7a0e64f1202cfe42b054d6e70d6b63c5243a0d359242dd3",
"md5": "2ed7f4ebd2bce83d0229f355d460a3ba",
"sha256": "e1878a32581078ae6a3b0151269696b61f70572f672a10f719707b880ac7c4b3"
},
"downloads": -1,
"filename": "sae_lens-5.10.7.tar.gz",
"has_sig": false,
"md5_digest": "2ed7f4ebd2bce83d0229f355d460a3ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 123547,
"upload_time": "2025-06-10T19:54:20",
"upload_time_iso_8601": "2025-06-10T19:54:20.568967Z",
"url": "https://files.pythonhosted.org/packages/c8/63/94f820c59ccde7a0e64f1202cfe42b054d6e70d6b63c5243a0d359242dd3/sae_lens-5.10.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-06-10 19:54:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jbloomAus",
"github_project": "SAELens",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sae-lens"
}