Polish model card with quickstart, model comparison, and dataset guide
Browse files
README.md
CHANGED
|
@@ -2,26 +2,58 @@
|
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
|
|
|
|
|
|
|
| 5 |
# La-Ribo
|
| 6 |
|
| 7 |
-
##
|
| 8 |
|
| 9 |
-
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
##
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
```bash
|
| 27 |
uvx --from huggingface_hub hf download GENTEL-Lab/La-Ribo \
|
|
@@ -34,55 +66,122 @@ uvx --from huggingface_hub hf download GENTEL-Lab/La-Ribo \
|
|
| 34 |
--local-dir .
|
| 35 |
```
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
data/
|
| 53 |
-
├── metadata.csv
|
| 54 |
-
└── trran_data_publish.tar.gz
|
|
|
|
|
|
|
|
|
|
| 55 |
```
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
| Column | Description |
|
| 60 |
|---|---|
|
| 61 |
-
| `name` | Entry ID
|
| 62 |
-
| `original_task_id` | Task ID from the
|
| 63 |
-
| `source_db` |
|
| 64 |
-
| `source_id` | ID
|
| 65 |
-
| `length` | Sequence length
|
| 66 |
-
| `mean_plddt` | Mean pLDDT
|
| 67 |
| `min_residue_plddt` | Minimum per-residue pLDDT |
|
| 68 |
| `max_residue_plddt` | Maximum per-residue pLDDT |
|
| 69 |
-
| `cluster_rep_id90_cov95` |
|
| 70 |
| `sequence` | RNA sequence |
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
-
trran_data_publish/
|
| 78 |
-
└── <name>/
|
| 79 |
-
├── model_1_relaxed200.pdb # 3D structure predicted by trRosettaRNA2
|
| 80 |
-
└── plddt.csv # per-residue pLDDT (columns: Residue_Index, pLDDT)
|
| 81 |
-
```
|
| 82 |
|
| 83 |
-
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
```
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
|
| 5 |
+
<div align="center">
|
| 6 |
+
|
| 7 |
# La-Ribo
|
| 8 |
|
| 9 |
+
### RNA Co-Design via Geometry–Latent Flow Matching
|
| 10 |
|
| 11 |
+
Generate RNA sequences and three-dimensional heavy-atom structures together.
|
| 12 |
|
| 13 |
+
[](https://arxiv.org/abs/2610.12236)
|
| 14 |
+
[](https://github.com/GENTEL-lab/La-Ribo)
|
| 15 |
+
[](https://huggingface.co/GENTEL-Lab/La-Ribo/tree/main/weights)
|
| 16 |
+
[](https://github.com/GENTEL-lab/La-Ribo/blob/main/LICENSE)
|
| 17 |
+
|
| 18 |
+
[Quickstart](#quickstart) · [Models](#models) · [Files](#release-files) · [Dataset](#dataset) · [Citation](#citation)
|
| 19 |
+
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
La-Ribo jointly samples a phosphate–sugar–base scaffold and residue-wise latent vectors. A shared autoencoder decodes this representation into nucleotide identities and heavy-atom coordinates.
|
| 25 |
+
|
| 26 |
+
This repository provides **two pretrained flow models**, their shared autoencoder and normalization statistics, and **10,631 trRosettaRNA2-predicted RNA structures** released with the paper.
|
| 27 |
+
|
| 28 |
+
## Models
|
| 29 |
+
|
| 30 |
+
| | La-Ribo-Base | La-Ribo-Tri |
|
| 31 |
+
|---|---|---|
|
| 32 |
+
| Pair-feature updates | No triangle updates | Triangle updates every 2 blocks |
|
| 33 |
+
| Flow layers / latent dimension | 12 / 16 | 12 / 16 |
|
| 34 |
+
| Flow checkpoint | `la_ribo_base.pt` | `la_ribo_tri.pt` |
|
| 35 |
+
| Config in the code repository | `config/la-ribo-base.yaml` | `config/la-ribo-tri.yaml` |
|
| 36 |
|
| 37 |
+
Both variants use **EMA flow weights**, the same VAE, and the same statistics files. The default sampling settings are **200 Euler steps**, scaffold power **1.25**, and latent power **2.0**.
|
| 38 |
|
| 39 |
+
## Quickstart
|
| 40 |
|
| 41 |
+
### 1. Install the inference code
|
| 42 |
+
|
| 43 |
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
git clone https://github.com/GENTEL-lab/La-Ribo.git
|
| 47 |
+
cd La-Ribo
|
| 48 |
+
uv python install 3.14
|
| 49 |
+
uv sync --locked
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
**Requirements:** Python 3.14+; CPU, including macOS, or NVIDIA CUDA on Linux. CUDA inference requires a CUDA 13-compatible driver.
|
| 53 |
+
|
| 54 |
+
### 2. Download the model bundle
|
| 55 |
+
|
| 56 |
+
Run this from the cloned code directory. The dataset is optional and is not included in this command.
|
| 57 |
|
| 58 |
```bash
|
| 59 |
uvx --from huggingface_hub hf download GENTEL-Lab/La-Ribo \
|
|
|
|
| 66 |
--local-dir .
|
| 67 |
```
|
| 68 |
|
| 69 |
+
### 3. Generate with La-Ribo-Tri
|
| 70 |
|
| 71 |
+
```bash
|
| 72 |
+
uv run --no-sync python sample_latent_flow.py \
|
| 73 |
+
--config config/la-ribo-tri.yaml \
|
| 74 |
+
--checkpoint weights/la_ribo_tri.pt \
|
| 75 |
+
--autoencoder_checkpoint weights/la_ribo_vae.pt \
|
| 76 |
+
--latent_stats weights/latent_stats.pt \
|
| 77 |
+
--coarse_stats weights/coarse_stats.pt \
|
| 78 |
+
--num_res 80 \
|
| 79 |
+
--seed 2027 \
|
| 80 |
+
--device auto \
|
| 81 |
+
--output samples/tri_80_seed2027.pdb
|
| 82 |
+
```
|
| 83 |
|
| 84 |
+
<details>
|
| 85 |
+
<summary><strong>Generate with La-Ribo-Base</strong></summary>
|
| 86 |
|
| 87 |
+
```bash
|
| 88 |
+
uv run --no-sync python sample_latent_flow.py \
|
| 89 |
+
--config config/la-ribo-base.yaml \
|
| 90 |
+
--checkpoint weights/la_ribo_base.pt \
|
| 91 |
+
--autoencoder_checkpoint weights/la_ribo_vae.pt \
|
| 92 |
+
--latent_stats weights/latent_stats.pt \
|
| 93 |
+
--coarse_stats weights/coarse_stats.pt \
|
| 94 |
+
--num_res 80 \
|
| 95 |
+
--seed 2027 \
|
| 96 |
+
--device auto \
|
| 97 |
+
--output samples/base_80_seed2027.pdb
|
| 98 |
+
```
|
| 99 |
|
| 100 |
+
</details>
|
| 101 |
|
| 102 |
+
| To change… | Set… |
|
| 103 |
+
|---|---|
|
| 104 |
+
| RNA length | `--num_res`; the paper benchmark covers 40–150 nt |
|
| 105 |
+
| Random sample | `--seed`, together with a new output filename |
|
| 106 |
+
| Compute device | `--device cpu` or `--device cuda`; `auto` selects CUDA when available, otherwise CPU |
|
| 107 |
+
| NVIDIA GPU | Prefix the command with `CUDA_VISIBLE_DEVICES=0`, replacing `0` with the desired index |
|
| 108 |
|
| 109 |
+
**Outputs:** a PDB containing the generated sequence and heavy-atom coordinates, plus a neighboring `.summary.json` with sampling parameters and provenance. Output directories are created automatically; existing samples are not overwritten.
|
| 110 |
|
| 111 |
+
These commands perform sampling. Refolding and designability evaluation are separate procedures. Matching CPU/CUDA seeds alone does not guarantee identical structures because the backends use different random-number implementations.
|
| 112 |
+
|
| 113 |
+
## Release files
|
| 114 |
+
|
| 115 |
+
| File | Contents |
|
| 116 |
+
|---|---|
|
| 117 |
+
| [`config.json`](https://huggingface.co/GENTEL-Lab/La-Ribo/blob/main/config.json) | Variant definitions, architecture dimensions, file locations, and sampling defaults |
|
| 118 |
+
| `weights/la_ribo_base.pt` | Base EMA state dictionary |
|
| 119 |
+
| `weights/la_ribo_tri.pt` | Tri EMA state dictionary |
|
| 120 |
+
| `weights/la_ribo_vae.pt` | Shared autoencoder state dictionary |
|
| 121 |
+
| `weights/latent_stats.pt` | Latent whitening statistics |
|
| 122 |
+
| `weights/coarse_stats.pt` | Scaffold scaling statistics |
|
| 123 |
+
|
| 124 |
+
The model files are **pure tensor state dictionaries**. EMA is already applied to the flow weights, so no `--use_ema` flag is required. Both statistics files are needed to reconstruct the correct latent and coordinate scales; they contain only inference-required values and format fields.
|
| 125 |
+
|
| 126 |
+
## Dataset
|
| 127 |
+
|
| 128 |
+
The `data/` directory contains **10,631 RNA sequences**, corresponding **trRosettaRNA2-predicted structures**, and **per-residue pLDDT scores**. It is optional for pretrained-model inference.
|
| 129 |
+
|
| 130 |
+
```text
|
| 131 |
data/
|
| 132 |
+
├── metadata.csv
|
| 133 |
+
└── trran_data_publish.tar.gz
|
| 134 |
+
└── <name>/
|
| 135 |
+
├── model_1_relaxed200.pdb
|
| 136 |
+
└── plddt.csv
|
| 137 |
```
|
| 138 |
|
| 139 |
+
```bash
|
| 140 |
+
uvx --from huggingface_hub hf download GENTEL-Lab/La-Ribo \
|
| 141 |
+
--include "data/*" --local-dir .
|
| 142 |
+
tar -xzf data/trran_data_publish.tar.gz -C data
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
<details>
|
| 146 |
+
<summary><strong>Dataset metadata and archive format</strong></summary>
|
| 147 |
+
|
| 148 |
+
`metadata.csv` contains one row per RNA:
|
| 149 |
|
| 150 |
| Column | Description |
|
| 151 |
|---|---|
|
| 152 |
+
| `name` | Entry ID and archive directory name, e.g. `000011_bpRNA_RFAM_7168_L89` |
|
| 153 |
+
| `original_task_id` | Task ID from the prediction pipeline |
|
| 154 |
+
| `source_db` | `bpRNA-1m90` (6,458) or `RNAStrAlign` (4,173) |
|
| 155 |
+
| `source_id` | ID in the source database |
|
| 156 |
+
| `length` | Sequence length: 16–252 nt, median 77 |
|
| 157 |
+
| `mean_plddt` | Mean pLDDT, on a 0–1 scale: 0.80–0.99 |
|
| 158 |
| `min_residue_plddt` | Minimum per-residue pLDDT |
|
| 159 |
| `max_residue_plddt` | Maximum per-residue pLDDT |
|
| 160 |
+
| `cluster_rep_id90_cov95` | Sequence-cluster representative: 10,139 clusters |
|
| 161 |
| `sequence` | RNA sequence |
|
| 162 |
|
| 163 |
+
The approximately 539 MB archive extracts to `trran_data_publish/`. Each entry directory contains `model_1_relaxed200.pdb` and `plddt.csv`; the CSV columns are `Residue_Index` and `plddt`.
|
| 164 |
|
| 165 |
+
</details>
|
| 166 |
|
| 167 |
+
## Download statistics
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
|
| 169 |
+
The model-bundle command includes `config.json`, which Hugging Face uses as this repository's default download-counting signal. Downloading only `.pt` files or files under `data/` does not trigger that default model counter.
|
| 170 |
|
| 171 |
+
HF counts matching GET/HEAD requests server-side. The displayed metric is not a count of unique users or guaranteed completed weight transfers. [How model downloads are counted →](https://huggingface.co/docs/hub/models-download-stats)
|
| 172 |
+
|
| 173 |
+
## Citation
|
| 174 |
+
|
| 175 |
+
```bibtex
|
| 176 |
+
@article{ma2026laribo,
|
| 177 |
+
title = {La-Ribo: RNA Co-Design via Geometry-Latent Flow Matching},
|
| 178 |
+
author = {Ma, Runze and Hua, Will and Zheng, Shuangjia},
|
| 179 |
+
year = {2026},
|
| 180 |
+
eprint = {2610.12236},
|
| 181 |
+
archivePrefix = {arXiv},
|
| 182 |
+
primaryClass = {q-bio.BM},
|
| 183 |
+
url = {https://arxiv.org/abs/2610.12236}
|
| 184 |
+
}
|
| 185 |
```
|
| 186 |
+
|
| 187 |
+
Released under the **MIT License**. See the [code repository](https://github.com/GENTEL-lab/La-Ribo) for implementation details.
|