Minerva: coevolutionary discovery using genome language models

Minerva-RiNALMo-giga

Minerva framework for coevolutionary mining on the RiNALMo-giga model. For researchers studying Eukaryotic RNA's, RiNALMo may serve as a better base model than Minerva-MLM which was trained on prokaryotic genomes.

Full documentation: github.com/garykbrixi/minerva · Try it in the browser here

Install

pip install "transformers>=4.41" torch safetensors

Quick Start

import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

repo = "gbrixi/minerva-rinalmo-giga"
model = AutoModelForMaskedLM.from_pretrained(repo, trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(repo)

seq = "GGGGCUUUAGCUCAGCUGGGAGAGCGCCUGCCUUGCACGCAGGAGGUCAGCGGUUCGAUCCGCUAAGCUCCA"
tokens = tokenizer(seq, return_tensors="pt")

with torch.no_grad():
    out = model(**tokens, output_interactions=True)

base_pairing = out.interactions["base_pairing"]  # [batch, L, L]
repeat = out.interactions["repeat"]              # [batch, L, L]

Interaction maps are indexed over the sequence: <cls>/<eos> are cropped, so a 72 nt input gives a 72x72 map.

With minerva-dna installed, call_structure turns the map into an RNA structure diagram:

from minerva.rna_structure import call_structure

s = call_structure(base_pairing, seq)
s.dot_bracket   # '(((((((..(((..........))).(((((.......))))).....(((((......)))))))))))).'

Input windows

Since RiNALMo is not trained on genomic windows, base-pairing accuracy drops when an RNA sits in its natural genomic context. Using short windows rather than a long genomic slice may help with applying this model to genomic sequences. RiNALMo is also sensitive to strand orientation, so we suggest analyzing both the forward and reverse complement predictions.

Citation

If you use Minerva, please cite Li & Brixi et al., bioRxiv 2026:

@article{li2026minerva,
  title     = {Coevolutionary mining of prokaryotic non-coding elements with a genome language model},
  author    = {Li, David B. and Brixi, Garyk and Kim, Alexandra S. and Fiamenghi, Mateus B. and Driscoll, Claudia L. and Evans, Simone A. and Gao, Alex and Ivanova, Natalia N. and Kyrpides, Nikos C. and Deisseroth, Karl and Wilkinson, Max E. and Fischbach, Michael A. and Hie, Brian L.},
  journal   = {bioRxiv},
  year      = {2026},
  doi       = {10.64898/2026.09.22.753630},
  url       = {https://www.biorxiv.org/content/10.64898/2026.09.22.753630},
  publisher = {Cold Spring Harbor Laboratory}
}

If you use this checkpoint, please also cite RiNALMo, Penić et al., Nat Commun 2025:

@article{penic2025rinalmo,
  title   = {{RiNALMo}: general-purpose {RNA} language models can generalize well on structure prediction tasks},
  author  = {Peni{\'c}, Rafael Josip and Vla{\v{s}}i{\'c}, Tin and Huber, Roland G. and Wan, Yue and {\v{S}}iki{\'c}, Mile},
  journal = {Nature Communications},
  volume  = {16},
  pages   = {5671},
  year    = {2025},
  doi     = {10.1038/s41467-025-60872-5}
}

License

Apache 2.0. The backbone is RiNALMo (Apache 2.0); its model code is vendored in this repo as vendor_rinalmo.py with its licence in LICENSE-rinalmo.txt.

Downloads last month
245
Safetensors
Model size
0.7B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using gbrixi/minerva-rinalmo-giga 1

Collection including gbrixi/minerva-rinalmo-giga