Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ This repository contains 1 Sparse Autoencoder(s) (SAE) trained using [SAELens](h
|
|
| 24 |
|
| 25 |
| Hook Point |
|
| 26 |
|------------|
|
| 27 |
-
| `
|
| 28 |
|
| 29 |
## Usage
|
| 30 |
|
|
@@ -34,7 +34,7 @@ from sae_lens import SAE
|
|
| 34 |
# Load an SAE for a specific hook point
|
| 35 |
sae, cfg_dict, sparsity = SAE.from_pretrained(
|
| 36 |
release="rufimelo/secure_code_qwen_coder_topk_cl_16384",
|
| 37 |
-
sae_id="
|
| 38 |
)
|
| 39 |
|
| 40 |
# Use with TransformerLens
|
|
@@ -44,15 +44,15 @@ model = HookedTransformer.from_pretrained("Unknown")
|
|
| 44 |
|
| 45 |
# Get activations and encode
|
| 46 |
_, cache = model.run_with_cache("your text here")
|
| 47 |
-
activations = cache["
|
| 48 |
features = sae.encode(activations)
|
| 49 |
```
|
| 50 |
|
| 51 |
## Files
|
| 52 |
|
| 53 |
-
- `
|
| 54 |
-
- `
|
| 55 |
-
- `
|
| 56 |
|
| 57 |
## Training
|
| 58 |
|
|
|
|
| 24 |
|
| 25 |
| Hook Point |
|
| 26 |
|------------|
|
| 27 |
+
| `blocks.0.hook_resid_post` |
|
| 28 |
|
| 29 |
## Usage
|
| 30 |
|
|
|
|
| 34 |
# Load an SAE for a specific hook point
|
| 35 |
sae, cfg_dict, sparsity = SAE.from_pretrained(
|
| 36 |
release="rufimelo/secure_code_qwen_coder_topk_cl_16384",
|
| 37 |
+
sae_id="blocks.0.hook_resid_post" # Choose from available hook points above
|
| 38 |
)
|
| 39 |
|
| 40 |
# Use with TransformerLens
|
|
|
|
| 44 |
|
| 45 |
# Get activations and encode
|
| 46 |
_, cache = model.run_with_cache("your text here")
|
| 47 |
+
activations = cache["blocks.0.hook_resid_post"]
|
| 48 |
features = sae.encode(activations)
|
| 49 |
```
|
| 50 |
|
| 51 |
## Files
|
| 52 |
|
| 53 |
+
- `blocks.0.hook_resid_post/cfg.json` - SAE configuration
|
| 54 |
+
- `blocks.0.hook_resid_post/sae_weights.safetensors` - Model weights
|
| 55 |
+
- `blocks.0.hook_resid_post/sparsity.safetensors` - Feature sparsity statistics
|
| 56 |
|
| 57 |
## Training
|
| 58 |
|
blocks.0.hook_resid_post/cfg.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"d_in": 3584, "d_sae": 16384, "dtype": "float32", "device": "cuda", "apply_b_dec_to_input": true, "normalize_activations": "none", "reshape_activations": "none", "metadata": {"sae_lens_version": "6.26.2", "sae_lens_training_version": "6.26.2", "hook_name": "blocks.0.hook_resid_post"}, "decoder_init_norm": 0.1, "k": 64, "use_sparse_activations": false, "aux_loss_coefficient": 1.0, "rescale_acts_by_decoder_norm": true, "contrastive_weight": 0.1, "contrastive_temperature": 0.07, "contrastive_mode": "infonce", "triplet_margin": 1.0, "use_feature_contrastive": true, "architecture": "topk"}
|
blocks.0.hook_resid_post/sae_weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c70c16cf8ae3673518d9430615db54cb8ce3b6a9783bfcedfdfdf89e131f22e
|
| 3 |
+
size 469842240
|
blocks.0.hook_resid_post/sparsity.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c3a2e5a5d501d69d6a47634f884932d3336e0288f3ce1bdd50a325360ec8233
|
| 3 |
+
size 65616
|