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.
Instructions to use hunterkun/NvwaRNA-650M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hunterkun/NvwaRNA-650M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="hunterkun/NvwaRNA-650M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("hunterkun/NvwaRNA-650M", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("hunterkun/NvwaRNA-650M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
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.
- Paper (NeurIPS 2026): Nüwa.RNA: An RNA Foundation Model for Unified Representation with Deep Structure Infusion
- Code: SAIS-LifeScience/NvwaRNA
- 1.6B Checkpoint: hunterkun/NvwaRNA-1.6B
- License: Apache-2.0
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. Withoutflash-attnor 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