sae-lens 6.16.3__py3-none-any.whl → 6.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sae_lens/__init__.py +6 -1
- sae_lens/cache_activations_runner.py +1 -1
- sae_lens/config.py +39 -2
- sae_lens/constants.py +1 -0
- sae_lens/llm_sae_training_runner.py +9 -4
- sae_lens/loading/pretrained_sae_loaders.py +188 -0
- sae_lens/loading/pretrained_saes_directory.py +5 -3
- sae_lens/pretrained_saes.yaml +75 -1
- sae_lens/saes/__init__.py +3 -0
- sae_lens/saes/sae.py +11 -13
- sae_lens/saes/temporal_sae.py +372 -0
- sae_lens/training/activation_scaler.py +7 -0
- sae_lens/training/activations_store.py +47 -4
- sae_lens/training/optim.py +11 -0
- sae_lens/training/sae_trainer.py +49 -11
- {sae_lens-6.16.3.dist-info → sae_lens-6.21.0.dist-info}/METADATA +16 -16
- {sae_lens-6.16.3.dist-info → sae_lens-6.21.0.dist-info}/RECORD +19 -18
- {sae_lens-6.16.3.dist-info → sae_lens-6.21.0.dist-info}/WHEEL +0 -0
- {sae_lens-6.16.3.dist-info → sae_lens-6.21.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sae-lens
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.21.0
|
|
4
4
|
Summary: Training and Analyzing Sparse Autoencoders (SAEs)
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -30,19 +30,19 @@ Requires-Dist: tenacity (>=9.0.0)
|
|
|
30
30
|
Requires-Dist: transformer-lens (>=2.16.1,<3.0.0)
|
|
31
31
|
Requires-Dist: transformers (>=4.38.1,<5.0.0)
|
|
32
32
|
Requires-Dist: typing-extensions (>=4.10.0,<5.0.0)
|
|
33
|
-
Project-URL: Homepage, https://
|
|
34
|
-
Project-URL: Repository, https://github.com/
|
|
33
|
+
Project-URL: Homepage, https://decoderesearch.github.io/SAELens
|
|
34
|
+
Project-URL: Repository, https://github.com/decoderesearch/SAELens
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
|
|
37
|
-
<img width="1308"
|
|
37
|
+
<img width="1308" height="532" alt="saes_pic" src="https://github.com/user-attachments/assets/2a5d752f-b261-4ee4-ad5d-ebf282321371" />
|
|
38
38
|
|
|
39
39
|
# SAE Lens
|
|
40
40
|
|
|
41
41
|
[](https://pypi.org/project/sae-lens/)
|
|
42
42
|
[](https://opensource.org/licenses/MIT)
|
|
43
|
-
[](https://github.com/decoderesearch/SAELens/actions/workflows/build.yml)
|
|
44
|
+
[](https://github.com/decoderesearch/SAELens/actions/workflows/deploy_docs.yml)
|
|
45
|
+
[](https://codecov.io/gh/decoderesearch/SAELens)
|
|
46
46
|
|
|
47
47
|
SAELens exists to help researchers:
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ SAELens exists to help researchers:
|
|
|
50
50
|
- Analyse sparse autoencoders / research mechanistic interpretability.
|
|
51
51
|
- Generate insights which make it easier to create safe and aligned AI systems.
|
|
52
52
|
|
|
53
|
-
Please refer to the [documentation](https://
|
|
53
|
+
Please refer to the [documentation](https://decoderesearch.github.io/SAELens/) for information on how to:
|
|
54
54
|
|
|
55
55
|
- Download and Analyse pre-trained sparse autoencoders.
|
|
56
56
|
- Train your own sparse autoencoders.
|
|
@@ -58,25 +58,25 @@ Please refer to the [documentation](https://jbloomaus.github.io/SAELens/) for in
|
|
|
58
58
|
|
|
59
59
|
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/).
|
|
60
60
|
|
|
61
|
-
This library is maintained by [Joseph Bloom](https://www.
|
|
61
|
+
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).
|
|
62
62
|
|
|
63
63
|
## Loading Pre-trained SAEs.
|
|
64
64
|
|
|
65
|
-
Pre-trained SAEs for various models can be imported via SAE Lens. See this [page](https://
|
|
65
|
+
Pre-trained SAEs for various models can be imported via SAE Lens. See this [page](https://decoderesearch.github.io/SAELens/sae_table/) in the readme for a list of all SAEs.
|
|
66
66
|
|
|
67
67
|
## Migrating to SAELens v6
|
|
68
68
|
|
|
69
|
-
The new v6 update is a major refactor to SAELens and changes the way training code is structured. Check out the [migration guide](https://
|
|
69
|
+
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.
|
|
70
70
|
|
|
71
71
|
## Tutorials
|
|
72
72
|
|
|
73
|
-
- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[](https://githubtocolab.com/
|
|
73
|
+
- [SAE Lens + Neuronpedia](tutorials/tutorial_2_0.ipynb)[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/tutorial_2_0.ipynb)
|
|
74
74
|
- [Loading and Analysing Pre-Trained Sparse Autoencoders](tutorials/basic_loading_and_analysing.ipynb)
|
|
75
|
-
[](https://githubtocolab.com/
|
|
75
|
+
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/basic_loading_and_analysing.ipynb)
|
|
76
76
|
- [Understanding SAE Features with the Logit Lens](tutorials/logits_lens_with_features.ipynb)
|
|
77
|
-
[](https://githubtocolab.com/
|
|
77
|
+
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/logits_lens_with_features.ipynb)
|
|
78
78
|
- [Training a Sparse Autoencoder](tutorials/training_a_sparse_autoencoder.ipynb)
|
|
79
|
-
[](https://githubtocolab.com/
|
|
79
|
+
[](https://githubtocolab.com/decoderesearch/SAELens/blob/main/tutorials/training_a_sparse_autoencoder.ipynb)
|
|
80
80
|
|
|
81
81
|
## Join the Slack!
|
|
82
82
|
|
|
@@ -91,7 +91,7 @@ Please cite the package as follows:
|
|
|
91
91
|
title = {SAELens},
|
|
92
92
|
author = {Bloom, Joseph and Tigges, Curt and Duong, Anthony and Chanin, David},
|
|
93
93
|
year = {2024},
|
|
94
|
-
howpublished = {\url{https://github.com/
|
|
94
|
+
howpublished = {\url{https://github.com/decoderesearch/SAELens}},
|
|
95
95
|
}
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
sae_lens/__init__.py,sha256=
|
|
1
|
+
sae_lens/__init__.py,sha256=P97iQ9YQGEa7PjR9_--pkEA-0WS9D_O7BkDNZ_qsxdA,4033
|
|
2
2
|
sae_lens/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
sae_lens/analysis/hooked_sae_transformer.py,sha256=vRu6JseH1lZaEeILD5bEkQEQ1wYHHDcxD-f2olKmE9Y,14275
|
|
4
4
|
sae_lens/analysis/neuronpedia_integration.py,sha256=Gx1W7hUBEuMoasNcnOnZ1wmqbXDd1pSZ1nqKEya1HQc,4962
|
|
5
|
-
sae_lens/cache_activations_runner.py,sha256=
|
|
6
|
-
sae_lens/config.py,sha256=
|
|
7
|
-
sae_lens/constants.py,sha256=
|
|
5
|
+
sae_lens/cache_activations_runner.py,sha256=KFR5SHZt_fy3iLBtHd_aBG-fskAqEtRE-7A-nqy1L-w,12588
|
|
6
|
+
sae_lens/config.py,sha256=fxvpQxFfPOVUkryiHD19q9O1AJDSkIguWeYlbJuTxmY,30329
|
|
7
|
+
sae_lens/constants.py,sha256=qX12uAE_xkha6hjss_0MGTbakI7gEkJzHABkZaHWQFU,683
|
|
8
8
|
sae_lens/evals.py,sha256=P0NUsJeGzYxFBiVKhbPzd72IFKY4gH40HHlEZ3jEAmg,39598
|
|
9
|
-
sae_lens/llm_sae_training_runner.py,sha256=
|
|
9
|
+
sae_lens/llm_sae_training_runner.py,sha256=M7BK55gSFYu2qFQKABHX3c8i46P1LfODCeyHFzGGuqU,15196
|
|
10
10
|
sae_lens/load_model.py,sha256=C8AMykctj6H7tz_xRwB06-EXj6TfW64PtSJZR5Jxn1Y,8649
|
|
11
11
|
sae_lens/loading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
sae_lens/loading/pretrained_sae_loaders.py,sha256=
|
|
13
|
-
sae_lens/loading/pretrained_saes_directory.py,sha256=
|
|
12
|
+
sae_lens/loading/pretrained_sae_loaders.py,sha256=X-gVZ4A74E85lSMFMsZ_rEQhHlR9AYFwhxvoA_vt2CQ,56051
|
|
13
|
+
sae_lens/loading/pretrained_saes_directory.py,sha256=hejNfLUepYCSGPalRfQwxxCEUqMMUPsn1tufwvwct5k,3820
|
|
14
14
|
sae_lens/pretokenize_runner.py,sha256=x-reJzVPFDS9iRFbZtrFYSzNguJYki9gd0pbHjYJ3r4,7085
|
|
15
|
-
sae_lens/pretrained_saes.yaml,sha256=
|
|
15
|
+
sae_lens/pretrained_saes.yaml,sha256=trDRsAS7Tlm5LPGVGi2pa2iidrghahtsjL_O2DfSSEw,604874
|
|
16
16
|
sae_lens/registry.py,sha256=nhy7BPSudSATqW4lo9H_k3Na7sfGHmAf9v-3wpnLL_o,1490
|
|
17
|
-
sae_lens/saes/__init__.py,sha256=
|
|
17
|
+
sae_lens/saes/__init__.py,sha256=nTNPnJ7edyfedo1MX96xwn9WOG8504yHbT9LFw9od_0,1778
|
|
18
18
|
sae_lens/saes/batchtopk_sae.py,sha256=x4EbgZl0GUickRPcCmtKNGS2Ra3Uy1Z1OtF2FnrSabQ,5422
|
|
19
19
|
sae_lens/saes/gated_sae.py,sha256=qcmM9JwBA8aZR8z_IRHV1_gQX-q_63tKewWXRnhdXuo,8986
|
|
20
20
|
sae_lens/saes/jumprelu_sae.py,sha256=HHBF1sJ95lZvxwP5vwLSQFKdnJN2KKYK0WAEaLTrta0,13399
|
|
21
21
|
sae_lens/saes/matryoshka_batchtopk_sae.py,sha256=4_1cVaxk6c6jgJEbxqebtG-cjQNIzaMAfjSPGfR7_VU,6062
|
|
22
|
-
sae_lens/saes/sae.py,sha256=
|
|
22
|
+
sae_lens/saes/sae.py,sha256=i6HwULvCrFQhRqKruCQo2aOY5a7c6FuUX7sD3TbnNTY,38084
|
|
23
23
|
sae_lens/saes/standard_sae.py,sha256=9UqYyYtQuThYxXKNaDjYcyowpOx2-7cShG-TeUP6JCQ,5940
|
|
24
|
+
sae_lens/saes/temporal_sae.py,sha256=jnHBqz3FvKMOw_lH2aGIJqgrMVJbpprronittCGGXPQ,13517
|
|
24
25
|
sae_lens/saes/topk_sae.py,sha256=tzQM5eQFifMe--8_8NUBYWY7hpjQa6A_olNe6U71FE8,21275
|
|
25
26
|
sae_lens/saes/transcoder.py,sha256=BfLSbTYVNZh-ruGxseZiZJ_acEL6_7QyTdfqUr0lDOg,12156
|
|
26
27
|
sae_lens/tokenization_and_batching.py,sha256=D_o7cXvRqhT89H3wNzoRymNALNE6eHojBWLdXOUwUGE,5438
|
|
27
28
|
sae_lens/training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
sae_lens/training/activation_scaler.py,sha256=
|
|
29
|
-
sae_lens/training/activations_store.py,sha256=
|
|
29
|
+
sae_lens/training/activation_scaler.py,sha256=FzNfgBplLWmyiSlZ6TUvE-nur3lOiGTrlvC97ys8S24,1973
|
|
30
|
+
sae_lens/training/activations_store.py,sha256=7fWUahMUqrvHhN5b_8Ma6kJX1NkRbIqNuNKzKvYmHFQ,33881
|
|
30
31
|
sae_lens/training/mixing_buffer.py,sha256=vDpYG5ZE70szDvBsRKcNHEES3h_WTKJ16qDYk5jPOVA,2015
|
|
31
|
-
sae_lens/training/optim.py,sha256=
|
|
32
|
-
sae_lens/training/sae_trainer.py,sha256=
|
|
32
|
+
sae_lens/training/optim.py,sha256=bJpqqcK4enkcPvQAJkeH4Ci1LUOlfjIMTv6-IlaAbRA,5588
|
|
33
|
+
sae_lens/training/sae_trainer.py,sha256=zhkabyIKxI_tZTV3_kwz6zMrHZ95Ecr97krmwc-9ffs,17600
|
|
33
34
|
sae_lens/training/types.py,sha256=1FpLx_Doda9vZpmfm-x1e8wGBYpyhe9Kpb_JuM5nIFM,90
|
|
34
35
|
sae_lens/training/upload_saes_to_huggingface.py,sha256=r_WzI1zLtGZ5TzAxuG3xa_8T09j3zXJrWd_vzPsPGkQ,4469
|
|
35
36
|
sae_lens/tutorial/tsea.py,sha256=fd1am_XXsf2KMbByDapJo-2qlxduKaa62Z2qcQZ3QKU,18145
|
|
36
37
|
sae_lens/util.py,sha256=tCovQ-eZa1L7thPpNDL6PGOJrIMML2yLI5e0EHCOpS8,3309
|
|
37
|
-
sae_lens-6.
|
|
38
|
-
sae_lens-6.
|
|
39
|
-
sae_lens-6.
|
|
40
|
-
sae_lens-6.
|
|
38
|
+
sae_lens-6.21.0.dist-info/METADATA,sha256=ZgrnVgZyTjJk-XmNZG1xHUJqdXoO0ldyFZgElVWVVno,5369
|
|
39
|
+
sae_lens-6.21.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
40
|
+
sae_lens-6.21.0.dist-info/licenses/LICENSE,sha256=DW6e-hDosiu4CfW0-imI57sV1I5f9UEslpviNQcOAKs,1069
|
|
41
|
+
sae_lens-6.21.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|