Nüwa.RNA-650M: A Language Model for RNA Analysis with Built-in Structural Awareness
2 min readupdated
Nüwa.RNA-650M is a compact 650M-parameter version of the Nüwa.RNA language model family, introduced at NeurIPS 2026. Built specifically for working with ribonucleic acids, the model is trained using a multi-level framework that embeds secondary structure data directly into the pre-training phase. Its standout feature is that inference requires no external folding tools—the model accepts raw nucleotide sequences natively. This development will benefit bioinformatics and life sciences researchers looking to extract embeddings and analyze structures.
Key features
- 650M parameters: a balanced version based on the FlexBERT encoder-only architecture with a context length of up to 1024 tokens.
- Structural infusion: integration of RNA secondary structure through dual-granularity masking and noisy structural attention.
- Hybrid attention: a combination of local windows (128) and global layers every 3 steps for efficient processing of long chains.
- Automated FlashAttention-2: accelerated performance on CUDA GPUs with automatic fallback support for PyTorch SDPA.
What you can do
- Embedding extraction: generation of vector representations for raw RNA sequences for classification or clustering tasks.
- Secondary structure analysis: zero-shot extraction of layer-wise attention maps via the output_attentions=True parameter.
- Fine-tuning: adaptation of the model to specific downstream bioinformatics tasks using the official repository.
Example
import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer
model_id = "hunterkun/NvwaRNA-650M"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True).to(device).eval()
sequences = [
"GGCUAGCUCAGUCGGUAGAGCACGACCUUGCCAAGGUCGGGGUCGCGAGUUCGAGUCUCGUGCUAGCCACCA",
"GGCGUCAGGCUUUGCUUGUGGUGGCUGGCAGCGACUGACGUCU",
]
inputs = tokenizer(sequences, padding=True, truncation=True, return_tensors="pt").to(device)
with torch.no_grad():
outputs = model.bert(**inputs, return_dict=True)
embeddings = outputs.last_hidden_state.mean(dim=1)
print(embeddings.shape)Read more
DetailsArchitecture: 33 layers, hidden size 1280, 20 attention heads, FFN intermediate size 5120.
Tokenization: single nucleotides (A, C, G, U/T, N).
Constraints: FP32 precision (safetensors), Apache-2.0 license.










Comments