<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
[![PyPI](https://img.shields.io/pypi/v/sae-lens?color=blue)](https://pypi.org/project/sae-lens/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![build](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml/badge.svg)](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml)
[![Deploy Docs](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml/badge.svg)](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml)
[![codecov](https://codecov.io/gh/jbloomAus/SAELens/graph/badge.svg?token=N83NGH8CGE)](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/) 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)[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/logits_lens_with_features.ipynb)
- [Training a Sparse Autoencoder](tutorials/training_a_sparse_autoencoder.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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-2k0id7mv8-CsIgPLmmHd03RPJmLUcapw) for support!
## Citation
Please cite the package as follows:
```
@misc{bloom2024saetrainingcodebase,
title = {SAELens},
author = {Joseph Bloom, Curt Tigges and David Chanin},
year = {2024},
howpublished = {\url{https://github.com/jbloomAus/SAELens}},
}
```
Raw data
{
"_id": null,
"home_page": "https://jbloomaus.github.io/SAELens",
"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/91/0f/2581a1f187bacfc17fa768bfdc8a1111fa5d37c064bca820ebf963c8f266/sae_lens-4.3.4.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[![PyPI](https://img.shields.io/pypi/v/sae-lens?color=blue)](https://pypi.org/project/sae-lens/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![build](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml/badge.svg)](https://github.com/jbloomAus/SAELens/actions/workflows/build.yml)\n[![Deploy Docs](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml/badge.svg)](https://github.com/jbloomAus/SAELens/actions/workflows/deploy_docs.yml)\n[![codecov](https://codecov.io/gh/jbloomAus/SAELens/graph/badge.svg?token=N83NGH8CGE)](https://codecov.io/gh/jbloomAus/SAELens)\n\nSAELens exists to help researchers:\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- 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/) 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## Tutorials\n\n- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/jbloomAus/SAELens/blob/main/tutorials/training_a_sparse_autoencoder.ipynb)\n\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-2k0id7mv8-CsIgPLmmHd03RPJmLUcapw) for support!\n\n\n## Citation\n\nPlease cite the package as follows:\n\n```\n@misc{bloom2024saetrainingcodebase,\n title = {SAELens},\n author = {Joseph Bloom, Curt Tigges and David Chanin},\n year = {2024},\n howpublished = {\\url{https://github.com/jbloomAus/SAELens}},\n}\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Training and Analyzing Sparse Autoencoders (SAEs)",
"version": "4.3.4",
"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": "",
"digests": {
"blake2b_256": "62ee75f1d7c749e5f95300d000225c8a05067010a5f90ccbd584642029bb20f7",
"md5": "dde9d117baa16757a888fb2d111a3081",
"sha256": "cddcf3b88e0552a24f4da86a344ecce7d8bc1bae9e4e4015919e2c8fc992b473"
},
"downloads": -1,
"filename": "sae_lens-4.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dde9d117baa16757a888fb2d111a3081",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 139259,
"upload_time": "2024-11-14T13:28:19",
"upload_time_iso_8601": "2024-11-14T13:28:19.973550Z",
"url": "https://files.pythonhosted.org/packages/62/ee/75f1d7c749e5f95300d000225c8a05067010a5f90ccbd584642029bb20f7/sae_lens-4.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "910f2581a1f187bacfc17fa768bfdc8a1111fa5d37c064bca820ebf963c8f266",
"md5": "0565a94ca787c367a6a4722f1513ee3e",
"sha256": "7d6c9ccf4c340d92de1151e22b9dc8d41052943ed711013fcd3830d0f20b9aa6"
},
"downloads": -1,
"filename": "sae_lens-4.3.4.tar.gz",
"has_sig": false,
"md5_digest": "0565a94ca787c367a6a4722f1513ee3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 128798,
"upload_time": "2024-11-14T13:28:22",
"upload_time_iso_8601": "2024-11-14T13:28:22.316618Z",
"url": "https://files.pythonhosted.org/packages/91/0f/2581a1f187bacfc17fa768bfdc8a1111fa5d37c064bca820ebf963c8f266/sae_lens-4.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-14 13:28:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jbloomAus",
"github_project": "SAELens",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "sae-lens"
}