-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c5c554
commit e9fb86b
Showing
48 changed files
with
119 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
services: | ||
plm-interpretability: | ||
interprot: | ||
build: . | ||
volumes: | ||
- .:/app |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
plm_interpretability/autointerp/__main__.py → interprot/autointerp/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Convenience script to run all autointerp experiments. | ||
|
||
PLM_DIM=1280 | ||
PLM_LAYER=24 | ||
|
||
for motif in "E{3,12}[T]{2,5}E{3,12}" "H{4,40}[TS]{1,12}H{4,40}"; do | ||
autointerp labels2latents \ | ||
--labels-csv "interprot/autointerp/results/labels/${motif}_labels.csv" \ | ||
--sae-checkpoint "interprot/checkpoints/l${PLM_LAYER}_plm${PLM_DIM}_sae4096_k128_100k.pt" \ | ||
--plm-dim $PLM_DIM \ | ||
--plm-layer $PLM_LAYER \ | ||
--sae-dim 4096 \ | ||
--out-path "interprot/autointerp/results/l${PLM_LAYER}_plm${PLM_DIM}_sae4096_k128_100k/${motif}_mapping.csv" | ||
|
||
autointerp labels2latents \ | ||
--labels-csv "interprot/autointerp/results/labels/${motif}_labels.csv" \ | ||
--sae-checkpoint "interprot/checkpoints/l${PLM_LAYER}_plm${PLM_DIM}_sae4096_k128_211k.pt" \ | ||
--plm-dim $PLM_DIM \ | ||
--plm-layer $PLM_LAYER \ | ||
--sae-dim 4096 \ | ||
--out-path "interprot/autointerp/results/l${PLM_LAYER}_plm${PLM_DIM}_sae4096_k128_211k/${motif}_mapping.csv" | ||
|
||
autointerp labels2latents \ | ||
--labels-csv "interprot/autointerp/results/labels/${motif}_labels.csv" \ | ||
--sae-checkpoint "interprot/checkpoints/l${PLM_LAYER}_plm${PLM_DIM}_sae32768_k128_100k.pt" \ | ||
--plm-dim $PLM_DIM \ | ||
--plm-layer $PLM_LAYER \ | ||
--sae-dim 32768 \ | ||
--out-path "interprot/autointerp/results/l${PLM_LAYER}_plm${PLM_DIM}_sae32768_k128_100k/${motif}_mapping.csv" | ||
done |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Binary classification probes | ||
|
||
## Single latent | ||
|
||
```bash | ||
logistic_regression_probe single-latent \ | ||
--sae-checkpoint interprot/checkpoints/l24_plm1280_sae4096_k128_100k.pt \ | ||
--sae-dim 4096 \ | ||
--plm-dim 1280 \ | ||
--plm-layer 24 \ | ||
--swissprot-tsv interprot/logistic_regression_probe/data/swissprot.tsv \ | ||
--output-dir interprot/logistic_regression_probe/results \ | ||
--max-seqs-per-task 5 \ | ||
--annotation-names "DNA binding" | ||
``` | ||
|
||
## All latents | ||
|
||
```bash | ||
logistic_regression_probe all-latents \ | ||
--sae-checkpoint interprot/checkpoints/l24_plm1280_sae4096_k128_100k.pt \ | ||
--sae-dim 4096 \ | ||
--plm-dim 1280 \ | ||
--plm-layer 24 \ | ||
--swissprot-tsv interprot/logistic_regression_probe/data/swissprot.tsv \ | ||
--output-file interprot/logistic_regression_probe/results/all_latents.csv \ | ||
--max-seqs-per-task 5 \ | ||
--annotation-names "DNA binding" | ||
``` |
4 changes: 2 additions & 2 deletions
4
...ity/logistic_regression_probe/__main__.py → ...rot/logistic_regression_probe/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.