Views
No views yet
[!TIP] The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
| Variants | Num Layers | Hidden Size | Num Heads | Intermediate Size | Num Parameters (M) | FLOPs (G) | MACs (G) | Max Num Tokens |
|---|---|---|---|---|---|---|---|---|
| RiNALMo-Giga | 33 | 1280 | 20 | 5120 | 650.88 | 709.59 | 354.31 | 1022 |
| RiNALMo-Mega | 30 | 640 | 2560 | 148.04 | 171.76 | 85.54 | ||
| RiNALMo-Micro | 12 | 480 | 1920 | 33.48 | 40.26 | 20.01 |
multimolecule library. You can install it using pip:pip install multimolecule1import multimolecule # you must import multimolecule to register models
2from transformers import pipeline
3
4predictor = pipeline("fill-mask", model="multimolecule/rinalmo-giga")
5output = predictor("gguc<mask>cucugguuagaccagaucugagccu")1from multimolecule import RnaTokenizer, RiNALMoModel
2
3
4tokenizer = RnaTokenizer.from_pretrained("multimolecule/rinalmo-giga")
5model = RiNALMoModel.from_pretrained("multimolecule/rinalmo-giga")
6
7text = "UAGCUUAUCAGACUGAUGUUG"
8input = tokenizer(text, return_tensors="pt")
9
10output = model(**input)[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for sequence classification or regression.
1import torch
2from multimolecule import RnaTokenizer, RiNALMoForSequencePrediction
3
4
5tokenizer = RnaTokenizer.from_pretrained("multimolecule/rinalmo-giga")
6model = RiNALMoForSequencePrediction.from_pretrained("multimolecule/rinalmo-giga")
7
8text = "UAGCUUAUCAGACUGAUGUUG"
9input = tokenizer(text, return_tensors="pt")
10label = torch.tensor([1])
11
12output = model(**input, labels=label)[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for token classification or regression.
1import torch
2from multimolecule import RnaTokenizer, RiNALMoForTokenPrediction
3
4
5tokenizer = RnaTokenizer.from_pretrained("multimolecule/rinalmo-giga")
6model = RiNALMoForTokenPrediction.from_pretrained("multimolecule/rinalmo-giga")
7
8text = "UAGCUUAUCAGACUGAUGUUG"
9input = tokenizer(text, return_tensors="pt")
10label = torch.randint(2, (len(text), ))
11
12output = model(**input, labels=label)[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for contact classification or regression.
1import torch
2from multimolecule import RnaTokenizer, RiNALMoForContactPrediction
3
4
5tokenizer = RnaTokenizer.from_pretrained("multimolecule/rinalmo-giga")
6model = RiNALMoForContactPrediction.from_pretrained("multimolecule/rinalmo-giga")
7
8text = "UAGCUUAUCAGACUGAUGUUG"
9input = tokenizer(text, return_tensors="pt")
10label = torch.randint(2, (len(text), len(text)))
11
12output = model(**input, labels=label)RnaTokenizer][multimolecule.RnaTokenizer] will convert "T"s to "U"s for you, you may disable this behaviour by passing replace_T_with_U=False.<mask> for 80% of masked tokens1@ARTICLE{Penic2025-qf,
2 title = "{RiNALMo}: general-purpose {RNA} language models can generalize
3 well on structure prediction tasks",
4 author = "Peni{\'c}, Rafael Josip and Vla{\v s}i{\'c}, Tin and Huber,
5 Roland G and Wan, Yue and {\v S}iki{\'c}, Mile",
6 abstract = "While RNA has recently been recognized as an interesting
7 small-molecule drug target, many challenges remain to be
8 addressed before we take full advantage of it. This emphasizes
9 the necessity to improve our understanding of its structures and
10 functions. Over the years, sequencing technologies have produced
11 an enormous amount of unlabeled RNA data, which hides a huge
12 potential. Motivated by the successes of protein language
13 models, we introduce RiboNucleic Acid Language Model (RiNALMo)
14 to unveil the hidden code of RNA. RiNALMo is the largest RNA
15 language model to date, with 650M parameters pre-trained on 36M
16 non-coding RNA sequences from several databases. It can extract
17 hidden knowledge and capture the underlying structure
18 information implicitly embedded within the RNA sequences.
19 RiNALMo achieves state-of-the-art results on several downstream
20 tasks. Notably, we show that its generalization capabilities
21 overcome the inability of other deep learning methods for
22 secondary structure prediction to generalize on unseen RNA
23 families.",
24 journal = "Nature Communications",
25 publisher = "Springer Science and Business Media LLC",
26 volume = 16,
27 number = 1,
28 pages = "5671",
29 month = jul,
30 year = 2025,
31 copyright = "https://creativecommons.org/licenses/by-nc-nd/4.0",
32 language = "en"
33}[!NOTE] The artifacts distributed in this repository are part of the MultiMolecule project. If MultiMolecule supports your research, please cite the MultiMolecule project as follows:
1@software{chen_2024_12638419,
2 author = {Chen, Zhiyuan and Zhu, Sophia Y.},
3 title = {MultiMolecule},
4 doi = {10.5281/zenodo.12638419},
5 publisher = {Zenodo},
6 url = {https://doi.org/10.5281/zenodo.12638419},
7 year = 2024,
8 month = may,
9 day = 4
10}SPDX-License-Identifier: AGPL-3.0-or-later