CLIP-ViT-L-scope / README.md
lewington's picture
Update README.md
cba8148 verified
|
raw
history blame
2.93 kB
metadata
license: cc-by-4.0

CLIP-Scope

by Louka Ewington-Pitsos and Ram ____

Heavily inspired by google/gemma-scope we are releaseing a suite of sparse 8 autoencoders for laion/CLIP-ViT-L-14-laion2B-s32B-b82K.

Layer MSE Explained Variance Dead Feature Proportion
2
5
8
11
14
17
20
22

Training logs are available via wandb and training code is available on github. The training process is heavily reliant on AWS ECS so may contain some strange artefacts when a spot instance is killed and the training is reumed by another instance. Some of the code is ripped directly from Hugo Fry.

Vital Statistics:

  • Number of tokens trained per autoencoder: 1.2 Billion
  • Token type: all 257 image tokens (as opposed to just the cls token)
  • Number of images trained per autoencoder: ~4.6 Million
  • Training Dataset: Laion-2b
  • SAE Architecture: topk with k=32
  • Layer Location: always the residual stream
  • Training Checkpoints: every ~25 million tokens
  • Number of features: 65536

Usage

Error Forumlas

We calculate MSE as ((batch - reconstruction) ** 2).sum(dim=-1).mean() i.e. The MSE between the batch and the un-normalized reconstruction, summed across features. We use batch norm to bring all activations into a similar range.

We calculate Explained Variance as

Subjective Interpretability

To give an intuitive feel for the interpretability of these models we run 500,000 images from laion2b selected at random through the final trained SAE for each layer and record the latent activations for each. We then winnow down to the first 100 features which activate for at least 9 images. We cherry pick 3 of these and display them in a 3x3 grid for each layer. We do this twice, one for the CLS token and once for token 137 (near the middle of the image). Below are the 6 grids for feaure 22. Other grids are available for each layer.

Automated Sort EVALs

Token-wise MSE