aspeedok commited on
Commit ·
5fe769e
1
Parent(s): 697bd2e
update
Browse files
README.md
CHANGED
|
@@ -23,7 +23,7 @@ It takes a DNA sequence corresponding to a transcript and produces **one logit p
|
|
| 23 |
Model name on Hugging Face:
|
| 24 |
|
| 25 |
```python
|
| 26 |
-
genatator-caduceus-ps-multispecies-transcript-type
|
| 27 |
````
|
| 28 |
|
| 29 |
Architecture properties:
|
|
@@ -67,7 +67,7 @@ The model predicts a single binary output:
|
|
| 67 |
|
| 68 |
The model returns **one logit per input sequence**.
|
| 69 |
|
| 70 |
-
To obtain probabilities, apply a sigmoid to the logits.
|
| 71 |
|
| 72 |
---
|
| 73 |
|
|
@@ -76,7 +76,7 @@ To obtain probabilities, apply a sigmoid to the logits.
|
|
| 76 |
```python
|
| 77 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 78 |
|
| 79 |
-
repo_id = "shmelev/genatator-caduceus-ps-multispecies-transcript-type
|
| 80 |
|
| 81 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 82 |
repo_id,
|
|
@@ -99,7 +99,7 @@ model.eval()
|
|
| 99 |
import torch
|
| 100 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 101 |
|
| 102 |
-
repo_id = "shmelev/genatator-caduceus-ps-multispecies-transcript-type
|
| 103 |
|
| 104 |
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
|
| 105 |
model = AutoModelForSequenceClassification.from_pretrained(repo_id, trust_remote_code=True)
|
|
@@ -121,7 +121,7 @@ probs = torch.sigmoid(logits)
|
|
| 121 |
print("Input shape:", input_ids.shape)
|
| 122 |
print("Logits shape:", logits.shape)
|
| 123 |
print("Probabilities shape:", probs.shape)
|
| 124 |
-
print("Probabilities:", probs.squeeze(-1))
|
| 125 |
```
|
| 126 |
|
| 127 |
Example output:
|
|
@@ -130,5 +130,5 @@ Example output:
|
|
| 130 |
Input shape: torch.Size([2, sequence_length])
|
| 131 |
Logits shape: torch.Size([2, 1])
|
| 132 |
Probabilities shape: torch.Size([2, 1])
|
| 133 |
-
Probabilities: tensor([0.
|
| 134 |
-
```
|
|
|
|
| 23 |
Model name on Hugging Face:
|
| 24 |
|
| 25 |
```python
|
| 26 |
+
genatator-caduceus-ps-multispecies-transcript-type
|
| 27 |
````
|
| 28 |
|
| 29 |
Architecture properties:
|
|
|
|
| 67 |
|
| 68 |
The model returns **one logit per input sequence**.
|
| 69 |
|
| 70 |
+
To obtain probabilities for the **lncRNA** class, apply a sigmoid to the logits.
|
| 71 |
|
| 72 |
---
|
| 73 |
|
|
|
|
| 76 |
```python
|
| 77 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 78 |
|
| 79 |
+
repo_id = "shmelev/genatator-caduceus-ps-multispecies-transcript-type"
|
| 80 |
|
| 81 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 82 |
repo_id,
|
|
|
|
| 99 |
import torch
|
| 100 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 101 |
|
| 102 |
+
repo_id = "shmelev/genatator-caduceus-ps-multispecies-transcript-type"
|
| 103 |
|
| 104 |
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
|
| 105 |
model = AutoModelForSequenceClassification.from_pretrained(repo_id, trust_remote_code=True)
|
|
|
|
| 121 |
print("Input shape:", input_ids.shape)
|
| 122 |
print("Logits shape:", logits.shape)
|
| 123 |
print("Probabilities shape:", probs.shape)
|
| 124 |
+
print("Probabilities of lncRNA:", probs.squeeze(-1))
|
| 125 |
```
|
| 126 |
|
| 127 |
Example output:
|
|
|
|
| 130 |
Input shape: torch.Size([2, sequence_length])
|
| 131 |
Logits shape: torch.Size([2, 1])
|
| 132 |
Probabilities shape: torch.Size([2, 1])
|
| 133 |
+
Probabilities of lncRNA: tensor([0.08, 0.91])
|
| 134 |
+
```
|