Instructions to use Synthyra/ESMplusplus_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/ESMplusplus_large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Synthyra/ESMplusplus_large", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("Synthyra/ESMplusplus_large", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload modeling_esm_plusplus.py with huggingface_hub
Browse files- modeling_esm_plusplus.py +0 -5
modeling_esm_plusplus.py
CHANGED
|
@@ -990,11 +990,6 @@ class PreTrainedESMplusplusModel(PreTrainedModel):
|
|
| 990 |
supports_gradient_checkpointing = True
|
| 991 |
all_tied_weights_keys = {}
|
| 992 |
|
| 993 |
-
@classmethod
|
| 994 |
-
def is_remote_code(cls) -> bool:
|
| 995 |
-
# Prevent post-load reinitialization of tensors already loaded from checkpoints.
|
| 996 |
-
return True
|
| 997 |
-
|
| 998 |
def _init_weights(self, module):
|
| 999 |
"""Initialize the weights"""
|
| 1000 |
# HF from_pretrained marks loaded parameters with `_is_hf_initialized`.
|
|
|
|
| 990 |
supports_gradient_checkpointing = True
|
| 991 |
all_tied_weights_keys = {}
|
| 992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 993 |
def _init_weights(self, module):
|
| 994 |
"""Initialize the weights"""
|
| 995 |
# HF from_pretrained marks loaded parameters with `_is_hf_initialized`.
|