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2.1
5.2.0
5.11.0
5.10.7
5.10.6
5.10.5
5.10.4
5.10.3
5.10.2
5.10.1
5.10.0
5.1.0
5.0.0
4.4.5
4.4.4
4.4.3
4.4.2
4.4.1
4.4.0
4.3.5
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.0
4.1.1
4.1.0
4.0.9
4.0.8
4.0.7
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.10
4.0.1
4.0.0
3.9.2
3.9.1
3.9.0
3.8.0
3.7.0
3.6.0
3.5.0
3.4.1
3.4.0
3.3.0
3.23.4
3.23.3
3.23.2
3.23.1
3.23.0
3.22.2
3.22.1
3.22.0
3.21.1
3.21.0
3.20.5
3.20.4
3.20.3
3.20.2
3.20.1
3.20.0
3.2.3
3.2.2
3.2.1
3.2.0
3.19.4
3.19.3
3.19.2
3.19.1
3.19.0
3.18.2
3.18.1
3.18.0
3.17.1
3.17.0
3.16.0
3.15.0
3.14.0
3.13.1
3.13.0
3.12.5
3.12.4
3.12.3
3.12.2
3.12.1
3.12.0
3.11.2
3.11.1
3.11.0
3.10.0
3.1.1
3.1.0
3.0.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.8.0
1.7.0
1.6.1
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
0.7.0
0.6.0
0.5.1
0.5.0
0.4.0
0.3.0
0.2.2
0.2.1
0.2.0
0.1.0
توضیحات
Training and Analyzing Sparse Autoencoders (SAEs)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | sae-lens-6.9.1 |
| نام | sae-lens |
| نسخه کتابخانه | 6.9.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Joseph Bloom |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/sae-lens/ |
| مجوز | MIT |
<img width="1308" height="532" alt="saes_pic" src="https://github.com/user-attachments/assets/2a5d752f-b261-4ee4-ad5d-ebf282321371" />
# SAE Lens
[](https://pypi.org/project/sae-lens/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/decoderesearch/SAELens/actions/workflows/build.yml)
[](https://github.com/decoderesearch/SAELens/actions/workflows/deploy_docs.yml)
[](https://codecov.io/gh/decoderesearch/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.
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](https://decoderesearch.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.decoderesearch.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://decoderesearch.github.io/SAELens/pretrained_saes/) 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](https://decoderesearch.github.io/SAELens/latest/migrating/) for more details.
## Tutorials
- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/tutorial_2_0.ipynb)
- [Loading and Analysing Pre-Trained Sparse Autoencoders](tutorials/basic_loading_and_analysing.ipynb)
[](https://githubtocolab.com/decoderesearch/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/decoderesearch/SAELens/blob/main/tutorials/logits_lens_with_features.ipynb)
- [Training a Sparse Autoencoder](tutorials/training_a_sparse_autoencoder.ipynb)
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/training_a_sparse_autoencoder.ipynb)
- [Training SAEs on Synthetic Data](tutorials/training_saes_on_synthetic_data.ipynb)
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/training_saes_on_synthetic_data.ipynb)
- [SynthSAEBench: Evaluating SAE Architectures on Synthetic Data](tutorials/synth_sae_bench.ipynb)
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/synth_sae_bench.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!
## Other SAE Projects
- [dictionary-learning](https://github.com/saprmarks/dictionary_learning): An SAE training library that focuses on having hackable code.
- [Sparsify](https://github.com/EleutherAI/sparsify): A lean SAE training library focused on TopK SAEs.
- [Overcomplete](https://github.com/KempnerInstitute/overcomplete): SAE training library focused on vision models.
- [SAE-Vis](https://github.com/callummcdougall/sae_vis): A library for visualizing SAE features, works with SAELens.
- [SAEBench](https://github.com/adamkarvonen/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}},
}
```
نیازمندی
| مقدار | نام |
|---|---|
| - | babe<0.0.8,>=0.0.7 |
| - | datasets>=3.1.0 |
| xtr | mamba-lens<0.0.5,>=0.0.4; |
| - | nltk<4.0.0,>=3.8.1 |
| - | plotly>=5.19.0 |
| - | plotly-express>=0.4.1 |
| - | python-dotenv>=1.0.1 |
| - | pyyaml<7.0.0,>=6.0.1 |
| - | safetensors<1.0.0,>=0.4.2 |
| - | simple-parsing<0.2.0,>=0.1.6 |
| - | tenacity>=9.0.0 |
| - | transformer-lens>=2.16.1 |
| - | transformers<6.0.0,>=4.38.1 |
| - | typing-extensions<5.0.0,>=4.10.0 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.10 | Python |
نحوه نصب
نصب پکیج whl sae-lens-6.9.1:
pip install sae-lens-6.9.1.whl
نصب پکیج tar.gz sae-lens-6.9.1:
pip install sae-lens-6.9.1.tar.gz