Repo aims to train a CrossCoder model across multiple checkpoints of a 70M Pythia model, and see how it evolves over training.
- Adapted from crosscoder-model-diff-replication
Two ways to train the model:
- On the fly: Cache activations as the model is trained
- Cached: Cache activations ahead of time, then train the SAE on these cached activations.
- Supports multi-gpu!
- Takes up a lot of space on disk
train.py
: Entry point, define config and hyperparameterscache_acts.py
: Cache activations ahead of time
Crosscoder lib:
trainer.py
: Simple training loop that can use either cached or on-the-fly activationsmodel.py
: Defines the CrossCoder modelbuffer_on_the_fly.py
: Caches activations as the model is trainedbuffer_cached.py
: Loads cached activations from disk