File size: 904 Bytes
4b54d93
 
 
 
009d148
06ef5e7
4b54d93
4084e52
 
 
 
 
 
 
 
009d148
4084e52
 
 
 
 
 
 
f9cb581
4084e52
 
 
 
f9cb581
4084e52
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
datasets:
- Bo1015/fluorescence_prediction
base_model:
- genbio-ai/AIDO.Protein-16B
license: other
---
LoRA fine-tuned checkpoint for fluorescence_prediction.

## How to Use
### Download model
```python
from huggingface_hub import snapshot_download
from pathlib import Path

model_name = "genbio-ai/AIDO.Protein-16B-fluorescence_prediction"
genbio_models_path = Path.home().joinpath('genbio_models', model_name)
genbio_models_path.mkdir(parents=True, exist_ok=True)
snapshot_download(repo_id=model_name, local_dir=genbio_models_path)
```
### Load model for inference
```python
import torch
from modelgenerator.tasks import SequenceRegression

ckpt_path = genbio_models_path.joinpath('model.ckpt')
model = SequenceRegression.load_from_checkpoint(ckpt_path, strict_loading=False).eval()

collated_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
logits = model(collated_batch)
print(logits)
```