DianLiI's picture
Update README.md
7d4c082 verified
|
raw
history blame
925 Bytes
metadata
datasets:
  - genbio-ai/rna-downstream-tasks
base_model:
  - genbio-ai/rnafm-1.6b-cds

5-fold cross-validation LoRA fine-tuned checkpoints for protein abundance prediction (hsapiens).

How to Use

Download model

from huggingface_hub import snapshot_download
from pathlib import Path

model_name = "genbio-ai/rnafm-1.6b-cds-protein-abundance-hsapiens-ckpt"
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

from genbio_finetune.tasks import SequenceRegression

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

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