Views
No views yet
base is trained using ~1M parameters, and large is trained using ~10M parameters.orthrus-large-4-track model.[!TIP] NOTE: Orthrus was trained and built to model full mature RNA sequences, so using incomplete pieces of spliced RNA as input will be out of distribution. This differs in usage compared to existing DNA / RNA foundation models which model arbitrary genomic segments.
conda create --name orthrus
conda activate orthruspip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cu121
pip install causal_conv1d==1.2.0.post2
pip install mamba-ssm==1.2.0.post1
pip install transformers1import torch
2from transformers import AutoModel
3
4device = torch.device("cuda")
5
6orthrus_4 = AutoModel.from_pretrained(
7 "quietflamingo/orthrus-large-4-track",
8 trust_remote_code=True
9).to(device)1sequence = "ATGATGATG"
2seq_ohe = orthrus_4.seq_to_oh(sequence).to(device)
3
4model_input_tt = seq_ohe.unsqueeze(0)
5lengths = torch.Tensor([model_input_tt.shape[1]]).to(device)
6
7embedding = orthrus_4.representation(
8 model_input_tt, # (1 x L x 4)
9 lengths, # (1,)
10 channel_last=True
11)
12
13print(embedding.shape) # (1 x 256)@article{orthrus_fradkin_shi_2024,
title = {Orthrus: Towards Evolutionary and Functional RNA Foundation Models},
url = {http://dx.doi.org/10.1101/2024.10.10.617658},
DOI = {10.1101/2024.10.10.617658},
publisher = {Cold Spring Harbor Laboratory},
author = {Fradkin, Philip and Shi, Ruian and Isaev, Keren and Frey, Brendan J and Morris, Quaid and Lee, Leo J and Wang, Bo},
year = {2024},
month = oct
}