Feature Extraction
Transformers
Safetensors
esmfold2
biology
protein-structure
multimodal-protein-model
custom_code
Instructions to use Synthyra/ESMFold2-Fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/ESMFold2-Fast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Synthyra/ESMFold2-Fast", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Synthyra/ESMFold2-Fast", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| import numpy as np | |
| from .esmfold2_protein_structure import index_by_atom_name | |
| class AtomIndexer: | |
| def __init__(self, structure, property: str, dim: int): | |
| self.structure = structure | |
| self.property = property | |
| self.dim = dim | |
| def __getitem__(self, atom_names: str | list[str]) -> np.ndarray: | |
| return index_by_atom_name( | |
| getattr(self.structure, self.property), atom_names, self.dim | |
| ) | |