Run this model with HF Jobs

Run hunterkun/NvwaRNA-650M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/hunterkun/NvwaRNA-650M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/hunterkun/NvwaRNA-650M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Nüwa.RNA-650M

Nüwa.RNA-650M is the 650M-parameter checkpoint of Nüwa.RNA (NeurIPS 2026), an encoder-only RNA foundation model pre-trained with a structure-driven multi-level pre-training framework that integrates RNA secondary structure across dual-granularity masking, noisy structural attention bias, and a structure denoising objective.

At inference time, the model takes raw RNA sequences alone without requiring an external folding tool.

Model Specifications

Property Value
Parameters ~650M
Architecture FlexBERT encoder (FlexBertForMaskedLM), RoPE, RMSNorm
Layers 33
Hidden Size 1,280
Attention Heads 20
FFN Intermediate Size 5,120
Attention Pattern Hybrid local (window 128) + global (every 3 layers)
Max Sequence Length 1,024
Tokenization Single-nucleotide (A, C, G, U/T, N)
Precision FP32 (safetensors)

Quickstart

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)
    hidden = outputs.last_hidden_state  # (batch, seq_len, 1280)
    mask = inputs["attention_mask"].unsqueeze(-1).float()
    embeddings = (hidden * mask).sum(dim=1) / mask.sum(dim=1).clamp(min=1e-9)

print(embeddings.shape)  # torch.Size([2, 1280])

Pass output_attentions=True to model.bert(...) to extract per-layer attention maps for zero-shot secondary structure analysis. Full downstream fine-tuning and zero-shot scripts are available in SAIS-LifeScience/NvwaRNA.

Note: On CUDA GPUs with flash-attn >= 2.5.7, the model automatically uses FlashAttention-2 for fast unpadded inference. Without flash-attn or on CPU, it automatically falls back to PyTorch SDPA.

Contact

If you have any questions or would like to collaborate, please email huangkun@sais.org.cn.

Citation

@inproceedings{huang2026nuwarna,
  title     = {N{\"u}wa.{RNA}: An {RNA} Foundation Model for Unified Representation with Deep Structure Infusion},
  author    = {Kun Huang and Jiyang Li and Xin Guo and Limei Han and Yuan Cheng},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}
Downloads last month
27
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