lewington commited on
Commit
cba8148
·
verified ·
1 Parent(s): 00415f6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -3
README.md CHANGED
@@ -1,3 +1,50 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ ---
4
+
5
+ # CLIP-Scope
6
+
7
+ by [Louka Ewington-Pitsos](https://www.linkedin.com/in/louka-ewington-pitsos-2a92b21a0/?originalSubdomain=au) and Ram ____
8
+
9
+ Heavily inspired by [google/gemma-scope](https://huggingface.co/google/gemma-scope) we are releaseing a suite of sparse 8 autoencoders for [laion/CLIP-ViT-L-14-laion2B-s32B-b82K](https://huggingface.co/laion/CLIP-ViT-L-14-laion2B-s32B-b82K).
10
+
11
+ | Layer | MSE | Explained Variance | Dead Feature Proportion |
12
+ |-------|-----|--------------------|-------------------------|
13
+ | 2 | | | |
14
+ | 5 | | | |
15
+ | 8 | | | |
16
+ | 11 | | | |
17
+ | 14 | | | |
18
+ | 17 | | | |
19
+ | 20 | | | |
20
+ | 22 | | | |
21
+
22
+ Training logs are available [via wandb](https://wandb.ai/lewington/ViT-L-14-laion2B-s32B-b82K/workspace) and training code is available on [github](https://github.com/Lewington-pitsos/vitsae). The training process is heavily reliant on [AWS ECS](https://aws.amazon.com/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](https://github.com/HugoFry/mats_sae_training_for_ViTs).
23
+
24
+ ### Vital Statistics:
25
+
26
+ - Number of tokens trained per autoencoder: 1.2 Billion
27
+ - Token type: all 257 image tokens (as opposed to just the cls token)
28
+ - Number of images trained per autoencoder: ~4.6 Million
29
+ - Training Dataset: [Laion-2b](https://huggingface.co/datasets/laion/laion2B-multi-joined-translated-to-en)
30
+ - SAE Architecture: topk with k=32
31
+ - Layer Location: always the residual stream
32
+ - Training Checkpoints: every ~25 million tokens
33
+ - Number of features: 65536
34
+
35
+ ## Usage
36
+
37
+ ## Error Forumlas
38
+
39
+ 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.
40
+
41
+ We calculate Explained Variance as
42
+
43
+ ## Subjective Interpretability
44
+
45
+ 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.
46
+
47
+
48
+ ## Automated Sort EVALs
49
+
50
+ ## Token-wise MSE