transcoder replicate bilinear-2layer-seed2-layer1-r7: weights, config, training record
Browse files- README.md +76 -0
- config.json +15 -0
- transcoder.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
tags:
|
| 4 |
+
- interpretability
|
| 5 |
+
- transcoder
|
| 6 |
+
- sparse-autoencoder
|
| 7 |
+
- arithmetic
|
| 8 |
+
- replicate
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# transcoder-bilinear-2layer-seed2-layer1-r7
|
| 12 |
+
|
| 13 |
+
Replicate **7** of 10, of a TopK transcoder fitted to **layer
|
| 14 |
+
1** of
|
| 15 |
+
[`itzPotato/arithmetic-bilinear-2layer-seed2`](https://huggingface.co/itzPotato/arithmetic-bilinear-2layer-seed2).
|
| 16 |
+
|
| 17 |
+
## What varies across the 10 replicates
|
| 18 |
+
|
| 19 |
+
**The training data subset, and only that.** Each replicate draws a fresh
|
| 20 |
+
500,000-problem training subset from the base model's train
|
| 21 |
+
split. The transcoder's weight initialisation is **identical** across all ten
|
| 22 |
+
(`seed=0`), so the spread across replicates measures variance due
|
| 23 |
+
to the training data with the initialisation held constant.
|
| 24 |
+
|
| 25 |
+
This is deliberately not the usual "vary the training seed" replicate. It was
|
| 26 |
+
specified this way so that data variance and initialisation variance are not
|
| 27 |
+
confounded.
|
| 28 |
+
|
| 29 |
+
| | |
|
| 30 |
+
|---|---|
|
| 31 |
+
| varies | training data subset |
|
| 32 |
+
| held fixed | weight init (`seed=0`), validation slice, all hyperparameters |
|
| 33 |
+
| this replicate's subset seed | `1021007` |
|
| 34 |
+
| this replicate's subset digest | `18a0e44c32c346cc` |
|
| 35 |
+
|
| 36 |
+
**The validation slice does not move.** It is the reserved
|
| 37 |
+
`[500,000, 510,000)`
|
| 38 |
+
problems used by every transcoder in this project, so reconstruction numbers are
|
| 39 |
+
comparable across replicates. Training draws exclude it, so no replicate ever
|
| 40 |
+
trains on its own validation data.
|
| 41 |
+
|
| 42 |
+
**Training subsets overlap.** Ten disjoint 500,000-problem
|
| 43 |
+
slices plus the 10,000 validation problems would need more of
|
| 44 |
+
the split than exists, so draws are independent rather than a partition, and two
|
| 45 |
+
replicates share roughly 10% of their problems in expectation.
|
| 46 |
+
|
| 47 |
+
## Architecture and recipe
|
| 48 |
+
|
| 49 |
+
Identical to [`itzPotato/transcoder-bilinear-2layer-seed2-layer1`](https://huggingface.co/itzPotato/transcoder-bilinear-2layer-seed2-layer1), the
|
| 50 |
+
single non-replicate transcoder for this layer:
|
| 51 |
+
|
| 52 |
+
| | |
|
| 53 |
+
|---|---|
|
| 54 |
+
| d_model (in and out) | 32 |
|
| 55 |
+
| features | 1024 (32x expansion) |
|
| 56 |
+
| active features per input (k) | 32 |
|
| 57 |
+
| decoder rows | unit norm |
|
| 58 |
+
| loss | MSE only, no L1, no lambda |
|
| 59 |
+
| optimiser | Adam, lr 0.0003, batches of 4096 activation vectors, one pass |
|
| 60 |
+
|
| 61 |
+
## Reconstruction
|
| 62 |
+
|
| 63 |
+
| | |
|
| 64 |
+
|---|---:|
|
| 65 |
+
| normalized reconstruction error | **0.0448** |
|
| 66 |
+
| fraction of variance unexplained | 0.0582 |
|
| 67 |
+
| raw MSE | 12.5139 |
|
| 68 |
+
|
| 69 |
+
`normalized = MSE / mean(target^2)`; predicting a constant zero scores 1.0.
|
| 70 |
+
|
| 71 |
+
## Loading
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from src.transcoder.source import load_transcoder
|
| 75 |
+
transcoder, provenance = load_transcoder("hub:itzPotato/transcoder-bilinear-2layer-seed2-layer1-r7", require_pinned=True)
|
| 76 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"d_model": 32,
|
| 3 |
+
"expansion": 32,
|
| 4 |
+
"k": 32,
|
| 5 |
+
"lr": 0.0003,
|
| 6 |
+
"batch_size": 4096,
|
| 7 |
+
"seed": 0,
|
| 8 |
+
"unit_norm_decoder": true,
|
| 9 |
+
"n_features": 1024,
|
| 10 |
+
"layer": 1,
|
| 11 |
+
"base_source": "trained:bilinear-2layer-seed2",
|
| 12 |
+
"replicate": 7,
|
| 13 |
+
"init_seed": 0,
|
| 14 |
+
"train_subset_seed": 1021007
|
| 15 |
+
}
|
transcoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22ac8efe94b840bfbcd0b0ceab39174a7c9a8dbe378ad6b096a26d18f3712c0b
|
| 3 |
+
size 266656
|