Instructions to use InstaDeepAI/nucleotide-transformer-v2-50m-multi-species with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InstaDeepAI/nucleotide-transformer-v2-50m-multi-species with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="InstaDeepAI/nucleotide-transformer-v2-50m-multi-species", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("InstaDeepAI/nucleotide-transformer-v2-50m-multi-species", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Fix import for latest Transformers compatibility (#3)
Browse files- Fix import for latest Transformers compatibility (4a4677a7c93333be72c23352e80b5bcae2d620ea)
- modeling_esm.py +2 -5
modeling_esm.py
CHANGED
|
@@ -33,11 +33,8 @@ from transformers.modeling_outputs import (
|
|
| 33 |
SequenceClassifierOutput,
|
| 34 |
TokenClassifierOutput,
|
| 35 |
)
|
| 36 |
-
from transformers.modeling_utils import
|
| 37 |
-
|
| 38 |
-
find_pruneable_heads_and_indices,
|
| 39 |
-
prune_linear_layer,
|
| 40 |
-
)
|
| 41 |
from transformers.utils import logging
|
| 42 |
|
| 43 |
from .esm_config import EsmConfig
|
|
|
|
| 33 |
SequenceClassifierOutput,
|
| 34 |
TokenClassifierOutput,
|
| 35 |
)
|
| 36 |
+
from transformers.modeling_utils import PreTrainedModel
|
| 37 |
+
from transformers.pytorch_utils import find_pruneable_heads_and_indices, prune_linear_layer
|
|
|
|
|
|
|
|
|
|
| 38 |
from transformers.utils import logging
|
| 39 |
|
| 40 |
from .esm_config import EsmConfig
|