sae-lens


Namesae-lens JSON
Version 5.2.1 PyPI version JSON
download
home_pagehttps://jbloomaus.github.io/SAELens
SummaryTraining and Analyzing Sparse Autoencoders (SAEs)
upload_time2024-12-15 00:46:23
maintainerNone
docs_urlNone
authorJoseph Bloom
requires_python<4.0,>=3.10
licenseMIT
keywords deep-learning sparse-autoencoders mechanistic-interpretability pytorch
VCS
bugtrack_url
requirements transformer-lens transformers jupyter plotly plotly-express nbformat ipykernel matplotlib matplotlib-inline flake8 isort black pytest pytest-cov pre-commit
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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/89/20/b035ae96bf3f8a5b4c25c7049316cbb86a6eb0a542b7a392946e450557b8/sae_lens-5.2.1.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": "5.2.1",
    "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": "596d08cf5664f92ad0fc2a4c5f24603bc3cf9f794310d29ffce6144d9a38efa9",
                "md5": "0226db5506b0961590a183890206900a",
                "sha256": "07adf7415bbaa5941ea5a10223c4ef13fd6079ae505df1e4bc3578698c5ac2cc"
            },
            "downloads": -1,
            "filename": "sae_lens-5.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0226db5506b0961590a183890206900a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 142763,
            "upload_time": "2024-12-15T00:46:19",
            "upload_time_iso_8601": "2024-12-15T00:46:19.723718Z",
            "url": "https://files.pythonhosted.org/packages/59/6d/08cf5664f92ad0fc2a4c5f24603bc3cf9f794310d29ffce6144d9a38efa9/sae_lens-5.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8920b035ae96bf3f8a5b4c25c7049316cbb86a6eb0a542b7a392946e450557b8",
                "md5": "c11accfd8a70d04c6d8c4cef2da26dc4",
                "sha256": "eb6e5a3dcba8805e17bb03baa37c10340c8a6bf797f6b43b53001236fd6c5004"
            },
            "downloads": -1,
            "filename": "sae_lens-5.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c11accfd8a70d04c6d8c4cef2da26dc4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 131631,
            "upload_time": "2024-12-15T00:46:23",
            "upload_time_iso_8601": "2024-12-15T00:46:23.933442Z",
            "url": "https://files.pythonhosted.org/packages/89/20/b035ae96bf3f8a5b4c25c7049316cbb86a6eb0a542b7a392946e450557b8/sae_lens-5.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-15 00:46:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jbloomAus",
    "github_project": "SAELens",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "transformer-lens",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "transformers",
            "specs": [
                [
                    "==",
                    "4.35.2"
                ]
            ]
        },
        {
            "name": "jupyter",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "plotly",
            "specs": [
                [
                    "==",
                    "5.18.0"
                ]
            ]
        },
        {
            "name": "plotly-express",
            "specs": [
                [
                    "==",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "nbformat",
            "specs": [
                [
                    "==",
                    "5.9.2"
                ]
            ]
        },
        {
            "name": "ipykernel",
            "specs": [
                [
                    "==",
                    "6.27.1"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.8.2"
                ]
            ]
        },
        {
            "name": "matplotlib-inline",
            "specs": [
                [
                    "==",
                    "0.1.6"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    "==",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    "==",
                    "5.13.2"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "23.11.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.4.3"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "3.6.0"
                ]
            ]
        }
    ],
    "lcname": "sae-lens"
}
        
Elapsed time: 0.46459s