Update README.md
Browse files
README.md
CHANGED
@@ -19,6 +19,10 @@ An Evolutionary-scale Model (ESM) for protein function calling from amino acid s
|
|
19 |
|
20 |
**Note**: This model specilizes on the `celluar component` subgraph of the gene ontology.
|
21 |
|
|
|
|
|
|
|
|
|
22 |
## Model Specs
|
23 |
|
24 |
**Embedding Dimensions**: 640
|
@@ -44,11 +48,13 @@ model = EsmForSequenceClassification.from_pretrained(model_name)
|
|
44 |
|
45 |
model.eval()
|
46 |
|
47 |
-
|
|
|
|
|
48 |
|
49 |
out = tokenizer(
|
50 |
sequence,
|
51 |
-
max_length=
|
52 |
truncation=True,
|
53 |
)
|
54 |
|
@@ -61,7 +67,7 @@ with torch.no_grad():
|
|
61 |
|
62 |
probabilities = torch.sigmoid(outputs.logits.squeeze(0))
|
63 |
|
64 |
-
probabilities, indices = torch.topk(probabilities,
|
65 |
|
66 |
probabilities = probabilities.tolist()
|
67 |
|
|
|
19 |
|
20 |
**Note**: This model specilizes on the `celluar component` subgraph of the gene ontology.
|
21 |
|
22 |
+
## Code Repository
|
23 |
+
|
24 |
+
https://github.com/andrewdalpino/esm2-function-classifier
|
25 |
+
|
26 |
## Model Specs
|
27 |
|
28 |
**Embedding Dimensions**: 640
|
|
|
48 |
|
49 |
model.eval()
|
50 |
|
51 |
+
sequence = "MCNAWYISVDFEKNREDKSKCIHTRRNSGPKLLEHVMYEVLRDWYCLEGENVYMMGKKWQMPMCSLH"
|
52 |
+
|
53 |
+
top_k = 10
|
54 |
|
55 |
out = tokenizer(
|
56 |
sequence,
|
57 |
+
max_length=1026,
|
58 |
truncation=True,
|
59 |
)
|
60 |
|
|
|
67 |
|
68 |
probabilities = torch.sigmoid(outputs.logits.squeeze(0))
|
69 |
|
70 |
+
probabilities, indices = torch.topk(probabilities, top_k)
|
71 |
|
72 |
probabilities = probabilities.tolist()
|
73 |
|