You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: how to get model embeddings (s_i, z_ij) (#105)
* docs: how to get model embeddings (s_i, z_ij)
* update inference.md
* Add runner.yml settings for outputing model embeddings
Added documentation for saving model embeddings
* Update docs/source/Inference.md
Co-authored-by: Jennifer Wei <[email protected]>
---------
Co-authored-by: Jennifer Wei <[email protected]>
Copy file name to clipboardExpand all lines: docs/source/Inference.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Coming soon:
71
71
- Polymeric ligands such as glycans
72
72
73
73
74
-
## 2. Pre-requisites:
74
+
## 2. Pre-requisites
75
75
76
76
- OpenFold3 Conda Environment. See {ref}`OpenFold3 Installation <openfold3-installation>` for instructions on how to build this environment.
77
77
- OpenFold3 Model Parameters. See {ref}`OpenFold3 Parameters <openfold3-parameters>` for how to download these parameters.
@@ -258,6 +258,16 @@ output_writer_settings:
258
258
259
259
---
260
260
261
+
(output-model-embeddings)=
262
+
#### 📦 Output single and pair model embeddings
263
+
To save model embeddings, add the field `write_latent_outputs` to the `output_writer_settings` i.e.:
264
+
```yaml
265
+
output_writer_settings:
266
+
write_latent_outputs: True
267
+
```
268
+
269
+
---
270
+
261
271
(inference-low-memory-mode)=
262
272
#### 🧠 Low Memory Mode
263
273
To run inference on larger queries to run on limited memory, add the following to apply the [model presets](https://github.com/aqlaboratory/openfold-3/blob/main/openfold3/projects/of3_all_atom/config/model_setting_presets.yml) to run in low memory mode.
@@ -512,6 +522,16 @@ When processing multimer inputs (e.g., hemoglobin α + β chains), OpenFold3 aut
512
522
- Stores raw alignments in `raw/paired/` temporarily
513
523
- Converts them into per-chain `.npz` alignments in [`paired/`](https://huggingface.co/OpenFold/OpenFold3/tree/main/examples/output_multimer_with_colabfold_msas/colabfold_msas/paired)
514
524
525
+
### 4.5 Embeddings
515
526
527
+
At inference you can instruct the model to produce the pair-rep and single-rep embeddings by {ref}`adjusting the output_writer_settings in your runner.yaml <output-model-embeddings>`.
516
528
529
+
This will cause the model to produce a `*_latent_output.pt`, which can be loaded like so and has the following shape.
0 commit comments