Instructions to use gitter-lab/METL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gitter-lab/METL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="gitter-lab/METL", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gitter-lab/METL", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse files- config.json +2 -2
- huggingface_wrapper.py +1 -0
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
| 6 |
"AutoConfig": "huggingface_wrapper.METLConfig",
|
| 7 |
"AutoModel": "huggingface_wrapper.METLModel"
|
| 8 |
},
|
|
|
|
| 9 |
"id": null,
|
| 10 |
"model_type": "METL",
|
| 11 |
-
"
|
| 12 |
-
"transformers_version": "4.51.3"
|
| 13 |
}
|
|
|
|
| 6 |
"AutoConfig": "huggingface_wrapper.METLConfig",
|
| 7 |
"AutoModel": "huggingface_wrapper.METLModel"
|
| 8 |
},
|
| 9 |
+
"dtype": "float32",
|
| 10 |
"id": null,
|
| 11 |
"model_type": "METL",
|
| 12 |
+
"transformers_version": "5.17.0"
|
|
|
|
| 13 |
}
|
huggingface_wrapper.py
CHANGED
|
@@ -2410,6 +2410,7 @@ class METLModel(PreTrainedModel):
|
|
| 2410 |
self.model = None
|
| 2411 |
self.encoder = None
|
| 2412 |
self.config = config
|
|
|
|
| 2413 |
|
| 2414 |
def forward(self, X, pdb_fn=None):
|
| 2415 |
if pdb_fn:
|
|
|
|
| 2410 |
self.model = None
|
| 2411 |
self.encoder = None
|
| 2412 |
self.config = config
|
| 2413 |
+
self.post_init()
|
| 2414 |
|
| 2415 |
def forward(self, X, pdb_fn=None):
|
| 2416 |
if pdb_fn:
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a14b67798061a7f9e9f3d7d18a90fb68b2d4b15757d861abbfd33ecde6f8aae
|
| 3 |
size 176
|