Diffusers
Safetensors
English
RFD4ProteinaPipeline
biology
protein-design
biomolecular-design
structure-generation
flow-matching
annotated-cif
Run this model with HF Jobs
Run nvidia/RFD4-Proteina-Diffusers 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/nvidia/RFD4-Proteina-Diffusers. Ask me which dataset to train on, then push the fine-tuned model to a new 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/nvidia/RFD4-Proteina-Diffusers 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.
Instructions to use nvidia/RFD4-Proteina-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nvidia/RFD4-Proteina-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/RFD4-Proteina-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Publication layout: model card, provenance, examples, assets
Browse files77 unmodified lines7879808182838414 unmodified lines9910010110210310410577 unmodified lines| [Small-molecule binder · SAM](examples/small_molecule_binder) | Designs a pocket around a ligand | 177 || [Unconditional protein](examples/unconditional) | No conditioning: samples a protein | 250 || [Inverse folding · 2KL8](examples/inverse_folding) | Keeps the backbone and designs the sequence | 59 || [Partial diffusion · 2KL8](examples/partial_diffusion) | Re-designs a noised 2KL8 from the point where 40% of the schedule remains | 59 |<details><summary><strong>Preview gallery</strong></summary>14 unmodified lines## Precision and speedThe pipeline runs the transformer and autoencoder in the dtype they are loaded in; the sampler state and feature embeddings stay in FP32. BF16 weights are recommended: on one H200 a 250-token design takes 5.0 s in BF16 and 14.1 s in FP32, and 2.8 s after regional compilation (`transformer.compile_repeated_blocks(fullgraph=True, dynamic=True)`, about 15 s of one-time warmup). Generating eight designs in one call takes 4.0 s per design (2.3 s compiled) and under 5 GB.The same seed can end in a different design in BF16 and FP32, because the sampler amplifies rounding differences. The designs are statistically equivalent: over 24 seeds on each of four example inputs, the BF16 and FP32 distributions of radius of gyration, hydrophobic fraction, backbone geometry (C-alpha spacing and clashes) and helix content cannot be told apart (two-sample Kolmogorov–Smirnov p ≥ 0.07 in all 24 comparisons). Refolding-based success rates were not compared. Designs dominated by fixed conditioning (antibody, nanobody, motif scaffolding, inverse folding, partial diffusion) agree within 0.15 Å C-alpha RMSD between the two precisions; de-novo designs (binder, enzyme, small-molecule binder, unconditional) differ by 1–2.3 Å for the same seed.77 unmodified lines7879808182838414 unmodified lines9910010110210310410510610710810911011111211311411511611711811912012177 unmodified lines| [Small-molecule binder · SAM](examples/small_molecule_binder) | Designs a pocket around a ligand | 177 || [Unconditional protein](examples/unconditional) | No conditioning: samples a protein | 250 || [Inverse folding · 2KL8](examples/inverse_folding) | Keeps the backbone and designs the sequence | 59 || [Partial diffusion · 2KL8](examples/partial_diffusion) | Re-designs 2KL8 from a noised start at the point where 40% of the schedule remains, running all 60 steps over that range | 59 |<details><summary><strong>Preview gallery</strong></summary>14 unmodified lines## Precision and speedThe pipeline runs the transformer and autoencoder in the dtype they are loaded in; the sampler state and feature embeddings stay in FP32. BF16 weights are recommended: on one H200 a 250-token design takes 5.0 s in BF16 and 14.1 s in FP32, and 2.8 s after regional compilation (`transformer.compile_repeated_blocks(fullgraph=True, dynamic=True)`, about 15 s of one-time warmup). Generating several designs of one input in one call amortizes the per-step overhead, which dominates small designs: per design, 64 tokens take 0.39 s at batch 8 (2.6 s alone), 128 tokens 1.1 s (2.7 s alone) and 250 tokens 4.0 s (5.0 s alone), in under 5 GB at batch 8.Time and memory grow with the number of tokens. One BF16 design with the 60-step recipe on an H200:| Tokens | Generation | Peak GPU memory || ---: | ---: | ---: || 64 | 2.7 s | 0.9 GB || 128 | 2.7 s | 1.0 GB || 256 | 5.1 s | 1.4 GB || 384 | 10.1 s | 2.0 GB || 512 | 17.6 s | 2.8 GB || 768 | 49.5 s | 5.2 GB || 1024 | 96.8 s | 8.6 GB |Even 1024-token designs fit a 16 GB GPU. Preparing the input (about 0.1 s after the first call) and writing the CIF (0.4–1.9 s) are not bottlenecks.The pair bias enters attention as an additive mask, so `set_attention_backend()` accepts only backends that take dense masks (`native`, `_native_cudnn`, `_native_efficient`, `_native_math`, `flex`); FlashAttention-style backends raise an error.The same seed can end in a different design in BF16 and FP32, because the sampler amplifies rounding differences. The designs are statistically equivalent: over 24 seeds on each of four example inputs, the BF16 and FP32 distributions of radius of gyration, hydrophobic fraction, backbone geometry (C-alpha spacing and clashes) and helix content cannot be told apart (two-sample Kolmogorov–Smirnov p ≥ 0.07 in all 24 comparisons). Refolding-based success rates were not compared. Designs dominated by fixed conditioning (antibody, nanobody, motif scaffolding, inverse folding, partial diffusion) agree within 0.15 Å C-alpha RMSD between the two precisions; de-novo designs (binder, enzyme, small-molecule binder, unconditional) differ by 1–2.3 Å for the same seed.
README.md+18-2