Instructions to use multimolecule/rnafm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MultiMolecule
How to use multimolecule/rnafm with MultiMolecule:
pip install multimolecule
from multimolecule import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("multimolecule/rnafm") model = AutoModel.from_pretrained("multimolecule/rnafm") inputs = tokenizer("UAGCUUAUCAGACUGAUGUUGA", return_tensors="pt") outputs = model(**inputs) embeddings = outputs.last_hidden_stateimport multimolecule from transformers import pipeline predictor = pipeline("fill-mask", model="multimolecule/rnafm") output = predictor("UAGCUUAUCAG<mask>CUGAUGUUGA") - Notebooks
- Google Colab
- Kaggle
| datasets: | |
| - multimolecule/rnacentral | |
| library_name: multimolecule | |
| license: agpl-3.0 | |
| mask_token: <mask> | |
| pipeline_tag: fill-mask | |
| tags: | |
| - Biology | |
| - RNA | |
| - ncRNA | |
| - rna | |
| widget: | |
| - example_title: microRNA 21 | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.2009 | |
| - label: '*' | |
| score: 0.159673 | |
| - label: '|' | |
| score: 0.118655 | |
| - label: I | |
| score: 0.117554 | |
| - label: . | |
| score: 0.093048 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: UAGCUUAUCAG<mask>CUGAUGUUGA | |
| - example_title: microRNA 146a | |
| mask_index: 10 | |
| mask_index_1based: 11 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.228405 | |
| - label: '*' | |
| score: 0.181964 | |
| - label: '|' | |
| score: 0.134386 | |
| - label: I | |
| score: 0.132831 | |
| - label: . | |
| score: 0.10698 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: UGAGAACUGA<mask>UUCCAUGGGUU | |
| - example_title: microRNA 155 | |
| mask_index: 15 | |
| mask_index_1based: 16 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.235441 | |
| - label: '*' | |
| score: 0.188319 | |
| - label: '|' | |
| score: 0.141343 | |
| - label: I | |
| score: 0.137523 | |
| - label: . | |
| score: 0.111508 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: UUAAUGCUAAUCGUG<mask>UAGGGGUU | |
| - example_title: RNA component of mitochondrial RNA processing endoribonuclease | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: A | |
| score: 0.622152 | |
| - label: G | |
| score: 0.074581 | |
| - label: X | |
| score: 0.062167 | |
| - label: '?' | |
| score: 0.059036 | |
| - label: '*' | |
| score: 0.042494 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: GGUUCGUGCUG<mask>AGGCCUGUAUCCUAGGCUACACACUGAGGACUCUGUUCCUCCCCUUUCCGCCUAGGGGAAAGUCCCCGGACCUCGGGCAGAGAGUGCCACGUGCAUACGCACGUAGACAUUCCCCGCUUCCCACUCCAAAGUCCGCCAAGAAGCGUAUCCCGCUGAGCGGCGUGGCGCGGGGGCGUCAUCCGUCAGCUCCCUCUAGUUACGCAGGCAGUGCGUGUCCGCGCACCAACCACACGGGGCUCAUUCUCAGCGCGGCUGUAAAAAAAAA | |
| - example_title: 7SK small nuclear RNA | |
| mask_index: 13 | |
| mask_index_1based: 14 | |
| masked_char: A | |
| output: | |
| - label: A | |
| score: 0.855574 | |
| - label: '?' | |
| score: 0.037714 | |
| - label: '*' | |
| score: 0.032782 | |
| - label: I | |
| score: 0.025124 | |
| - label: '|' | |
| score: 0.023974 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: GGAUGUGAGGGCG<mask>UCUGGCUGCGACAUCUGUCACCCCAUUGAUCGCCAGGGUUGAUUCGGCUGAUCUGGCUGGCUAGGCGGGUGUCCCCUUCCUCCCUCACCGCUCCAUGUGCGUCCCUCCCGAAGCUGCGCGCUCGGUCGAAGAGGACGACCAUCCCCGAUAGAGGAGGACCGGUCUUCGGUCAAGGGUAUACGAGUAGCUGCGCUCCCCUGCUAGAACCUCCAAACAAGCUCUCAAGGUCCAUUUGUAGGAGAACGUAGGGUAGUCAAGCUUCCAAGACUCCAGACACAUCCAAAUGAGGCGCUGCAUGUGGCAGUCUGCCUUUCUUUU | |
| - example_title: telomerase RNA component | |
| mask_index: 23 | |
| mask_index_1based: 24 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.227095 | |
| - label: '*' | |
| score: 0.180311 | |
| - label: '|' | |
| score: 0.134258 | |
| - label: I | |
| score: 0.133277 | |
| - label: . | |
| score: 0.105863 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: GGGUUGCGGAGGGUGGGCCUGGG<mask>GGGGUGGUGGCCAUUUUUUGUCUAACCCUAACUGAGAAGGGCGUAGGCGCCGUGCUUUUGCUCCCCGCGCGCUGUUUUUCUCGCUGACUUUCAGCGGGCGGAAAAGCCUCGGCCUGCCGCCUUCCACCGUUCAUUCUAGAGCAAACAAAAAAUGUCAGCUGCUGGCCCGUUCGCCCCUCCCGGGGACCUGCGGCGGGUCGCCUGCCCAGCCCCCGAACCCCGCCUGGAGGCCGCGGUCGGCCCGGGGCUUCUCCGGAGGCACCCACUGCCACCGCGAAGAGUUGGGCUCUGUCAGCCGCGGGUCUCUCGGGGGCGAGGGCGAGGUUCAGGCCUUUCAGGCCGCAGGAAGAGGAACGGAGCGAGUCCCCGCGCGCGGCGCGAUUCCCUGAGCUGUGGGACGUGCACCCAGGACUCGGCUCACACAUGC | |
| - example_title: vault RNA 2-1 | |
| mask_index: 12 | |
| mask_index_1based: 13 | |
| masked_char: A | |
| output: | |
| - label: A | |
| score: 0.282629 | |
| - label: '?' | |
| score: 0.141381 | |
| - label: '*' | |
| score: 0.11284 | |
| - label: G | |
| score: 0.085753 | |
| - label: '|' | |
| score: 0.084345 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: CGGGUCGGAGUU<mask>GCUCAAGCGGUUACCUCCUCAUGCCGGACUUUCUAUCUGUCCAUCUCUGUGCUGGGGUUCGAGACCCGCGGGUGCUUACUGACCCUUUUAUGCAA | |
| - example_title: brain cytoplasmic RNA 1 | |
| mask_index: 18 | |
| mask_index_1based: 19 | |
| masked_char: A | |
| output: | |
| - label: A | |
| score: 0.585389 | |
| - label: '?' | |
| score: 0.098956 | |
| - label: '*' | |
| score: 0.085764 | |
| - label: '|' | |
| score: 0.062997 | |
| - label: I | |
| score: 0.060588 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: GGCCGGGCGCGGUGGCUC<mask>CGCCUGUAAUCCCAGCUCUCAGGGAGGCUAAGAGGCGGGAGGAUAGCUUGAGCCCAGGAGUUCGAGACCUGCCUGGGCAAUAUAGCGAGACCCCGUUCUCCAGAAAAAGGAAAAAAAAAAACAAAAGACAAAAAAAAAAUAAGCGUAACUUCCCUCAAAGCAACAACCCCCCCCCCCCUUU | |
| - example_title: HIV-1 TAR-WT | |
| mask_index: 13 | |
| mask_index_1based: 14 | |
| masked_char: A | |
| output: | |
| - label: A | |
| score: 0.216119 | |
| - label: '?' | |
| score: 0.172431 | |
| - label: '*' | |
| score: 0.133169 | |
| - label: '|' | |
| score: 0.107029 | |
| - label: I | |
| score: 0.10469 | |
| pipeline_tag: fill-mask | |
| sequence_type: ncRNA | |
| task: fill-mask | |
| text: GGUCUCUCUGGUU<mask>GACCAGAUCUGAGCCUGGGAGCUCUCUGGCUAACUAGGGAACC | |
| - example_title: prion protein (Kanno blood group) | |
| mask_index: 21 | |
| mask_index_1based: 22 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.19308 | |
| - label: '*' | |
| score: 0.152793 | |
| - label: '|' | |
| score: 0.114088 | |
| - label: I | |
| score: 0.113779 | |
| - label: C | |
| score: 0.095156 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGGCGAACCUUGGCUGCUGG<mask>UGCUGGUUCUCUUUGUGGCCACAUGGAGUGACCUGGGCCUCUGC | |
| - example_title: interleukin 10 | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.208715 | |
| - label: '*' | |
| score: 0.166324 | |
| - label: '|' | |
| score: 0.125006 | |
| - label: I | |
| score: 0.123702 | |
| - label: . | |
| score: 0.099905 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGCACAGCUC<mask>GCACUGCUCUGUUGCCUGGUCCUCCUGACUGGGGUGAGGGCC | |
| - example_title: Zaire ebolavirus | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.197839 | |
| - label: '*' | |
| score: 0.153979 | |
| - label: '|' | |
| score: 0.113605 | |
| - label: I | |
| score: 0.111712 | |
| - label: U | |
| score: 0.103835 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AAUGUUCAAAC<mask>CUUUGUGAAGCUCUGUUAGCUGAUGGUCUUGCUAAAGCAUUUCCUAGCAAUAUGAUGGUAGUCACAGAGCGUGAGCAAAAAGAAAGCUUAUUGCAUCAAGCAUCAUGGCACCACACAAGUGAUGAUUUUGGUGAGCAUGCCACAGUUAGAGGGAGUAGCUUUGUAACUGAUUUAGAGAAAUACAAUCUUGCAUUUAGAUAUGAGUUUACAGCACCUUUUAUAGAAUAUUGUAACCGUUGCUAUGGUGUUAAGAAUGUUUUUAAUUGGAUGCAUUAUACAAUCCCACAGUGUUAU | |
| - example_title: SARS coronavirus | |
| mask_index: 14 | |
| mask_index_1based: 15 | |
| masked_char: A | |
| output: | |
| - label: U | |
| score: 0.194165 | |
| - label: '?' | |
| score: 0.164707 | |
| - label: '*' | |
| score: 0.129908 | |
| - label: '|' | |
| score: 0.09555 | |
| - label: I | |
| score: 0.094492 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGUUUAUUUUCUU<mask>UUAUUUCUUACUCUCACUAGUGGUAGUGACCUUGACCGGUGCACCACUUUUGAUGAUGUUCAAGCUCCUAAUUACACUCAACAUACUUCAUCUAUGAGGGGGGUUUACUAUCCUGAUGAAAUUUUUAGAUCAGACACUCUUUAUUUAACUCAGGAUUUAUUUCUUCCAUUUUAUUCUAAUGUUACAGGGUUUCAUACUAUUAAUCAUACGUUUGACAACCCUGUCAUACCUUUUAAGGAUGGUAUUUAUUUUGCUGCCACAGAGAAAUCAAAUGUUGUCCGUGGUUGGGUUUUUGGUUCUACCAUGAACAACAAGUCACAGUCGGUGAUUAUUAUUAACAAUUCUACUAAUGUUGUUAUACGAGCAUGUAACUUUGAAUUGUGUGACAACCCUUUCUUUGCUGUUUCUAAACCCAUGGGUACACAGACACAUACUAUGAUAUUCGAUAAUGCAUUUAAAUGCACUUUCGAGUACAUAUCU | |
| - example_title: insulin | |
| mask_index: 12 | |
| mask_index_1based: 13 | |
| masked_char: A | |
| output: | |
| - label: C | |
| score: 0.261781 | |
| - label: '?' | |
| score: 0.167051 | |
| - label: '*' | |
| score: 0.133536 | |
| - label: I | |
| score: 0.09981 | |
| - label: '|' | |
| score: 0.099001 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGGCCCUGUGG<mask>UGCGCCUCCUGCCCCUGCUGGCGCUGCUGGCCCUCUGGGGACCUGACCCAGCCGCAGCCUUUGUGAACCAACACCUGUGCGGCUCACACCUGGUGGAAGCUCUCUACCUAGUGUGCGGGGAACGAGGCUUCUUCUACACACCCAAGACCCGCCGGGAGGCAGAGGACCUGCAGGUGGGGCAGGUGGAGCUGGGCGGGGGCCCUGGUGCAGGCAGCCUGCAGCCCUUGGCCCUGGAGGGGUCCCUGCAGAAGCGUGGCAUUGUGGAACAAUGCUGUACCAGCAUCUGCUCCCUCUACCAGCUGGAGAACUACUGCAACUAG | |
| - example_title: cyclin dependent kinase inhibitor 2A | |
| mask_index: 18 | |
| mask_index_1based: 19 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.190741 | |
| - label: '*' | |
| score: 0.150517 | |
| - label: '|' | |
| score: 0.113423 | |
| - label: I | |
| score: 0.111556 | |
| - label: G | |
| score: 0.095289 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGGAGCCGGCGGCGGGG<mask>GCAGCAUGGAGCCUUCGGCUGACUGGCUGGCCACGGCCGCGGCCCGGGGUCGGGUAGAGGAGGUGCGGGCGCUGCUGGAGGCGGGGGCGCUGCCCAACGCACCGAAUAGUUACGGUCGGAGGCCGAUCCAGGUCAUGAUGAUGGGCAGCGCCCGAGUGGCGGAGCUGCUGCUGCUCCACGGCGCGGAGCCCAACUGCGCCGACCCCGCCACUCUCACCCGACCCGUGCACGACGCUGCCCGGGAGGGCUUCCUGGACACGCUGGUGGUGCUGCACCGGGCCGGGGCGCGGCUGGACGUGCGCGAUGCCUGGGGCCGUCUGCCCGUGGACCUGGCUGAGGAGCUGGGCCAUCGCGAUGUCGCACGGUACCUGCGCGCGGCUGCGGGGGGCACCAGAGGCAGUAACCAUGCCCGCAUAGAUGCCGCGGAAGGUCCCUCAGACAUCCCCGAUUGA | |
| - example_title: human papillomavirus type 16 E6 | |
| mask_index: 10 | |
| mask_index_1based: 11 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.169333 | |
| - label: '*' | |
| score: 0.133592 | |
| - label: A | |
| score: 0.11662 | |
| - label: G | |
| score: 0.109444 | |
| - label: '|' | |
| score: 0.10071 | |
| pipeline_tag: fill-mask | |
| sequence_type: mRNA | |
| task: fill-mask | |
| text: AUGCACCAAA<mask>GAGAACUGCAAUGUUUCAGGACCCACAGGAGCGACCCAGAAAGUUACCACAGUUAUGCACAGAGCUGCAAACAACUAUACAUGAUAUAAUAUUAGAAUGUGUGUACUGCAAGCAACAGUUACUGCGACGUGAGGUAUAUGACUUUGCUUUUCGGGAUUUAUGCAUAGUAUAUAGAGAUGGGAAUCCAUAUGCUGUAUGUGAUAAAUGUUUAAAGUUUUAUUCUAAAAUUAGUGAGUAUAGACAUUAUUGUUAUAGUUUGUAUGGAACAACAUUAGAACAGCAAUACAACAAACCGUUGUGUGAUUUGUUAAUUAGGUGUAUUAACUGUCAAAAGCCACUGUGUCCUGAAGAAAAGCAAAGACAUCUGGACAAAAAGCAAAGAUUCCAUAAUAUAAGGGGUCGGUGGACCGGUCGAUGUAUGUCUUGUUGCAGAUCAUCAAGAACACGUAGAGAAACCCAGCUGUAA | |
| - example_title: NRAS proto-oncogene | |
| mask_index: 36 | |
| mask_index_1based: 37 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.20744 | |
| - label: '*' | |
| score: 0.163305 | |
| - label: '|' | |
| score: 0.122595 | |
| - label: I | |
| score: 0.121137 | |
| - label: C | |
| score: 0.108824 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: GGGGCCGGAAGUGCCGCUCCUUGGUGGGGGCUGUUC<mask>UGGCGGUUCCGGGGUCUCCAACAUUUUUCCCGGCUGUGGUCCUAAAUCUGUCCAAAGCAGAGGCAGUGGAGCUUGAGGUUCUUGCUGGUGUGAA | |
| - example_title: amyloid beta precursor protein | |
| mask_index: 15 | |
| mask_index_1based: 16 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.224441 | |
| - label: '*' | |
| score: 0.176997 | |
| - label: '|' | |
| score: 0.133761 | |
| - label: I | |
| score: 0.131265 | |
| - label: . | |
| score: 0.105797 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: GUCAGUUUCCUCGGC<mask>GCGGUAGGCGAGAGCACGCGGAGGAGCGUGCGCGGGGGCCCCGGGAGACGGCGGCGGUGGCGGCGCGGGCAGAGCAAGGACGCGGCGGAUCCCACUCGCACAGCAGCGCACUCGGUGCCCCGCGCAGGGUCGCG | |
| - example_title: RUNX family transcription factor 1 | |
| mask_index: 15 | |
| mask_index_1based: 16 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.206538 | |
| - label: '*' | |
| score: 0.160702 | |
| - label: '|' | |
| score: 0.119129 | |
| - label: I | |
| score: 0.118095 | |
| - label: . | |
| score: 0.094544 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: ACUUCUUUGGGCCUC<mask>UAAACAACCACAGAACCACAAGUUGGGUAGCCUGGCAGUGUCAGAAGUCUGAACCCAGCAUAGUGGUCAGCAGGCAGGACGAAUCACACUGAAUGCAAACCACAGGGUUUCGCAGCGUGGUAAAAGAAAUCAUUGAGUCCCCCGCCUUCAGAAGAGGGUGCAUUUUCAGGAGGAAGCG | |
| - example_title: fragile X messenger ribonucleoprotein 1 | |
| mask_index: 15 | |
| mask_index_1based: 16 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.195416 | |
| - label: '*' | |
| score: 0.154775 | |
| - label: I | |
| score: 0.11592 | |
| - label: '|' | |
| score: 0.115607 | |
| - label: G | |
| score: 0.105457 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: CUCAGUCAGGCGCUC<mask>GCUCCGUUUCGGUUUCACUUCCGGUGGAGGGCCGCCUCUGAGCGGGCGGCGGGCCGACGGCGAGCGCGGGCGGCGGCGGUGACGGAGGCGCCGCUGCCAGGGGGCGUGCGGCAGCGCGGCGGCGGCGGCGGCGGCGGCGGCGGCGGAGGCGGCGGCGGCGGCGGCGGCGGCGGCGGCUGGGCCUCGAGCGCCCGCAGCCCACCUCUCGGGGGCGGGCUCCCGGCGCUAGCAGGGCUGAAGAGAAG | |
| - example_title: MYC proto-oncogene | |
| mask_index: 10 | |
| mask_index_1based: 11 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.202977 | |
| - label: '*' | |
| score: 0.16026 | |
| - label: '|' | |
| score: 0.119362 | |
| - label: I | |
| score: 0.117585 | |
| - label: . | |
| score: 0.094434 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: AACUCGCUGU<mask>GUAAUUCCAGCGAGAGGCAGAGGGAGCGAGCGGGCGGCCGGCUAGGGUGGAAGAGCCGGGCGAGCAGAGCUGCGCUGCGGGCGUCCUGGGAAGGGAGAUCCGGAGCGAAUAGGGGGCUUCGCCUCUGGCCCAGCCCUCCCGCUGAUCCCCCAGCCAGCGGUCCGCAACCCUUGCCGCAUCCACGAAACUUUGCCCAUAGCAGCGGGCGGGCACUUUGCACUGGAACUUACAACACCCGAGCAAGGACGCGACUCUCCCGACGCGGGGAGGCUAUUCUGCCCAUUUGGGGACACUUCCCCGCCGCUGCCAGGACCCGCUUCUCUGAAAGGCUCUCCUUGCAGCUGCUUAGACG | |
| - example_title: activating transcription factor 4 | |
| mask_index: 20 | |
| mask_index_1based: 21 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.238453 | |
| - label: '*' | |
| score: 0.189471 | |
| - label: '|' | |
| score: 0.141617 | |
| - label: I | |
| score: 0.139835 | |
| - label: . | |
| score: 0.112254 | |
| pipeline_tag: fill-mask | |
| sequence_type: 5' UTR | |
| task: fill-mask | |
| text: CAUUUCUACUUUGCCCGCCC<mask>CAGAUGUAGUUUUCUCUGCGCGUGUGCGUUUUCCCUCCUCCCCGCCCUCAGGGUCCACGGCCACCAUGGCGUAUUAGGGGCAGCAGUGCCUGCGGCAGCAUUGGCCUUUGCAGCGGCGGCAGCAGCACCAGGCUCUGCAGCGGCAACCCCCAGCGGCUUAAGCCAUGGCGCUUCUCACGGCAUUCAGCAGCAGCGUUGCUGUAACCGACAAAGACACCUUCGAAUUAAGCACAUUCCUCGAUUCCAGCAAAGCACCGCAAC | |
| - example_title: Human GPI protein p137 | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.203726 | |
| - label: '*' | |
| score: 0.160149 | |
| - label: '|' | |
| score: 0.119915 | |
| - label: I | |
| score: 0.118089 | |
| - label: A | |
| score: 0.100465 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: UUUUUAAAAGG<mask>AAAGAUACCAAAUGCCUGCUGCUACCACCCUUUUCAAUUGCUAUGUUUUGAAAGGCACCAGUAUGUGUUUUAGAUUGAUUUAAAUGUUUCAUUUAAAUCACGGACAGUAGUUUCAGUUCUGAUGGUAUAAGCAAAACAAAUAAAACGUUUAUAAAAGUUGUAUCUUGAAACACUGGUGUUCAACAGCUAGCAGCUUAUGUGAUUCACCCCAUGCCACGUUAGUGUCACAAAUUUUAUGGUUUAUCUCCAGCAACAUUUCUCUAGUACUUGCACUUAUUAUCUGAAUUC | |
| - example_title: nucleophosmin 1 | |
| mask_index: 11 | |
| mask_index_1based: 12 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.175375 | |
| - label: '*' | |
| score: 0.136246 | |
| - label: U | |
| score: 0.107147 | |
| - label: '|' | |
| score: 0.102165 | |
| - label: I | |
| score: 0.100268 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: GAAAAUAGUUU<mask>AACAAUUUGUUAAAAAAUUUUCCGUCUUAUUUCAUUUCUGUAACAGUUGAUAUCUGGCUGUCCUUUUUAUAAUGCAGAGUGAGAACUUUCCCUACCGUGUUUGAUAAAUGUUGUCCAGGUUCUAUUGCCAAGAAUGUGUUGUCCAAAAUGCCUGUUUAGUUUUUAAAGAUGGAACUCCACCCUUUGCUUGGUUUUAAGUAUGUAUGGAAUGUUAUGAUAGGACAUAGUAGUAGCGGUGGUCAGACAUGGAAAUGGUGGGGAGACAAAAAUAUACAUGUGAAAUAAAACUCAGUAUUUUAAUAAAGUAGCACGGUUUCUAUUGA | |
| - example_title: superoxide dismutase 1 | |
| mask_index: 12 | |
| mask_index_1based: 13 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.180425 | |
| - label: '*' | |
| score: 0.142506 | |
| - label: '|' | |
| score: 0.105775 | |
| - label: I | |
| score: 0.105049 | |
| - label: C | |
| score: 0.101959 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: ACAUUCCCUUGG<mask>UGUAGUCUGAGGCCCCUUAACUCAUCUGUUAUCCUGCUAGCUGUAGAAAUGUAUCCUGAUAAACAUUAAACACUGUAAUCUUAAAAGUGUAAUUGUGUGACUUUUUCAGAGUUGCUUUAAAGUACCUGUAGUGAGAAACUGAUUUAUGAUCACUUGGAAGAUUUGUAUAGUUUUAUAAAACUCAGUUAAAAUGUCUGUUUCAAUGACCUGUAUUUUGCCAGACUUAAAUCACAGAUGGGUAUUAAACUUGUCAGAAUUUCUUUGUCAUUCAAGCCUGUGAAUAAAAACCCUGUAUGGCACUUAUUAUGAGGCUAUUAAAAGAAUCCAAAUUCAAACUAAA | |
| - example_title: hemoglobin subunit alpha 2 | |
| mask_index: 13 | |
| mask_index_1based: 14 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.174786 | |
| - label: G | |
| score: 0.166439 | |
| - label: '*' | |
| score: 0.139318 | |
| - label: '|' | |
| score: 0.103622 | |
| - label: I | |
| score: 0.101995 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: CUGGAGCCUCGGU<mask>GCCGUUCCUCCUGCCCGCUGGGCCUCCCAACGGGCCCUCCUCCCCUCCUUGCACCGGCCCUUCCUGGUCUUUGAAUAAAGUCUGAGUGGGCAGCA | |
| - example_title: BRAF proto-oncogene | |
| mask_index: 12 | |
| mask_index_1based: 13 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.182087 | |
| - label: '*' | |
| score: 0.148305 | |
| - label: A | |
| score: 0.147731 | |
| - label: '|' | |
| score: 0.110948 | |
| - label: I | |
| score: 0.106279 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: AACAAAUGAGUG<mask>GAGAGUUCAGGAGAGUAGCAACAAAAGGAAAAUAAAUGAACAUAUGUUUGCUUAUAUGUUAAAUUGAAUAAAAUACUCUCUUUUUUUUUAAGGUGAACCAAAGAACACUUGUGUGGUUAAAGACUAGAUAUAAUUUUUCCCCAAACUAAAAUUUAUACUUAACAUUGGAUUUUUAACAUCCAAGGGUUAAAAUACAUAGACAUUGCUAAAAAUUGGCAGAGCCUCUUCUAGAGGCUUUACUUUCUGUUCCGGGUUUGUAUCAUUCACUUGGUUAUUUUAAGUAGUAAACUUCAGUUUCUCAUGCAACUUUUGUUGCCAGCUAUCACAUGUCCACUAGGGACUCCAGAAGAAGACCCUACCUAUGCCUGUGUUUGCAGGUGAGAAGUUGGCAGUCGGUUAGCCUGGG | |
| - example_title: H3 clustered histone 1 | |
| mask_index: 17 | |
| mask_index_1based: 18 | |
| masked_char: A | |
| output: | |
| - label: '?' | |
| score: 0.199656 | |
| - label: '*' | |
| score: 0.155685 | |
| - label: '|' | |
| score: 0.118332 | |
| - label: I | |
| score: 0.116603 | |
| - label: . | |
| score: 0.092642 | |
| pipeline_tag: fill-mask | |
| sequence_type: 3' UTR | |
| task: fill-mask | |
| text: UUACUGUGGUCUCUCUG<mask>CGGUCCAAGCAAAGGCUCUUUUCAGAGCCACCACCUUUUC | |
| --- | |
| # RNA-FM | |
| Pre-trained model on non-coding RNA (ncRNA) using a masked language modeling (MLM) objective. | |
| ## Disclaimer | |
| This is an UNOFFICIAL implementation of the [Interpretable RNA Foundation Model from Unannotated Data for Highly Accurate RNA Structure and Function Predictions](https://doi.org/10.1101/2022.08.06.503062) by Jiayang Chen, Zhihang Hu, Siqi Sun, et al. | |
| The OFFICIAL repository of RNA-FM is at [ml4bio/RNA-FM](https://github.com/ml4bio/RNA-FM). | |
| > [!TIP] | |
| > The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation. | |
| **The team releasing RNA-FM did not write this model card for this model so this model card has been written by the MultiMolecule team.** | |
| ## Model Details | |
| RNA-FM is a [bert](https://huggingface.co/google-bert/bert-base-uncased)-style model pre-trained on a large corpus of non-coding RNA sequences in a self-supervised fashion. This means that the model was trained on the raw nucleotides of RNA sequences only, with an automatic process to generate inputs and labels from those texts. Please refer to the [Training Details](#training-details) section for more information on the training process. | |
| ### Variants | |
| - **[multimolecule/rnafm](https://huggingface.co/multimolecule/rnafm)**: The RNA-FM model pre-trained on non-coding RNA sequences. | |
| - **[multimolecule/mrnafm](https://huggingface.co/multimolecule/mrnafm)**: The RNA-FM model pre-trained on messenger RNA sequences. | |
| ### Model Specification | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Variants</th> | |
| <th>Num Layers</th> | |
| <th>Hidden Size</th> | |
| <th>Num Heads</th> | |
| <th>Intermediate Size</th> | |
| <th>Num Parameters (M)</th> | |
| <th>FLOPs (G)</th> | |
| <th>MACs (G)</th> | |
| <th>Max Num Tokens</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>mRNA-FM</td> | |
| <td rowspan="2">12</td> | |
| <td>1280</td> | |
| <td rowspan="2">20</td> | |
| <td rowspan="2">5120</td> | |
| <td>239.26</td> | |
| <td>258.08</td> | |
| <td>128.85</td> | |
| <td rowspan="2">1024</td> | |
| </tr> | |
| <tr> | |
| <td><b>RNA-FM</b></td> | |
| <td>640</td> | |
| <td>99.52</td> | |
| <td>109.02</td> | |
| <td>54.36</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| ### Links | |
| - **Code**: [multimolecule.rnafm](https://github.com/DLS5-Omics/multimolecule/tree/master/multimolecule/models/rnafm) | |
| - **Data**: [multimolecule/rnacentral](https://huggingface.co/datasets/multimolecule/rnacentral) | |
| - **Paper**: [Interpretable RNA Foundation Model from Unannotated Data for Highly Accurate RNA Structure and Function Predictions](https://doi.org/10.1101/2022.08.06.503062) | |
| - **Developed by**: Jiayang Chen, Zhihang Hu, Siqi Sun, Qingxiong Tan, Yixuan Wang, Qinze Yu, Licheng Zong, Liang Hong, Jin Xiao, Tao Shen, Irwin King, Yu Li | |
| - **Model type**: [BERT](https://huggingface.co/google-bert/bert-base-uncased) - [ESM](https://huggingface.co/facebook/esm2_t48_15B_UR50D) | |
| - **Original Repository**: [ml4bio/RNA-FM](https://github.com/ml4bio/RNA-FM) | |
| ## Usage | |
| The model file depends on the [`multimolecule`](https://multimolecule.danling.org) library. You can install it using pip: | |
| ```bash | |
| pip install multimolecule | |
| ``` | |
| ### Direct Use | |
| #### Masked Language Modeling | |
| You can use this model directly with a pipeline for masked language modeling: | |
| ```python | |
| import multimolecule # you must import multimolecule to register models | |
| from transformers import pipeline | |
| predictor = pipeline("fill-mask", model="multimolecule/rnafm") | |
| output = predictor("gguc<mask>cucugguuagaccagaucugagccu") | |
| ``` | |
| ### Downstream Use | |
| #### Extract Features | |
| Here is how to use this model to get the features of a given sequence in PyTorch: | |
| ```python | |
| from multimolecule import RnaTokenizer, RnaFmModel | |
| tokenizer = RnaTokenizer.from_pretrained("multimolecule/rnafm") | |
| model = RnaFmModel.from_pretrained("multimolecule/rnafm") | |
| text = "UAGCUUAUCAGACUGAUGUUG" | |
| input = tokenizer(text, return_tensors="pt") | |
| output = model(**input) | |
| ``` | |
| #### Sequence Classification / Regression | |
| > [!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. | |
| Here is how to use this model as backbone to fine-tune for a sequence-level task in PyTorch: | |
| ```python | |
| import torch | |
| from multimolecule import RnaTokenizer, RnaFmForSequencePrediction | |
| tokenizer = RnaTokenizer.from_pretrained("multimolecule/rnafm") | |
| model = RnaFmForSequencePrediction.from_pretrained("multimolecule/rnafm") | |
| text = "UAGCUUAUCAGACUGAUGUUG" | |
| input = tokenizer(text, return_tensors="pt") | |
| label = torch.tensor([1]) | |
| output = model(**input, labels=label) | |
| ``` | |
| #### Token Classification / Regression | |
| > [!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. | |
| Here is how to use this model as backbone to fine-tune for a nucleotide-level task in PyTorch: | |
| ```python | |
| import torch | |
| from multimolecule import RnaTokenizer, RnaFmForTokenPrediction | |
| tokenizer = RnaTokenizer.from_pretrained("multimolecule/rnafm") | |
| model = RnaFmForTokenPrediction.from_pretrained("multimolecule/rnafm") | |
| text = "UAGCUUAUCAGACUGAUGUUG" | |
| input = tokenizer(text, return_tensors="pt") | |
| label = torch.randint(2, (len(text), )) | |
| output = model(**input, labels=label) | |
| ``` | |
| #### Contact Classification / Regression | |
| > [!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. | |
| Here is how to use this model as backbone to fine-tune for a contact-level task in PyTorch: | |
| ```python | |
| import torch | |
| from multimolecule import RnaTokenizer, RnaFmForContactPrediction | |
| tokenizer = RnaTokenizer.from_pretrained("multimolecule/rnafm") | |
| model = RnaFmForContactPrediction.from_pretrained("multimolecule/rnafm") | |
| text = "UAGCUUAUCAGACUGAUGUUG" | |
| input = tokenizer(text, return_tensors="pt") | |
| label = torch.randint(2, (len(text), len(text))) | |
| output = model(**input, labels=label) | |
| ``` | |
| ## Training Details | |
| RNA-FM used Masked Language Modeling (MLM) as the pre-training objective: taking a sequence, the model randomly masks 15% of the tokens in the input then runs the entire masked sentence through the model and has to predict the masked tokens. This is comparable to the Cloze task in language modeling. | |
| ### Training Data | |
| The RNA-FM model was pre-trained on [RNAcentral](https://multimolecule.danling.org/datasets/rnacentral). | |
| RNAcentral is a free, public resource that offers integrated access to a comprehensive and up-to-date set of non-coding RNA sequences provided by a collaborating group of [Expert Databases](https://rnacentral.org/expert-databases) representing a broad range of organisms and RNA types. | |
| RNA-FM applied [CD-HIT (CD-HIT-EST)](https://sites.google.com/view/cd-hit) with a cut-off at 100% sequence identity to remove redundancy from the RNAcentral. The final dataset contains 23.7 million non-redundant RNA sequences. | |
| RNA-FM preprocessed all tokens by replacing "U"s with "T"s. | |
| Note that during model conversions, "T" is replaced with "U". [`RnaTokenizer`][multimolecule.RnaTokenizer] will convert "T"s to "U"s for you, you may disable this behaviour by passing `replace_T_with_U=False`. | |
| ### Training Procedure | |
| #### Preprocessing | |
| RNA-FM used masked language modeling (MLM) as the pre-training objective. The masking procedure is similar to the one used in BERT: | |
| - Mask rate: 15% | |
| - Replacement: `<mask>` for 80% of masked tokens | |
| - Replacement: random token for 10% of masked tokens | |
| - Replacement: unchanged token for 10% of masked tokens | |
| #### Pre-training | |
| The model was trained on 8 NVIDIA A100 GPUs with 80GiB memories. | |
| - Learning rate: 1e-4 | |
| - Learning rate scheduler: Inverse square root | |
| - Learning rate warm-up: 10,000 steps | |
| - Weight decay: 0.01 | |
| ## Citation | |
| ```bibtex | |
| @article{chen2022interpretable, | |
| title={Interpretable rna foundation model from unannotated data for highly accurate rna structure and function predictions}, | |
| author={Chen, Jiayang and Hu, Zhihang and Sun, Siqi and Tan, Qingxiong and Wang, Yixuan and Yu, Qinze and Zong, Licheng and Hong, Liang and Xiao, Jin and King, Irwin and others}, | |
| journal={arXiv preprint arXiv:2204.00300}, | |
| year={2022} | |
| } | |
| ``` | |
| > [!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: | |
| ```bibtex | |
| @software{chen_2024_12638419, | |
| author = {Chen, Zhiyuan and Zhu, Sophia Y.}, | |
| title = {MultiMolecule}, | |
| doi = {10.5281/zenodo.12638419}, | |
| publisher = {Zenodo}, | |
| url = {https://doi.org/10.5281/zenodo.12638419}, | |
| year = 2024, | |
| month = may, | |
| day = 4 | |
| } | |
| ``` | |
| ## Contact | |
| Please use GitHub issues of [MultiMolecule](https://github.com/DLS5-Omics/multimolecule/issues) for any questions or comments on the model card. | |
| Please contact the authors of the [RNA-FM paper](https://doi.org/10.1101/2022.08.06.503062) for questions or comments on the paper/model. | |
| ## License | |
| This model implementation is licensed under the [GNU Affero General Public License](license.md). | |
| For additional terms and clarifications, please refer to our [License FAQ](license-faq.md). | |
| ```spdx | |
| SPDX-License-Identifier: AGPL-3.0-or-later | |
| ``` |