hematteo commited on
Commit
686d467
路
verified 路
1 Parent(s): adb315b

docs: add quick starts and links to the atlas Space and collection

Browse files
Files changed (1) hide show
  1. README.md +69 -15
README.md CHANGED
@@ -8,35 +8,89 @@ tags:
8
  - pythia
9
  - olmo
10
  - arxiv:2610.21025
 
 
11
  ---
12
 
13
- # Trajectory crosscoders for vocabulary readout evolution
14
 
15
- Trained-dictionary release for **Learning to Read Out: Unembedding Dynamics in
16
- Language Model Pretraining**. We train **trajectory crosscoders** on parameter
17
- tensors (rather than activations) sampled across pretraining checkpoints. In
18
- the output unembedding $W_U$ this reveals how a sparse vocabulary readout
19
- forms, reorganizes, and becomes load-bearing during pretraining.
 
20
 
21
- Paper: [arXiv:2610.21025](https://arxiv.org/abs/2610.21025) (NeurIPS 2026) 路 [OpenReview](https://openreview.net/forum?id=FlkhJrDVyI) 路 Project page and feature atlas: https://learning-to-read-out.pages.dev
22
-
23
- Code, figure-by-figure reproduction map, and retraining recipes:
24
- **https://github.com/hematteo/learning-to-read-out** (see `docs/REPRODUCE.md`;
25
- per-run settings of record in `configs/runs/`).
26
 
27
  ## Quick start
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ```bash
30
- # everything (~180 GB)
31
- hf download hematteo/parameter-trajectory-crosscoders --local-dir $UM_SSD_ROOT/hf_release/parameter-trajectory-crosscoders
32
- # one model only
33
- hf download hematteo/parameter-trajectory-crosscoders --include "pythia-1b/**" --local-dir ...
34
  ```
35
 
 
 
36
  Each artifact is `<name>.safetensors` + `<name>.config.json` (training
37
  hyperparameters and recomputed quality metrics) + `<name>.md` (card).
38
  `index.json` is the machine-readable inventory of everything below.
39
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ## What you probably want
41
 
42
  | What | Path |
 
8
  - pythia
9
  - olmo
10
  - arxiv:2610.21025
11
+ datasets:
12
+ - hematteo/wu-crosscoder-snapshots
13
  ---
14
 
15
+ # Parameter-trajectory crosscoders for the LM readout
16
 
17
+ Trained dictionaries from **Learning to Read Out: Unembedding Dynamics in Language
18
+ Model Pretraining** (NeurIPS 2026). A parameter-trajectory crosscoder fits one
19
+ sparse dictionary to every token's readout (unembedding, $W_U$) row at every
20
+ checkpoint, using only checkpoint weights. Each feature keeps one index across
21
+ checkpoints and has its own decoder direction at each, so you can follow how its
22
+ strength and the tokens it promotes change during pretraining.
23
 
24
+ [Paper (arXiv:2610.21025)](https://arxiv.org/abs/2610.21025) 路
25
+ [Project page](https://learning-to-read-out.pages.dev) 路
26
+ [Feature atlas](https://huggingface.co/spaces/hematteo/readout-feature-atlas) 路
27
+ [Code](https://github.com/hematteo/learning-to-read-out) 路
28
+ [Collection](https://huggingface.co/collections/hematteo/learning-to-read-out-neurips-2026-6ad25219e26a69daa47880e0)
29
 
30
  ## Quick start
31
 
32
+ Follow one feature of the Pythia-160M dictionary across training (downloads
33
+ 1.6 GB for the dictionary and 155 MB for one readout snapshot):
34
+
35
+ ```python
36
+ import json
37
+ import torch
38
+ from huggingface_hub import hf_hub_download
39
+ from safetensors import safe_open
40
+ from transformers import AutoTokenizer
41
+
42
+ repo = "hematteo/parameter-trajectory-crosscoders"
43
+ name = "pythia-160m/W_U/cross-snapshot-32/d8192/seed0"
44
+ weights = hf_hub_download(repo, f"{name}.safetensors")
45
+ steps = json.load(open(hf_hub_download(repo, f"{name}.config.json")))["steps"] # the 32 checkpoint steps
46
+
47
+ feature = 6046
48
+ with safe_open(weights, framework="pt") as f:
49
+ D = f.get_slice("W_D")[:, feature] # (32, d_model): this feature's decoder row at each checkpoint
50
+ rho = D.norm(dim=-1) / D.norm(dim=-1).max() # decoder norm relative to its peak
51
+ print({s: round(rho[i].item(), 2) for i, s in enumerate(steps) if s in (0, 512, 2000, 8000, 143000)})
52
+ # {0: 0.05, 512: 0.07, 2000: 0.44, 8000: 0.78, 143000: 0.93}
53
+
54
+ snap = hf_hub_download("hematteo/wu-crosscoder-snapshots",
55
+ "pythia-160m/EleutherAI_pythia-160m_step143000_wu.pt", repo_type="dataset")
56
+ W_U = torch.load(snap, weights_only=True) # (vocab, d_model) readout at step 143000
57
+ tok = AutoTokenizer.from_pretrained("EleutherAI/pythia-160m")
58
+ top = (W_U @ D[steps.index(143000)]).topk(10).indices
59
+ print([tok.decode([t]) for t in top])
60
+ # [' tumour', ' realise', ' characterised', ' realised', ' colour', ' recognise', ' tumours', ' whilst', ' recognised', ' favour']
61
+ ```
62
+
63
+ Feature 6046 promotes British spellings at the end of training, and its decoder
64
+ norm grows from 7% of its peak at step 512 to 93% at the final checkpoint. The
65
+ [feature atlas](https://huggingface.co/spaces/hematteo/readout-feature-atlas)
66
+ has a page like this for every feature of the Pythia-160M, 1B and 6.9B
67
+ dictionaries.
68
+
69
+ To download whole dictionaries:
70
+
71
  ```bash
72
+ hf download hematteo/parameter-trajectory-crosscoders --include "pythia-1b/**" --local-dir ./parameter-trajectory-crosscoders
73
+ hf download hematteo/parameter-trajectory-crosscoders --local-dir ./parameter-trajectory-crosscoders # everything, about 180 GB
 
 
74
  ```
75
 
76
+ ## Files
77
+
78
  Each artifact is `<name>.safetensors` + `<name>.config.json` (training
79
  hyperparameters and recomputed quality metrics) + `<name>.md` (card).
80
  `index.json` is the machine-readable inventory of everything below.
81
 
82
+ | Tensor | Shape | Meaning |
83
+ |---|---|---|
84
+ | `W_D` | (checkpoints, d_sae, d_model) | Decoder: one direction per feature and checkpoint |
85
+ | `b_D` | (checkpoints, d_model) | Decoder bias per checkpoint |
86
+ | `W_E` | (checkpoints, d_model, d_sae) | Encoder (unrelated to the input embedding $W_E$ below) |
87
+ | `b_E` | (checkpoints, d_sae) | Encoder bias |
88
+ | `activation_function.log_jumprelu_threshold` | (d_sae,) | JumpReLU threshold (log scale) |
89
+
90
+ The checkpoint steps are listed under `steps` in each `.config.json`. Inputs were
91
+ centered and scaled per checkpoint (`preprocess_mode` in the config); the code
92
+ release reproduces that preprocessing.
93
+
94
  ## What you probably want
95
 
96
  | What | Path |