Run this model with HF Jobs
Run Synthyra/ESMFold2 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/Synthyra/ESMFold2. 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/Synthyra/ESMFold2 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 Synthyra/ESMFold2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/ESMFold2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Synthyra/ESMFold2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Synthyra/ESMFold2", trust_remote_code=True) model = AutoModel.from_pretrained("Synthyra/ESMFold2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Give this artifact's bridge its own config and model subclasses (FastPLMs#50)
Browse filesArtifacts share one FastPLMs runtime per process. Re-exported shared classes let one artifact's model class answer for another with the same config class, for example ESMFold2-300 built as ESMFold2Model after ESMFold2-Fast loaded. Only modeling_fastplms.py changes; the runtime bundle and weights are untouched. https://github.com/Synthyra/FastPLMs/issues/50
179 unmodified lines180181182183184185186187188189190191192193179 unmodified linesreturn package_install_runtime()_module_182 = _import_without_bytecode("fastplms.models.esmfold2.configuration_esmfold2")ESMFold2Config = _module_182.ESMFold2ConfigESMFold2Config.__module__ = __name___module_185 = _import_without_bytecode("fastplms.models.esmfold2.modeling_esmfold2")ESMFold2Model = _module_185.ESMFold2ModelESMFold2Model.__module__ = __name___module_188 = _import_without_bytecode("fastplms.models.esmfold2.modeling_esmfold2_classification")ESMFold2ForSequenceClassification = _module_188.ESMFold2ForSequenceClassificationESMFold2ForSequenceClassification.__module__ = __name__ESMFold2ForTokenClassification = _module_188.ESMFold2ForTokenClassificationESMFold2ForTokenClassification.__module__ = __name__179 unmodified lines180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211179 unmodified linesreturn package_install_runtime()def _artifact_class(base, config_class=None):"""Subclass a shared runtime class so this artifact registers its own classes.The base constructor is kept explicitly because Transformers turns every configsubclass into a dataclass, which would otherwise generate a new constructor."""namespace = {"__module__": __name__,"__qualname__": base.__name__,"__doc__": base.__doc__,"__init__": base.__init__,}base_config_class = getattr(base, "config_class", None)if (config_class is not Noneand isinstance(base_config_class, type)and issubclass(config_class, base_config_class)):namespace["config_class"] = config_classreturn type(base.__name__, (base,), namespace)_module_204 = _import_without_bytecode("fastplms.models.esmfold2.configuration_esmfold2")_module_205 = _import_without_bytecode("fastplms.models.esmfold2.modeling_esmfold2")_module_206 = _import_without_bytecode("fastplms.models.esmfold2.modeling_esmfold2_classification")ESMFold2Config = _artifact_class(_module_204.ESMFold2Config)ESMFold2Model = _artifact_class(_module_205.ESMFold2Model, config_class=ESMFold2Config)ESMFold2ForSequenceClassification = _artifact_class(_module_206.ESMFold2ForSequenceClassification, config_class=ESMFold2Config)ESMFold2ForTokenClassification = _artifact_class(_module_206.ESMFold2ForTokenClassification, config_class=ESMFold2Config)
modeling_fastplms.py+29-11