DianLiI commited on
Commit
c699820
·
verified ·
1 Parent(s): cd5f23a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -7,7 +7,7 @@ AIDO.RNA 650M is an RNA foundation model trained on 42 million non-coding RNA se
7
  #### Embedding
8
  ```python
9
  from genbio_finetune.tasks import Embed
10
- model = Embed.from_config({"model.backbone": "rnafm_650m_cds"}).eval()
11
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
12
  embedding = model(collated_batch)
13
  print(embedding.shape)
@@ -17,7 +17,7 @@ print(embedding)
17
  ```python
18
  import torch
19
  from genbio_finetune.tasks import SequenceClassification
20
- model = SequenceClassification.from_config({"model.backbone": "rnafm_650m_cds", "model.n_classes": 2}).eval()
21
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
22
  logits = model(collated_batch)
23
  print(logits)
@@ -27,7 +27,7 @@ print(torch.argmax(logits, dim=-1))
27
  ```python
28
  import torch
29
  from genbio_finetune.tasks import TokenClassification
30
- model = TokenClassification.from_config({"model.backbone": "rnafm_650m_cds", "model.n_classes": 3}).eval()
31
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
32
  logits = model(collated_batch)
33
  print(logits)
@@ -36,14 +36,14 @@ print(torch.argmax(logits, dim=-1))
36
  #### Regression
37
  ```python
38
  from genbio_finetune.tasks import SequenceRegression
39
- model = SequenceRegression.from_config({"model.backbone": "rnafm_650m_cds"}).eval()
40
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
41
  logits = model(collated_batch)
42
  print(logits)
43
  ```
44
  #### Or use our one-liner CLI to finetune or evaluate any of the above!
45
  ```
46
- gbft fit --model SequenceClassification --model.backbone rnafm_650m_cds --data SequenceClassification --data.path <hf_or_local_path_to_your_dataset>
47
- gbft test --model SequenceClassification --model.backbone rnafm_650m_cds --data SequenceClassification --data.path <hf_or_local_path_to_your_dataset>
48
  ```
49
  For more information, visit: [Model Generator](https://github.com/genbio-ai/modelgenerator)
 
7
  #### Embedding
8
  ```python
9
  from genbio_finetune.tasks import Embed
10
+ model = Embed.from_config({"model.backbone": "rnafm_650m"}).eval()
11
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
12
  embedding = model(collated_batch)
13
  print(embedding.shape)
 
17
  ```python
18
  import torch
19
  from genbio_finetune.tasks import SequenceClassification
20
+ model = SequenceClassification.from_config({"model.backbone": "rnafm_650m", "model.n_classes": 2}).eval()
21
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
22
  logits = model(collated_batch)
23
  print(logits)
 
27
  ```python
28
  import torch
29
  from genbio_finetune.tasks import TokenClassification
30
+ model = TokenClassification.from_config({"model.backbone": "rnafm_650m", "model.n_classes": 3}).eval()
31
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
32
  logits = model(collated_batch)
33
  print(logits)
 
36
  #### Regression
37
  ```python
38
  from genbio_finetune.tasks import SequenceRegression
39
+ model = SequenceRegression.from_config({"model.backbone": "rnafm_650m"}).eval()
40
  collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
41
  logits = model(collated_batch)
42
  print(logits)
43
  ```
44
  #### Or use our one-liner CLI to finetune or evaluate any of the above!
45
  ```
46
+ gbft fit --model SequenceClassification --model.backbone rnafm_650m --data SequenceClassification --data.path <hf_or_local_path_to_your_dataset>
47
+ gbft test --model SequenceClassification --model.backbone rnafm_650m --data SequenceClassification --data.path <hf_or_local_path_to_your_dataset>
48
  ```
49
  For more information, visit: [Model Generator](https://github.com/genbio-ai/modelgenerator)