kierandidi commited on
Commit
c5366b8
·
verified ·
1 Parent(s): 2a71623

Model card: 2026-10-19 release, Diffusers support, stored parameters, recycle presets, revision pin

Browse files
Files changed (1) hide show
  1. README.md +44 -23
README.md CHANGED
@@ -34,10 +34,10 @@ the root are the *native* weights, loaded by `Proteina.from_pretrained`.
34
  |---|---|---|---|
35
  | `Proteina.from_pretrained("nvidia/RFD4-Proteina")` | Native | root of this repo | **Supported** |
36
  | `Rfd4ProteinaModel.from_pretrained("nvidia/RFD4-Proteina", subfolder="transformers")` | Transformers | `transformers/` here | **Supported**, with limits below |
37
- | `RFD4ProteinaPipeline.from_pretrained("nvidia/RFD4-Proteina-Diffusers")` | Diffusers | [its own repo](https://huggingface.co/nvidia/RFD4-Proteina-Diffusers) | Pending; still serves the previous release |
38
 
39
  It is one model throughout — nothing is retrained. The Diffusers weights are the same tensors
40
- re-prefixed and split across `transformer/` and `autoencoder/`; the Transformers weights differ
41
  only in that the fused query/key/value projection is split into three. Each library resolves its
42
  own filenames, which is why they cannot share a single directory: a Transformers export writes
43
  `config.json` and `model.safetensors`, the same names the native bundle already uses at the root.
@@ -45,9 +45,9 @@ Diffusers needs `model_index.json` at the root of whatever it is pointed at, so
45
  repository. Annotated-CIF preprocessing for both libraries is in
46
  [`nvidia/RFD4-Proteina-prep`](https://huggingface.co/nvidia/RFD4-Proteina-prep).
47
 
48
- > **Diffusers is not updated yet.** `nvidia/RFD4-Proteina-Diffusers` still holds the **previous**
49
- > release (33-class vocabulary, 16-dimensional latent) — following its examples gives you the
50
- > previous model, not this one.
51
  >
52
  > **The Transformers checkpoint supports generation only, for now.** Preparing an annotated CIF
53
  > uses [`rfd4-proteina-prep`](https://huggingface.co/nvidia/RFD4-Proteina-prep), which does not
@@ -67,7 +67,7 @@ Training data lives in the companion [dataset repository](https://huggingface.co
67
  | **Model** | Joint sequence–structure generation with a matched flow model and autoencoder |
68
  | **Inputs** | Annotated CIF structures or YAML condition specifications |
69
  | **Outputs** | Designed molecular structures in CIF format, with generated residue identities and coordinates |
70
- | **Weights** | EMA weights; 435,622,721 stored parameters across the paired bundle, in FP32 |
71
  | **Download** | 1.74 GB for `model.safetensors`, plus `config.json`; training data is a separate download |
72
  | **Runtime** | RFD4 Python package; Linux x86_64, Python 3.12, supported NVIDIA GPU and CUDA 13-compatible driver |
73
  | **License** | [BSD 3-Clause](LICENSE) for the RFD4 model and weights; optional third-party assets have separate terms |
@@ -78,19 +78,22 @@ The bundle includes both model components. Use the RFD4 loader below; this is a
78
 
79
  The release is a **matched pair**: a flow model and the autoencoder it was trained against. They are not interchangeable across releases — the autoencoder defines the latent space the flow model generates in, and mixing a flow model with a different autoencoder produces nonsense rather than an error.
80
 
81
- | | Current release | Previous release |
82
  |---|---|---|
83
- | Flow model | `2026_10_15_hero_s43_c512_80k-ema` | `chk_epoch_00000169_step_000000340000-ema` |
84
- | Autoencoder | `2026_10_15_unified_ae_s43_400k-ema` | `2026_09_04_release_ae_z16_400k-ema` |
85
  | Latent dimension | 32 | 16 |
86
  | Residue vocabulary | 147 classes | 33 classes |
87
- | Stored parameters | 435,622,721 | 434,348,737 |
 
 
88
 
89
  The current release's autoencoder is **unified**: one autoencoder covering proteins, nucleic acids and small molecules, with a 147-class residue vocabulary in place of the previous 33-class protein vocabulary, and a 32-dimensional latent in place of 16. This is the change that makes the two releases incompatible with each other's components.
90
 
91
  | File | Use |
92
  |---|---|
93
  | [`config.json`](config.json) + `model.safetensors` | Recommended paired bundle for `Proteina.from_pretrained` |
 
94
  | `flow_checkpoints/rfd4_proteina_flow-ema.ckpt` | Native Lightning flow EMA weights |
95
  | `ae_checkpoints/rfd4_proteina_ae-ema.ckpt` | Matching native Lightning autoencoder EMA weights |
96
  | [`release-checkpoints.json`](release-checkpoints.json) | Pair identity, stable aliases, source filenames, and SHA-256 checksums |
@@ -124,7 +127,7 @@ From the checkout root:
124
  ```bash
125
  rfd4-generate inputs=data/benchmarks/monomer/monomer-short.cif \
126
  hf_ckpt_path=nvidia/RFD4-Proteina \
127
- hf_ckpt_revision=976e0c906b56d59d460ad293a861b36bd20c480e \
128
  num_replicates=1 out_dir=./runs/first '~metrics' compile_lengths=null
129
  ```
130
 
@@ -134,13 +137,13 @@ Find the generated CIF under `runs/first/inference_samples/`. This first run dis
134
 
135
  ```bash
136
  hf download nvidia/RFD4-Proteina \
137
- --revision 976e0c906b56d59d460ad293a861b36bd20c480e \
138
  --local-dir ./rfd4-examples \
139
  examples/protein_binder/input.cif examples/enzyme_design/input.cif
140
 
141
  rfd4-generate inputs=./rfd4-examples/examples/protein_binder/input.cif \
142
  hf_ckpt_path=nvidia/RFD4-Proteina \
143
- hf_ckpt_revision=976e0c906b56d59d460ad293a861b36bd20c480e \
144
  num_replicates=1 out_dir=./runs/pdl1 '~metrics' compile_lengths=null
145
  ```
146
 
@@ -170,7 +173,7 @@ import rfproteina
170
  from rfproteina.proteina import Proteina
171
  from rfproteina.generate import run_generation
172
 
173
- revision = "976e0c906b56d59d460ad293a861b36bd20c480e"
174
  input_cif = hf_hub_download(
175
  "nvidia/RFD4-Proteina", "examples/enzyme_design/input.cif", revision=revision,
176
  )
@@ -209,25 +212,43 @@ write_cif(output, features, atoms, "design.cif")
209
  `subfolder="transformers"` is required: a Transformers export writes `config.json` and
210
  `model.safetensors`, the names the native bundle already occupies at the root. The sampler
211
  settings (`sampler_args`, `recycle_depths`) are part of the config, not the weights, and this
212
- checkpoint records the recipe resolved from the native inference config — 60 steps, 185 trunk
213
  passes, matching `recycle_strategy=thinking_medium`. See the limits in the banner above:
214
  generation works; partial diffusion and inverse folding do not yet.
215
 
216
  ### Diffusers
217
 
218
- Not updated for this release. [`nvidia/RFD4-Proteina-Diffusers`](https://huggingface.co/nvidia/RFD4-Proteina-Diffusers)
219
- still serves the **previous** release pair — a different model from this one, with its own
220
- `provenance.json` recording which native revision it came from.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
 
222
  ### Compute presets
223
 
224
- The released recipes differ only in how often the trunk is recycled per sampling step, as `(steps, recycle depth)` bands over 60 steps. The default is medium.
225
 
226
  | Preset | Bands | Trunk passes |
227
  |---|---|---:|
228
- | Low | `[[5,1],[5,1],[5,2],[5,3],[10,3],[5,3],[5,2],[10,1],[10,1]]` | 110 |
229
- | **Medium (default)** | `[[5,1],[5,2],[5,3],[5,5],[10,6],[5,5],[5,3],[10,2],[10,1]]` | **185** |
230
- | High | `[[5,2],[5,3],[5,5],[5,8],[10,9],[5,8],[5,5],[10,3],[10,2]]` | 295 |
231
 
232
  In the native runtime select one with `recycle_strategy=thinking_low|thinking_medium|thinking_high`.
233
 
@@ -290,7 +311,7 @@ When reporting results, cite the RFD4-Proteína project together with the exact
290
  author = {{Baker Lab, Institute for Protein Design, University of Washington} and {NVIDIA GenAIR}},
291
  year = {2026},
292
  url = {https://huggingface.co/nvidia/RFD4-Proteina},
293
- note = {Model revision 976e0c906b56d59d460ad293a861b36bd20c480e}
294
  }
295
  ```
296
 
 
34
  |---|---|---|---|
35
  | `Proteina.from_pretrained("nvidia/RFD4-Proteina")` | Native | root of this repo | **Supported** |
36
  | `Rfd4ProteinaModel.from_pretrained("nvidia/RFD4-Proteina", subfolder="transformers")` | Transformers | `transformers/` here | **Supported**, with limits below |
37
+ | `RFD4ProteinaPipeline.from_pretrained("nvidia/RFD4-Proteina-Diffusers")` | Diffusers | [its own repo](https://huggingface.co/nvidia/RFD4-Proteina-Diffusers) | **Supported**, needs the unreleased Diffusers branch |
38
 
39
  It is one model throughout — nothing is retrained. The Diffusers weights are the same tensors
40
+ re-prefixed and split across `transformer/` and `vae/`; the Transformers weights differ
41
  only in that the fused query/key/value projection is split into three. Each library resolves its
42
  own filenames, which is why they cannot share a single directory: a Transformers export writes
43
  `config.json` and `model.safetensors`, the same names the native bundle already uses at the root.
 
45
  repository. Annotated-CIF preprocessing for both libraries is in
46
  [`nvidia/RFD4-Proteina-prep`](https://huggingface.co/nvidia/RFD4-Proteina-prep).
47
 
48
+ > **Diffusers needs unreleased support.** `nvidia/RFD4-Proteina-Diffusers` holds the same 2026-10-19
49
+ > release, but `RFD4ProteinaPipeline` is not in a released Diffusers version yet; it is on branch
50
+ > `add-rfd4-proteina-torch` of `huggingface/diffusers-new-model-addition-RFD4-Proteina` (pull request 4).
51
  >
52
  > **The Transformers checkpoint supports generation only, for now.** Preparing an annotated CIF
53
  > uses [`rfd4-proteina-prep`](https://huggingface.co/nvidia/RFD4-Proteina-prep), which does not
 
67
  | **Model** | Joint sequence–structure generation with a matched flow model and autoencoder |
68
  | **Inputs** | Annotated CIF structures or YAML condition specifications |
69
  | **Outputs** | Designed molecular structures in CIF format, with generated residue identities and coordinates |
70
+ | **Weights** | EMA weights; 435,622,465 stored parameters across the paired bundle, in FP32 |
71
  | **Download** | 1.74 GB for `model.safetensors`, plus `config.json`; training data is a separate download |
72
  | **Runtime** | RFD4 Python package; Linux x86_64, Python 3.12, supported NVIDIA GPU and CUDA 13-compatible driver |
73
  | **License** | [BSD 3-Clause](LICENSE) for the RFD4 model and weights; optional third-party assets have separate terms |
 
78
 
79
  The release is a **matched pair**: a flow model and the autoencoder it was trained against. They are not interchangeable across releases — the autoencoder defines the latent space the flow model generates in, and mixing a flow model with a different autoencoder produces nonsense rather than an error.
80
 
81
+ | | Current release (2026-10-19) | Previous release |
82
  |---|---|---|
83
+ | Flow model | `rfd4-proteina-flow-release-2026-10-19`: the pretrained base (step 320000) with a rank-32 LoRA fine-tune merged in | `chk_epoch_00000169_step_000000340000-ema` |
84
+ | Autoencoder | `rfd4-proteina-ae-release-2026-10-19` | `2026_09_04_release_ae_z16_400k-ema` |
85
  | Latent dimension | 32 | 16 |
86
  | Residue vocabulary | 147 classes | 33 classes |
87
+ | Stored parameters | 435,622,465 | 434,348,737 |
88
+
89
+ The 2026-10-19 pair supersedes the 2026-10-15 pair (`2026_10_15_hero_s43_c512_80k-ema` and `2026_10_15_unified_ae_s43_400k-ema`), which has the same architecture. The pretrained base alone is in `base/`, and the LoRA adapter that turns it into the release model is in `adapter/` (PEFT format, rank 32 on `to_qkv` and `to_out_node`); the release bundle at the root is exactly the base plus the adapter, merged.
90
 
91
  The current release's autoencoder is **unified**: one autoencoder covering proteins, nucleic acids and small molecules, with a 147-class residue vocabulary in place of the previous 33-class protein vocabulary, and a 32-dimensional latent in place of 16. This is the change that makes the two releases incompatible with each other's components.
92
 
93
  | File | Use |
94
  |---|---|
95
  | [`config.json`](config.json) + `model.safetensors` | Recommended paired bundle for `Proteina.from_pretrained` |
96
+ | `base/` and `adapter/` | The pretrained base bundle and the PEFT adapter that makes it the release model (`adapter_path=` in the native runtime) |
97
  | `flow_checkpoints/rfd4_proteina_flow-ema.ckpt` | Native Lightning flow EMA weights |
98
  | `ae_checkpoints/rfd4_proteina_ae-ema.ckpt` | Matching native Lightning autoencoder EMA weights |
99
  | [`release-checkpoints.json`](release-checkpoints.json) | Pair identity, stable aliases, source filenames, and SHA-256 checksums |
 
127
  ```bash
128
  rfd4-generate inputs=data/benchmarks/monomer/monomer-short.cif \
129
  hf_ckpt_path=nvidia/RFD4-Proteina \
130
+ hf_ckpt_revision=cf31b93509df5af854c7f6ad704f5c83c77c0698 \
131
  num_replicates=1 out_dir=./runs/first '~metrics' compile_lengths=null
132
  ```
133
 
 
137
 
138
  ```bash
139
  hf download nvidia/RFD4-Proteina \
140
+ --revision cf31b93509df5af854c7f6ad704f5c83c77c0698 \
141
  --local-dir ./rfd4-examples \
142
  examples/protein_binder/input.cif examples/enzyme_design/input.cif
143
 
144
  rfd4-generate inputs=./rfd4-examples/examples/protein_binder/input.cif \
145
  hf_ckpt_path=nvidia/RFD4-Proteina \
146
+ hf_ckpt_revision=cf31b93509df5af854c7f6ad704f5c83c77c0698 \
147
  num_replicates=1 out_dir=./runs/pdl1 '~metrics' compile_lengths=null
148
  ```
149
 
 
173
  from rfproteina.proteina import Proteina
174
  from rfproteina.generate import run_generation
175
 
176
+ revision = "cf31b93509df5af854c7f6ad704f5c83c77c0698"
177
  input_cif = hf_hub_download(
178
  "nvidia/RFD4-Proteina", "examples/enzyme_design/input.cif", revision=revision,
179
  )
 
212
  `subfolder="transformers"` is required: a Transformers export writes `config.json` and
213
  `model.safetensors`, the names the native bundle already occupies at the root. The sampler
214
  settings (`sampler_args`, `recycle_depths`) are part of the config, not the weights, and this
215
+ checkpoint records the recipe resolved from the native inference config — 60 steps, 180 trunk
216
  passes, matching `recycle_strategy=thinking_medium`. See the limits in the banner above:
217
  generation works; partial diffusion and inverse folding do not yet.
218
 
219
  ### Diffusers
220
 
221
+ ```bash
222
+ pip install diffusers git+https://huggingface.co/nvidia/RFD4-Proteina-prep@c9959efdebd75ac7fe9129fbbf0e291a6e0487d5
223
+ ```
224
+
225
+ ```python
226
+ import torch
227
+ from diffusers import RFD4ProteinaPipeline
228
+ from rfd4_proteina_prep import prepare_cif, write_cif
229
+
230
+ pipe = RFD4ProteinaPipeline.from_pretrained("nvidia/RFD4-Proteina-Diffusers", dtype=torch.bfloat16).to("cuda:0")
231
+ features, atoms = prepare_cif("input.cif", seed=42, device=pipe.device)
232
+ required = ["padding_mask", "is_in_context_conditioning", "supports_local_latent", "token_type", "atom37_mask"]
233
+ output = pipe(
234
+ **{name: features[name] for name in required},
235
+ conditioning_features={name: value for name, value in features.items() if name not in required},
236
+ generator=torch.Generator("cuda:0").manual_seed(42),
237
+ )
238
+ write_cif(output, features, atoms, "design.cif")
239
+ ```
240
+
241
+ This needs the Diffusers branch named in the banner above. Partial diffusion and inverse folding work in this port. See the [repository](https://huggingface.co/nvidia/RFD4-Proteina-Diffusers) for details.
242
 
243
  ### Compute presets
244
 
245
+ The released recipes differ only in how often the trunk is recycled per sampling step, as `(steps, recycle depth)` bands over 60 steps. `thinking_low|medium|high` are the front-loaded schedules, and the default is medium. The native runtime also has flat and mid-peak schedules for each budget; see the [running guide](https://github.com/baker-laboratory/RFD4-Proteina-dev/blob/main/docs/workflow/running.md#recycling-schedules) for which one suits a task.
246
 
247
  | Preset | Bands | Trunk passes |
248
  |---|---|---:|
249
+ | Low | `[[10,4],[10,3],[10,2],[30,1]]` | 120 |
250
+ | **Medium (default)** | `[[5,6],[10,5],[5,4],[10,3],[20,2],[10,1]]` | **180** |
251
+ | High | `[[10,9],[10,8],[10,5],[20,3],[10,2]]` | 300 |
252
 
253
  In the native runtime select one with `recycle_strategy=thinking_low|thinking_medium|thinking_high`.
254
 
 
311
  author = {{Baker Lab, Institute for Protein Design, University of Washington} and {NVIDIA GenAIR}},
312
  year = {2026},
313
  url = {https://huggingface.co/nvidia/RFD4-Proteina},
314
+ note = {Model revision cf31b93509df5af854c7f6ad704f5c83c77c0698}
315
  }
316
  ```
317