The MultiMolecule implementation preserves the released BPfold architecture, base-pair motif energy feature construction, and canonical/non-canonical post-processing semantics.
The team releasing BPfold did not write this model card for this model so this model card has been written by the MultiMolecule team.
Model Details
BPfold predicts RNA base-pair contact maps from a single RNA sequence. It augments a transformer encoder with two
L x L
base-pair motif energy maps computed from three-neighbor base-pair motifs. MultiMolecule exposes BPfold as a single checkpoint and stores the motif-energy lookup tables inside it.
The model uses:
token order
: follows the MultiMolecule tokenizer.
unknown bases
: tokenized as
N
and treated as
U
during BPfold feature construction, matching the upstream fallback; padding follows
attention_mask
.
self-attention
: dynamic position bias with adjacency bias from motif-energy maps.
pairwise convolutions
: three residual 2D convolution layers over the adjacency maps before the transformer blocks.
post-processing
: constrained refinement for canonical pairs, plus the optional BPfold non-canonical pass and mixed canonical/non-canonical outputs.
Model Specification
Num Layers
Hidden Size
Num Parameters (M)
FLOPs (G)
MACs (G)
12
256
47.77
87.78
42.74
FLOPs and MACs are computed with
multimolecule.utils
for one 600 nt sequence.
from multimolecule import BpfoldModel, RnaTokenizer
tokenizer = RnaTokenizer.from_pretrained("multimolecule/bpfold")
model = BpfoldModel.from_pretrained("multimolecule/bpfold")
input = tokenizer("GGUAAAACAGCCUGU", return_tensors="pt")
output = model(**input)
contact_map = output.contact_map # (1, L, L) base-pair probability matrix
Training Details
BPfold was trained for RNA secondary structure prediction with base-pair motif energy priors.
Training Data
RNAStrAlign: 37,149 RNAs from eight RNA families were filtered to remove redundant sequences and invalid secondary structures, yielding 29,647 unique RNAs. Sequences longer than 600 nt were removed for training, leaving 19,313 training RNAs.
bpRNA-1m: 102,318 RNAs from 2,588 families were deduplicated with CD-HIT at 80% sequence identity and split into TR0/TS0 with 12,114/1,305 RNAs.
objective: binary cross entropy over base-pair contact maps.
optimizer: Adam.
learning rate: 5e-4.
training epochs: 150.
batch size: 48.
positive-class weight: 300.
batching: length-matching mini-batches to reduce padding.
sequence features: token embeddings converted to the MultiMolecule tokenizer order.
structural priors: two
L x L
energy maps from three-neighbor base-pair motifs.
post-processing: constrained refinement for canonical pairs, minimum loop length, non-overlapping pairs, and isolated-pair removal.
Citation
@article{zhu2025bpfold,
title = {Deep generalizable prediction of {RNA} secondary structure via base pair motif energy},
author = {Zhu, Heqin and Tang, Fenghe and Quan, Quan and Chen, Ke and Xiong, Peng and Zhou, S. Kevin},
journal = {Nature Communications},
volume = {16},
number = {1},
pages = {5856},
year = {2025},
doi = {10.1038/s41467-025-60048-1},
url = {https://doi.org/10.1038/s41467-025-60048-1}
}
The artifacts distributed in this repository are part of the MultiMolecule project.
If you use MultiMolecule in your research, you must cite the MultiMolecule project.
bpfold huggingface.co is an AI model on huggingface.co that provides bpfold's model effect (), which can be used instantly with this multimolecule bpfold model. huggingface.co supports a free trial of the bpfold model, and also provides paid use of the bpfold. Support call bpfold model through api, including Node.js, Python, http.
bpfold huggingface.co is an online trial and call api platform, which integrates bpfold's modeling effects, including api services, and provides a free online trial of bpfold, you can try bpfold online for free by clicking the link below.
multimolecule bpfold online free url in huggingface.co:
bpfold is an open source model from GitHub that offers a free installation service, and any user can find bpfold on GitHub to install. At the same time, huggingface.co provides the effect of bpfold install, users can directly use bpfold installed effect in huggingface.co for debugging and trial. It also supports api for free installation.