Update README.md
Browse files
README.md
CHANGED
@@ -8,7 +8,7 @@ AIDO.RNA-1.6B-CDS is a domain adaptation model on the coding sequences. It was p
|
|
8 |
|
9 |
## How to Use
|
10 |
### Build any downstream models from this backbone
|
11 |
-
####
|
12 |
```python
|
13 |
from genbio_finetune.tasks import Embed
|
14 |
model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
|
@@ -18,7 +18,7 @@ print(embedding.shape)
|
|
18 |
print(embedding)
|
19 |
```
|
20 |
|
21 |
-
####
|
22 |
```python
|
23 |
from genbio_finetune.tasks import SequenceRegression
|
24 |
model = SequenceRegression.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
|
@@ -27,7 +27,7 @@ logits = model(collated_batch)
|
|
27 |
print(logits)
|
28 |
```
|
29 |
|
30 |
-
#### Sequence
|
31 |
```python
|
32 |
import torch
|
33 |
from genbio_finetune.tasks import SequenceClassification
|
@@ -38,7 +38,7 @@ print(logits)
|
|
38 |
print(torch.argmax(logits, dim=-1))
|
39 |
```
|
40 |
|
41 |
-
#### Token
|
42 |
```python
|
43 |
import torch
|
44 |
from genbio_finetune.tasks import TokenClassification
|
|
|
8 |
|
9 |
## How to Use
|
10 |
### Build any downstream models from this backbone
|
11 |
+
#### Get RNA sequence embedding
|
12 |
```python
|
13 |
from genbio_finetune.tasks import Embed
|
14 |
model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
|
|
|
18 |
print(embedding)
|
19 |
```
|
20 |
|
21 |
+
#### Sequence-level regression
|
22 |
```python
|
23 |
from genbio_finetune.tasks import SequenceRegression
|
24 |
model = SequenceRegression.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
|
|
|
27 |
print(logits)
|
28 |
```
|
29 |
|
30 |
+
#### Sequence-level classification
|
31 |
```python
|
32 |
import torch
|
33 |
from genbio_finetune.tasks import SequenceClassification
|
|
|
38 |
print(torch.argmax(logits, dim=-1))
|
39 |
```
|
40 |
|
41 |
+
#### Token-level classification
|
42 |
```python
|
43 |
import torch
|
44 |
from genbio_finetune.tasks import TokenClassification
|