Elana commited on
Commit
81d2429
·
verified ·
1 Parent(s): f02bf50

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -15
README.md CHANGED
@@ -42,21 +42,18 @@ Extract interpretable features from protein sequences:
42
 
43
  ```python
44
  from interplm.sae.inference import load_sae_from_hf
45
- from interplm.esm.embed import embed_list_of_prot_seqs
46
-
47
- # Select ESM layer (must be one of 1-6)
48
- layer = 4
49
-
50
- # Load specific layer SAE
51
- sae = load_sae_from_hf(plm_model="esm2-8m", plm_layer=layer)
52
-
53
- # Get ESM embeddings for protein
54
- protein_embeddings = embed_single_sequence(sequence="MRWQEMGYIFYPRKLR",
55
- model_name="esm2_t6_8M_UR50D",
56
- layer=layer_num)
57
-
58
- # Extract features
59
- features = sae.encode(protein_embeddings)
60
  ```
61
 
62
  For detailed training and analysis examples, see the [GitHub README](https://github.com/ElanaPearl/InterPLM/blob/main/README.md).
 
42
 
43
  ```python
44
  from interplm.sae.inference import load_sae_from_hf
45
+ from interplm.esm.embed import embed_single_sequence
46
+
47
+ # Get ESM embeddings for protein sequence
48
+ embeddings = embed_single_sequence(
49
+ sequence="MRWQEMGYIFYPRKLR",
50
+ model_name="esm2_t6_8M_UR50D",
51
+ layer=4 # Choose ESM layer (1-6)
52
+ )
53
+
54
+ # Load SAE model and extract features
55
+ sae = load_sae_from_hf(plm_model="esm2-8m", plm_layer=4)
56
+ features = sae.encode(embeddings)
 
 
 
57
  ```
58
 
59
  For detailed training and analysis examples, see the [GitHub README](https://github.com/ElanaPearl/InterPLM/blob/main/README.md).