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 +2 -1
modeling_esm_plusplus.py
CHANGED
|
@@ -533,7 +533,8 @@ class PreTrainedESMplusplusModel(PreTrainedModel):
|
|
| 533 |
if module.padding_idx is not None:
|
| 534 |
module.weight.data[module.padding_idx].zero_()
|
| 535 |
elif isinstance(module, nn.LayerNorm):
|
| 536 |
-
module.bias
|
|
|
|
| 537 |
module.weight.data.fill_(1.0)
|
| 538 |
|
| 539 |
@classmethod
|
|
|
|
| 533 |
if module.padding_idx is not None:
|
| 534 |
module.weight.data[module.padding_idx].zero_()
|
| 535 |
elif isinstance(module, nn.LayerNorm):
|
| 536 |
+
if module.bias is not None:
|
| 537 |
+
module.bias.data.zero_()
|
| 538 |
module.weight.data.fill_(1.0)
|
| 539 |
|
| 540 |
@classmethod
|