Downloads · 30 days
65
7% of all-time downloads
quietflamingo/orthrus-large-4-track
orthrus-large-4-track is a machine learning model from quietflamingo. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Orthrus is a mature RNA foundation model for RNA property prediction. Orthrus is pre-trained using contrastive learning on 45M+ mature RNA transcripts to capture functional and evolutionary relationships across all Ma…
Downloads · 30 days
65
7% of all-time downloads
All-time downloads
953
Public
Parameters
10.2M
170 MB on disk
Likes
0
Public
Click a slice to open those files.
.ckpt129 MB · 76%
From the Hugging Face model README
Orthrus is a mature RNA foundation model for RNA property prediction. Orthrus is pre-trained using contrastive learning on 45M+ mature RNA transcripts to capture functional and evolutionary relationships across all Mammailian organisms. Orthrus is built on a Mamba encoder backbone, enabling the embedding of arbitrarily long RNA sequence data. We offer two sizes of Orthrus: base is trained using ~1M parameters, and large is trained using ~10M parameters.
Three versions of Orthrus are available for use via HuggingFace (See collection):
This HF repo contains the orthrus-large-4-track model.
Additional project files and the github repository can be found at:
To generate embeddings using Orthrus for spliced mature RNA sequences, follow the steps below:
[!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.
This environment setup is tested for using PyTorch 2.2.2 using CUDA 12.1.
conda create --name orthrus
conda activate orthrus
pip 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 transformers
import torch
from transformers import AutoModel
device = torch.device("cuda")
orthrus_4 = AutoModel.from_pretrained(
"quietflamingo/orthrus-large-4-track",
trust_remote_code=True
).to(device)
sequence = "ATGATGATG"
seq_ohe = orthrus_4.seq_to_oh(sequence).to(device)
model_input_tt = seq_ohe.unsqueeze(0)
lengths = torch.Tensor([model_input_tt.shape[1]]).to(device)
embedding = orthrus_4.representation(
model_input_tt, # (1 x L x 4)
lengths, # (1,)
channel_last=True
)
print(embedding.shape) # (1 x 256)
An example of sequence embedding using Orthrus is shown in this Colab notebook.
@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
}