mrzz commited on
Commit
aec7387
·
verified ·
1 Parent(s): 4b2384f

Polish model card with quickstart, model comparison, and dataset guide

Browse files
Files changed (1) hide show
  1. README.md +142 -43
README.md CHANGED
@@ -2,26 +2,58 @@
2
  license: mit
3
  ---
4
 
 
 
5
  # La-Ribo
6
 
7
- ## Pretrained weights
8
 
9
- The released inference bundle is available in [weights/](https://huggingface.co/GENTEL-Lab/La-Ribo/tree/main/weights).
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `config.json` | Release configuration and model-bundle file map |
14
- | `weights/la_ribo_base.pt` | Base flow model, exported EMA weights |
15
- | `weights/la_ribo_tri.pt` | Tri flow model, exported EMA weights |
16
- | `weights/la_ribo_vae.pt` | Shared autoencoder weights |
17
- | `weights/latent_stats.pt` | Latent whitening statistics |
18
- | `weights/coarse_stats.pt` | Scaffold scaling statistics |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- The three model files are pure tensor state dictionaries. The normalization files contain only inference-required values and format fields. Base and Tri already contain EMA weights; no `--use_ema` flag is required.
21
 
22
- ### Download the inference bundle
23
 
24
- Run this from the local [La-Ribo inference repository](https://github.com/GENTEL-lab/La-Ribo):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- Both variants use the shared autoencoder and both statistics files. Choose `config/la-ribo-base.yaml` with `la_ribo_base.pt`, or `config/la-ribo-tri.yaml` with `la_ribo_tri.pt`. Installation and CPU/CUDA inference commands are in the [GitHub README](https://github.com/GENTEL-lab/La-Ribo#readme). The default sampling protocol uses 200 steps and scaffold/latent powers 1.25/2.0.
38
 
39
- `config.json` describes the released variants, weight files, architecture dimensions, and default sampling settings. It contains public inference configuration only.
 
 
 
 
 
 
 
 
 
 
 
40
 
41
- ### Download statistics
 
42
 
43
- Hugging Face uses access to the root `config.json` as the default download-counting signal for this model repository. The command above includes that file. Direct downloads of only `.pt` files or files under `data/` do not trigger this default model counter. HF counts matching GET/HEAD requests server-side; the displayed value is not a count of unique users or guaranteed completed weight transfers. See the [official counting rules](https://huggingface.co/docs/hub/models-download-stats).
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- The data below are optional for inference.
46
 
47
- ## Data
 
 
 
 
 
48
 
49
- The `data/` directory contains 10,631 RNA sequences together with 3D structures predicted by trRosettaRNA2 and per-residue pLDDT scores.
50
 
51
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  data/
53
- ├── metadata.csv # one row per RNA
54
- └── trran_data_publish.tar.gz # trRosettaRNA2-predicted structures (539 MB)
 
 
 
55
  ```
56
 
57
- ### `metadata.csv`
 
 
 
 
 
 
 
 
 
58
 
59
  | Column | Description |
60
  |---|---|
61
- | `name` | Entry ID, also the directory name inside the archive (e.g. `000011_bpRNA_RFAM_7168_L89`) |
62
- | `original_task_id` | Task ID from the original prediction pipeline |
63
- | `source_db` | Source database: `bpRNA-1m90` (6,458) or `RNAStrAlign` (4,173) |
64
- | `source_id` | ID of the entry in the source database |
65
- | `length` | Sequence length (16–252 nt, median 77) |
66
- | `mean_plddt` | Mean pLDDT over all residues (0.80–0.99) |
67
  | `min_residue_plddt` | Minimum per-residue pLDDT |
68
  | `max_residue_plddt` | Maximum per-residue pLDDT |
69
- | `cluster_rep_id90_cov95` | Cluster representative at 90% sequence identity / 95% coverage (10,139 clusters) |
70
  | `sequence` | RNA sequence |
71
 
72
- ### `trran_data_publish.tar.gz`
73
 
74
- Each entry in `metadata.csv` has one directory in the archive:
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
- ### Download
84
 
85
- ```bash
86
- hf download GENTEL-Lab/La-Ribo --include "data/*" --local-dir La-Ribo
87
- tar -xzf La-Ribo/data/trran_data_publish.tar.gz -C La-Ribo/data
 
 
 
 
 
 
 
 
 
 
 
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
+ [![Paper](https://img.shields.io/badge/arXiv-2610.12236-B31B1B?style=flat-square)](https://arxiv.org/abs/2610.12236)
14
+ [![Code](https://img.shields.io/badge/GitHub-Code-181717?style=flat-square&logo=github)](https://github.com/GENTEL-lab/La-Ribo)
15
+ [![Weights](https://img.shields.io/badge/Weights-Available-2D8C74?style=flat-square)](https://huggingface.co/GENTEL-Lab/La-Ribo/tree/main/weights)
16
+ [![License](https://img.shields.io/badge/License-MIT-596579?style=flat-square)](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.