hematteo commited on
Commit
7e1f5f4
·
verified ·
1 Parent(s): 3acae36

docs: add manifest.json; describe the two checkpoint layouts, the Appendix E source and the centering choice

Browse files
Files changed (2) hide show
  1. README.md +23 -10
  2. manifest.json +323 -0
README.md CHANGED
@@ -50,7 +50,9 @@ below.
50
 
51
  ## Checkpoints
52
 
53
- Layout: `<model>/<operating_point>/checkpoint.pt`.
 
 
54
 
55
  | Path | base model | width | d_features | k | rowEV | top-1 | KL (bits) |
56
  |---|---|---|---:|---:|---:|---:|---:|
@@ -78,7 +80,8 @@ argmaxes on held-out hidden states, and `KL` is the readout KL in bits. The
78
  Qwen and Gemma numbers come from the paper's selection tables (Appendices C
79
  and D), with the Gemma top-1/KL computed through the final-logit softcap
80
  (softcap-correct, see the paper). The Ministral and R1-Distill numbers are
81
- the checkpoints' held-out eval.
 
82
 
83
  ## How they were trained
84
 
@@ -99,14 +102,24 @@ path = hf_hub_download("hematteo/sparse-readout-prism", "qwen3.5-2b/k256_32x/che
99
  sae = load_factorizer(path, freeze=True) # rebuild + load_state_dict + eval, one call
100
  ```
101
 
102
- Each `checkpoint.pt` is a `weights_only=True`-loadable dict with
103
- `model_state_dict` (encoder / decoder / biases) and the factorizer config
104
- (`architecture`, `k`, `d_features`), and `load_factorizer` resolves it
105
- whether the config sits under `factorizer` or `config.factorizer`. To
106
- decompose you also need the centered and row-normalized preprocessing —
107
- recompute it from the model's `W_U` with `preprocess_rows(W_U)` (the
108
- Ministral / R1-Distill checkpoints additionally embed `row_mean` /
109
- `row_norms`). Decomposing against a different preprocessing breaks the
 
 
 
 
 
 
 
 
 
 
110
  identity. See the GitHub README quickstart for the full decomposition
111
  snippet.
112
 
 
50
 
51
  ## Checkpoints
52
 
53
+ Layout: `<model>/<operating_point>/checkpoint.pt`. A machine-readable copy
54
+ of the table below, with file sizes and each file's layout, is
55
+ [`manifest.json`](manifest.json).
56
 
57
  | Path | base model | width | d_features | k | rowEV | top-1 | KL (bits) |
58
  |---|---|---|---:|---:|---:|---:|---:|
 
80
  Qwen and Gemma numbers come from the paper's selection tables (Appendices C
81
  and D), with the Gemma top-1/KL computed through the final-logit softcap
82
  (softcap-correct, see the paper). The Ministral and R1-Distill numbers are
83
+ the checkpoints' held-out eval, stored in each file under `metrics` and
84
+ reported in the paper's Appendix E.
85
 
86
  ## How they were trained
87
 
 
102
  sae = load_factorizer(path, freeze=True) # rebuild + load_state_dict + eval, one call
103
  ```
104
 
105
+ Each `checkpoint.pt` is a `weights_only=True`-loadable dict. Two layouts
106
+ ship, and `load_factorizer` handles both:
107
+
108
+ - Qwen and Gemma files hold `model_state_dict` and `config`, the full
109
+ training config, with the factorizer block (`architecture`, `k`,
110
+ `d_features`) under `config.factorizer`. No row statistics are embedded.
111
+ - Ministral and R1-Distill files hold `model_state_dict`, a top-level
112
+ `factorizer` block, `evaluation`, the held-out `metrics`, and the
113
+ preprocessing pinned at training time as `row_mean`, `row_norms` and
114
+ `row_token_ids`.
115
+
116
+ To decompose you also need the centered and row-normalized preprocessing.
117
+ Recompute it from the model's `W_U` with `preprocess_rows(W_U)`, which
118
+ centers on the mean of all of `W_U`. That is what the paper's analysis runs
119
+ use, while training centered on the text-token rows only; on Qwen3.5-2B the
120
+ two means differ by about 0.04% of a centered row norm. The code's
121
+ `--centering {live,trained}` flag selects between them, and `live` is the
122
+ paper's default. Decomposing against a different preprocessing breaks the
123
  identity. See the GitHub README quickstart for the full decomposition
124
  snippet.
125
 
manifest.json ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "hematteo/sparse-readout-prism",
3
+ "generated": "2026-09-03",
4
+ "paper": {
5
+ "title": "Sparse Readout Prism: Explaining Logit-Lens Scores in Features Instead of Tokens",
6
+ "arxiv": "2609.01936",
7
+ "url": "https://arxiv.org/abs/2609.01936"
8
+ },
9
+ "code": {
10
+ "repo": "https://github.com/hematteo/sparse-readout-prism",
11
+ "version": "0.2.2",
12
+ "registry": "configs/registries/exp2_selected_sae_checkpoints.yaml",
13
+ "loader": "sparse_readout_prism.load_factorizer"
14
+ },
15
+ "file_layout": "<model>/<operating_point>/checkpoint.pt",
16
+ "metrics": {
17
+ "rowEV": "row-centered explained variance of the reconstructed unembedding rows (held-out)",
18
+ "top1": "argmax agreement of the reconstructed readout with the original on held-out hidden states",
19
+ "KL_bits": "readout KL in bits; Gemma values computed through the final-logit softcap"
20
+ },
21
+ "layouts": {
22
+ "config": {
23
+ "keys": [
24
+ "model_state_dict",
25
+ "config"
26
+ ],
27
+ "factorizer_block": "config.factorizer",
28
+ "embeds_row_stats": false,
29
+ "embeds_metrics": false,
30
+ "note": "config holds the full training config (data, factorizer, training, run)"
31
+ },
32
+ "flat": {
33
+ "keys": [
34
+ "model_state_dict",
35
+ "factorizer",
36
+ "evaluation",
37
+ "row_mean",
38
+ "row_norms",
39
+ "row_token_ids",
40
+ "metrics"
41
+ ],
42
+ "factorizer_block": "factorizer",
43
+ "embeds_row_stats": true,
44
+ "embeds_metrics": true,
45
+ "note": "row_mean/row_norms are the preprocessing pinned at training time; metrics is the held-out eval"
46
+ }
47
+ },
48
+ "preprocessing": "rows centered then L2-normalized; the paper's analysis runs center on the live full-vocabulary mean of W_U (preprocess_rows(W_U); --centering live), training centered on the text-token rows",
49
+ "checkpoints": [
50
+ {
51
+ "id": "gemma_e2b_k128",
52
+ "path": "gemma-4-e2b/k128_16x/checkpoint.pt",
53
+ "model": "Gemma-4-E2B",
54
+ "base_model": "google/gemma-4-E2B-it",
55
+ "width": "16x",
56
+ "d_features": 24576,
57
+ "d_model": 1536,
58
+ "k": 128,
59
+ "rowEV": 0.714,
60
+ "top1": 0.623,
61
+ "KL_bits": 1.94,
62
+ "size_bytes": 302091735,
63
+ "layout": "config",
64
+ "metrics_source": "paper Appendix C (selection table), softcap-correct top-1/KL"
65
+ },
66
+ {
67
+ "id": "gemma_e2b_k256",
68
+ "path": "gemma-4-e2b/k256_32x/checkpoint.pt",
69
+ "model": "Gemma-4-E2B",
70
+ "base_model": "google/gemma-4-E2B-it",
71
+ "width": "32x",
72
+ "d_features": 49152,
73
+ "d_model": 1536,
74
+ "k": 256,
75
+ "rowEV": 0.834,
76
+ "top1": 0.333,
77
+ "KL_bits": 6.37,
78
+ "size_bytes": 604179927,
79
+ "layout": "config",
80
+ "metrics_source": "paper Appendix C (selection table), softcap-correct top-1/KL"
81
+ },
82
+ {
83
+ "id": "gemma_e4b_k128",
84
+ "path": "gemma-4-e4b/k128_16x/checkpoint.pt",
85
+ "model": "Gemma-4-E4B",
86
+ "base_model": "google/gemma-4-E4B-it",
87
+ "width": "16x",
88
+ "d_features": 40960,
89
+ "d_model": 2560,
90
+ "k": 128,
91
+ "rowEV": 0.693,
92
+ "top1": 0.669,
93
+ "KL_bits": 1.82,
94
+ "size_bytes": 839028183,
95
+ "layout": "config",
96
+ "metrics_source": "paper Appendix C (selection table), softcap-correct top-1/KL"
97
+ },
98
+ {
99
+ "id": "gemma_e4b_k256",
100
+ "path": "gemma-4-e4b/k256_32x/checkpoint.pt",
101
+ "model": "Gemma-4-E4B",
102
+ "base_model": "google/gemma-4-E4B-it",
103
+ "width": "32x",
104
+ "d_features": 81920,
105
+ "d_model": 2560,
106
+ "k": 256,
107
+ "rowEV": 0.827,
108
+ "top1": 0.736,
109
+ "KL_bits": 1.22,
110
+ "size_bytes": 1678052823,
111
+ "layout": "config",
112
+ "metrics_source": "paper Appendix C (selection table), softcap-correct top-1/KL"
113
+ },
114
+ {
115
+ "id": "ministral8b_k128",
116
+ "path": "ministral-3-8b/k128_16x/checkpoint.pt",
117
+ "model": "Ministral-3-8B-Base",
118
+ "base_model": "mistralai/Ministral-3-8B-Base-2512",
119
+ "width": "16x",
120
+ "d_features": 65536,
121
+ "d_model": 4096,
122
+ "k": 128,
123
+ "rowEV": 0.806,
124
+ "top1": 0.885,
125
+ "KL_bits": 0.13,
126
+ "size_bytes": 2149339577,
127
+ "layout": "flat",
128
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
129
+ },
130
+ {
131
+ "id": "ministral8b_k256",
132
+ "path": "ministral-3-8b/k256_32x/checkpoint.pt",
133
+ "model": "Ministral-3-8B-Base",
134
+ "base_model": "mistralai/Ministral-3-8B-Base-2512",
135
+ "width": "32x",
136
+ "d_features": 131072,
137
+ "d_model": 4096,
138
+ "k": 256,
139
+ "rowEV": 0.888,
140
+ "top1": 0.904,
141
+ "KL_bits": 0.087,
142
+ "size_bytes": 4297085449,
143
+ "layout": "flat",
144
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
145
+ },
146
+ {
147
+ "id": "qwen0p8b_k128",
148
+ "path": "qwen3.5-0.8b/k128_16x/checkpoint.pt",
149
+ "model": "Qwen3.5-0.8B",
150
+ "base_model": "Qwen/Qwen3.5-0.8B",
151
+ "width": "16x",
152
+ "d_features": 16384,
153
+ "d_model": 1024,
154
+ "k": 128,
155
+ "rowEV": 0.76,
156
+ "top1": 0.844,
157
+ "KL_bits": 0.277,
158
+ "size_bytes": 134286807,
159
+ "layout": "config",
160
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
161
+ },
162
+ {
163
+ "id": "qwen0p8b_k256",
164
+ "path": "qwen3.5-0.8b/k256_32x/checkpoint.pt",
165
+ "model": "Qwen3.5-0.8B",
166
+ "base_model": "Qwen/Qwen3.5-0.8B",
167
+ "width": "32x",
168
+ "d_features": 32768,
169
+ "d_model": 1024,
170
+ "k": 256,
171
+ "rowEV": 0.877,
172
+ "top1": 0.891,
173
+ "KL_bits": 0.135,
174
+ "size_bytes": 268570071,
175
+ "layout": "config",
176
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
177
+ },
178
+ {
179
+ "id": "qwen2b_k128",
180
+ "path": "qwen3.5-2b/k128_16x/checkpoint.pt",
181
+ "model": "Qwen3.5-2B",
182
+ "base_model": "Qwen/Qwen3.5-2B",
183
+ "width": "16x",
184
+ "d_features": 32768,
185
+ "d_model": 2048,
186
+ "k": 128,
187
+ "rowEV": 0.712,
188
+ "top1": 0.858,
189
+ "KL_bits": 0.261,
190
+ "size_bytes": 537005527,
191
+ "layout": "config",
192
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
193
+ },
194
+ {
195
+ "id": "qwen2b_k256",
196
+ "path": "qwen3.5-2b/k256_32x/checkpoint.pt",
197
+ "model": "Qwen3.5-2B",
198
+ "base_model": "Qwen/Qwen3.5-2B",
199
+ "width": "32x",
200
+ "d_features": 65536,
201
+ "d_model": 2048,
202
+ "k": 256,
203
+ "rowEV": 0.847,
204
+ "top1": 0.887,
205
+ "KL_bits": 0.136,
206
+ "size_bytes": 1074007511,
207
+ "layout": "config",
208
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
209
+ },
210
+ {
211
+ "id": "qwen9b_k128_fixed",
212
+ "path": "qwen3.5-9b/k128_8x/checkpoint.pt",
213
+ "model": "Qwen3.5-9B",
214
+ "base_model": "Qwen/Qwen3.5-9B",
215
+ "width": "8x",
216
+ "d_features": 32768,
217
+ "d_model": 4096,
218
+ "k": 128,
219
+ "rowEV": 0.621,
220
+ "top1": 0.846,
221
+ "KL_bits": 0.296,
222
+ "size_bytes": 1073876183,
223
+ "layout": "config",
224
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
225
+ },
226
+ {
227
+ "id": "qwen9b_k256_16x",
228
+ "path": "qwen3.5-9b/k256_16x/checkpoint.pt",
229
+ "model": "Qwen3.5-9B",
230
+ "base_model": "Qwen/Qwen3.5-9B",
231
+ "width": "16x",
232
+ "d_features": 65536,
233
+ "d_model": 4096,
234
+ "k": 256,
235
+ "rowEV": 0.761,
236
+ "top1": 0.874,
237
+ "KL_bits": 0.167,
238
+ "size_bytes": 2147749079,
239
+ "layout": "config",
240
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
241
+ },
242
+ {
243
+ "id": "qwen9b_k256_32x",
244
+ "path": "qwen3.5-9b/k256_32x/checkpoint.pt",
245
+ "model": "Qwen3.5-9B",
246
+ "base_model": "Qwen/Qwen3.5-9B",
247
+ "width": "32x",
248
+ "d_features": 131072,
249
+ "d_model": 4096,
250
+ "k": 256,
251
+ "rowEV": 0.857,
252
+ "top1": 0.9,
253
+ "KL_bits": 0.105,
254
+ "size_bytes": 4295495171,
255
+ "layout": "config",
256
+ "metrics_source": "paper Appendix C (selection table); the 9B 8x point is in Appendices D and F"
257
+ },
258
+ {
259
+ "id": "r1dist_llama8b_k128",
260
+ "path": "r1-distill-llama-8b/k128_16x/checkpoint.pt",
261
+ "model": "R1-Distill-Llama-8B",
262
+ "base_model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
263
+ "width": "16x",
264
+ "d_features": 65536,
265
+ "d_model": 4096,
266
+ "k": 128,
267
+ "rowEV": 0.796,
268
+ "top1": 0.725,
269
+ "KL_bits": 0.536,
270
+ "size_bytes": 2149305849,
271
+ "layout": "flat",
272
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
273
+ },
274
+ {
275
+ "id": "r1dist_llama8b_k256",
276
+ "path": "r1-distill-llama-8b/k256_32x/checkpoint.pt",
277
+ "model": "R1-Distill-Llama-8B",
278
+ "base_model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
279
+ "width": "32x",
280
+ "d_features": 131072,
281
+ "d_model": 4096,
282
+ "k": 256,
283
+ "rowEV": 0.888,
284
+ "top1": 0.754,
285
+ "KL_bits": 0.434,
286
+ "size_bytes": 4297051721,
287
+ "layout": "flat",
288
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
289
+ },
290
+ {
291
+ "id": "r1dist_qwen7b_k128",
292
+ "path": "r1-distill-qwen-7b/k128_16x/checkpoint.pt",
293
+ "model": "R1-Distill-Qwen-7B",
294
+ "base_model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
295
+ "width": "16x",
296
+ "d_features": 57344,
297
+ "d_model": 3584,
298
+ "k": 128,
299
+ "rowEV": 0.709,
300
+ "top1": 0.695,
301
+ "KL_bits": 0.777,
302
+ "size_bytes": 1646240185,
303
+ "layout": "flat",
304
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
305
+ },
306
+ {
307
+ "id": "r1dist_qwen7b_k256",
308
+ "path": "r1-distill-qwen-7b/k256_32x/checkpoint.pt",
309
+ "model": "R1-Distill-Qwen-7B",
310
+ "base_model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
311
+ "width": "32x",
312
+ "d_features": 114688,
313
+ "d_model": 3584,
314
+ "k": 256,
315
+ "rowEV": 0.844,
316
+ "top1": 0.76,
317
+ "KL_bits": 0.489,
318
+ "size_bytes": 3290636793,
319
+ "layout": "flat",
320
+ "metrics_source": "checkpoint['metrics'] (held-out eval); paper Appendix E"
321
+ }
322
+ ]
323
+ }