Run this model with HF Jobs

Run hunterkun/NvwaRNA-1.6B 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-1.6B. Ask me which dataset to train on, then push the fine-tuned model to a new private 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-1.6B 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.

You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Nüwa.RNA-1.6B is released under CC-BY-NC-4.0 for academic and non-commercial research. Please provide your affiliation, institutional email, and intended research use to request access.

Log in or Sign Up to review the conditions and access this model content.

Nüwa.RNA-1.6B

Nüwa.RNA-1.6B is the flagship 1.6B-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 ~1.6B
Architecture FlexBERT encoder (FlexBertForMaskedLM), RoPE, RMSNorm
Layers 32
Hidden Size 2,048
Attention Heads 32
FFN Intermediate Size 8,192
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, 2 shards)

Quickstart

import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

model_id = "hunterkun/NvwaRNA-1.6B"
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, 2048)
    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, 2048])

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

For access inquiries, research collaboration, or commercial licensing, 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
3
Safetensors
Model size
2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support