sae-lens 6.11.0__py3-none-any.whl → 6.12.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 +1 -1
- sae_lens/pretrained_saes.yaml +55 -1
- sae_lens/saes/batchtopk_sae.py +3 -2
- {sae_lens-6.11.0.dist-info → sae_lens-6.12.0.dist-info}/METADATA +1 -1
- {sae_lens-6.11.0.dist-info → sae_lens-6.12.0.dist-info}/RECORD +7 -7
- {sae_lens-6.11.0.dist-info → sae_lens-6.12.0.dist-info}/LICENSE +0 -0
- {sae_lens-6.11.0.dist-info → sae_lens-6.12.0.dist-info}/WHEEL +0 -0
sae_lens/__init__.py
CHANGED
sae_lens/pretrained_saes.yaml
CHANGED
|
@@ -14828,4 +14828,58 @@ mntss-gemma-2-2b-2.5m-clt-as-per-layer:
|
|
|
14828
14828
|
neuronpedia: gemma-2-2b/24-clt-hp
|
|
14829
14829
|
- id: layer_25
|
|
14830
14830
|
path: 25
|
|
14831
|
-
neuronpedia: gemma-2-2b/25-clt-hp
|
|
14831
|
+
neuronpedia: gemma-2-2b/25-clt-hp
|
|
14832
|
+
|
|
14833
|
+
llama-3.1-8b-instruct-andyrdt:
|
|
14834
|
+
conversion_func: dictionary_learning_1
|
|
14835
|
+
model: meta-llama/Llama-3.1-8B-Instruct
|
|
14836
|
+
repo_id: andyrdt/saes-llama-3.1-8b-instruct
|
|
14837
|
+
saes:
|
|
14838
|
+
- id: resid_post_layer_3_trainer_1
|
|
14839
|
+
path: resid_post_layer_3/trainer_1
|
|
14840
|
+
neuronpedia: llama3.1-8b-it/3-resid-post-ar
|
|
14841
|
+
- id: resid_post_layer_7_trainer_1
|
|
14842
|
+
path: resid_post_layer_7/trainer_1
|
|
14843
|
+
neuronpedia: llama3.1-8b-it/7-resid-post-ar
|
|
14844
|
+
- id: resid_post_layer_11_trainer_1
|
|
14845
|
+
path: resid_post_layer_11/trainer_1
|
|
14846
|
+
neuronpedia: llama3.1-8b-it/11-resid-post-ar
|
|
14847
|
+
- id: resid_post_layer_15_trainer_1
|
|
14848
|
+
path: resid_post_layer_15/trainer_1
|
|
14849
|
+
neuronpedia: llama3.1-8b-it/15-resid-post-ar
|
|
14850
|
+
- id: resid_post_layer_19_trainer_1
|
|
14851
|
+
path: resid_post_layer_19/trainer_1
|
|
14852
|
+
neuronpedia: llama3.1-8b-it/19-resid-post-ar
|
|
14853
|
+
- id: resid_post_layer_23_trainer_1
|
|
14854
|
+
path: resid_post_layer_23/trainer_1
|
|
14855
|
+
neuronpedia: llama3.1-8b-it/23-resid-post-ar
|
|
14856
|
+
- id: resid_post_layer_27_trainer_1
|
|
14857
|
+
path: resid_post_layer_27/trainer_1
|
|
14858
|
+
neuronpedia: llama3.1-8b-it/27-resid-post-ar
|
|
14859
|
+
|
|
14860
|
+
qwen2.5-7b-instruct-andyrdt:
|
|
14861
|
+
conversion_func: dictionary_learning_1
|
|
14862
|
+
model: Qwen/Qwen2.5-7B-Instruct
|
|
14863
|
+
repo_id: andyrdt/saes-qwen2.5-7b-instruct
|
|
14864
|
+
saes:
|
|
14865
|
+
- id: resid_post_layer_3_trainer_1
|
|
14866
|
+
path: resid_post_layer_3/trainer_1
|
|
14867
|
+
neuronpedia: qwen2.5-7b-it/3-resid-post-ar
|
|
14868
|
+
- id: resid_post_layer_7_trainer_1
|
|
14869
|
+
path: resid_post_layer_7/trainer_1
|
|
14870
|
+
neuronpedia: qwen2.5-7b-it/7-resid-post-ar
|
|
14871
|
+
- id: resid_post_layer_11_trainer_1
|
|
14872
|
+
path: resid_post_layer_11/trainer_1
|
|
14873
|
+
neuronpedia: qwen2.5-7b-it/11-resid-post-ar
|
|
14874
|
+
- id: resid_post_layer_15_trainer_1
|
|
14875
|
+
path: resid_post_layer_15/trainer_1
|
|
14876
|
+
neuronpedia: qwen2.5-7b-it/15-resid-post-ar
|
|
14877
|
+
- id: resid_post_layer_19_trainer_1
|
|
14878
|
+
path: resid_post_layer_19/trainer_1
|
|
14879
|
+
neuronpedia: qwen2.5-7b-it/19-resid-post-ar
|
|
14880
|
+
- id: resid_post_layer_23_trainer_1
|
|
14881
|
+
path: resid_post_layer_23/trainer_1
|
|
14882
|
+
neuronpedia: qwen2.5-7b-it/23-resid-post-ar
|
|
14883
|
+
- id: resid_post_layer_27_trainer_1
|
|
14884
|
+
path: resid_post_layer_27/trainer_1
|
|
14885
|
+
neuronpedia: qwen2.5-7b-it/27-resid-post-ar
|
sae_lens/saes/batchtopk_sae.py
CHANGED
|
@@ -15,7 +15,7 @@ class BatchTopK(nn.Module):
|
|
|
15
15
|
|
|
16
16
|
def __init__(
|
|
17
17
|
self,
|
|
18
|
-
k:
|
|
18
|
+
k: float,
|
|
19
19
|
):
|
|
20
20
|
super().__init__()
|
|
21
21
|
self.k = k
|
|
@@ -23,7 +23,7 @@ class BatchTopK(nn.Module):
|
|
|
23
23
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
|
24
24
|
acts = x.relu()
|
|
25
25
|
flat_acts = acts.flatten()
|
|
26
|
-
acts_topk_flat = torch.topk(flat_acts, self.k * acts.shape[0], dim=-1)
|
|
26
|
+
acts_topk_flat = torch.topk(flat_acts, int(self.k * acts.shape[0]), dim=-1)
|
|
27
27
|
return (
|
|
28
28
|
torch.zeros_like(flat_acts)
|
|
29
29
|
.scatter(-1, acts_topk_flat.indices, acts_topk_flat.values)
|
|
@@ -37,6 +37,7 @@ class BatchTopKTrainingSAEConfig(TopKTrainingSAEConfig):
|
|
|
37
37
|
Configuration class for training a BatchTopKTrainingSAE.
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
|
+
k: float = 100 # type: ignore[assignment]
|
|
40
41
|
topk_threshold_lr: float = 0.01
|
|
41
42
|
|
|
42
43
|
@override
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sae_lens/__init__.py,sha256=
|
|
1
|
+
sae_lens/__init__.py,sha256=kTzPE14dVRpEIV0_yFC9whYCiJt6hoMQ33YhgwO83EI,3589
|
|
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
|
|
@@ -12,10 +12,10 @@ sae_lens/loading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
12
12
|
sae_lens/loading/pretrained_sae_loaders.py,sha256=CVzHntSUKR1X3_gAqn8K_Ajq8D85qBrmrgEgU93IV4A,49609
|
|
13
13
|
sae_lens/loading/pretrained_saes_directory.py,sha256=4Vn-Jex6SveD7EbxcSOBv8cx1gkPfUMLU1QOP-ww1ZE,3752
|
|
14
14
|
sae_lens/pretokenize_runner.py,sha256=w0f6SfZLAxbp5eAAKnet8RqUB_DKofZ9RGsoJwFnYbA,7058
|
|
15
|
-
sae_lens/pretrained_saes.yaml,sha256=
|
|
15
|
+
sae_lens/pretrained_saes.yaml,sha256=n2BJVj8relA8OCbn9epJ5dFNg1_e9F9a4TouqjkXnts,602553
|
|
16
16
|
sae_lens/registry.py,sha256=nhy7BPSudSATqW4lo9H_k3Na7sfGHmAf9v-3wpnLL_o,1490
|
|
17
17
|
sae_lens/saes/__init__.py,sha256=jVwazK8Q6dW5J6_zFXPoNAuBvSxgziQ8eMOjGM3t-X8,1475
|
|
18
|
-
sae_lens/saes/batchtopk_sae.py,sha256=
|
|
18
|
+
sae_lens/saes/batchtopk_sae.py,sha256=GX_J0vH4vzeLqYxl0mkfsZQpFEoCEHMR4dIG8fz8N8w,3449
|
|
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/sae.py,sha256=gdUZuLaOHQrPjbDj-nZI813B6-_mNAnV9i9z4qTnpHk,38255
|
|
@@ -33,7 +33,7 @@ sae_lens/training/types.py,sha256=qSjmGzXf3MLalygG0psnVjmhX_mpLmL47MQtZfe7qxg,81
|
|
|
33
33
|
sae_lens/training/upload_saes_to_huggingface.py,sha256=r_WzI1zLtGZ5TzAxuG3xa_8T09j3zXJrWd_vzPsPGkQ,4469
|
|
34
34
|
sae_lens/tutorial/tsea.py,sha256=fd1am_XXsf2KMbByDapJo-2qlxduKaa62Z2qcQZ3QKU,18145
|
|
35
35
|
sae_lens/util.py,sha256=lW7fBn_b8quvRYlen9PUmB7km60YhKyjmuelB1f6KzQ,2253
|
|
36
|
-
sae_lens-6.
|
|
37
|
-
sae_lens-6.
|
|
38
|
-
sae_lens-6.
|
|
39
|
-
sae_lens-6.
|
|
36
|
+
sae_lens-6.12.0.dist-info/LICENSE,sha256=DW6e-hDosiu4CfW0-imI57sV1I5f9UEslpviNQcOAKs,1069
|
|
37
|
+
sae_lens-6.12.0.dist-info/METADATA,sha256=6L9rhKmaK8oQdRZ9-p0TxqpbBXCaY4bcwKqHP_NYnEw,5245
|
|
38
|
+
sae_lens-6.12.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
39
|
+
sae_lens-6.12.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|