Instructions to use recursionpharma/OpenPhenom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use recursionpharma/OpenPhenom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="recursionpharma/OpenPhenom", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("recursionpharma/OpenPhenom", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix: minor change
Browse files- huggingface_mae.py +1 -1
huggingface_mae.py
CHANGED
|
@@ -288,6 +288,6 @@ class MAEModel(PreTrainedModel):
|
|
| 288 |
modelpath = f"{pretrained_model_name_or_path}/{filename}"
|
| 289 |
config = MAEConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
|
| 290 |
state_dict = torch.load(modelpath, map_location="cpu")
|
| 291 |
-
model = cls(config
|
| 292 |
model.load_state_dict(state_dict["state_dict"])
|
| 293 |
return model
|
|
|
|
| 288 |
modelpath = f"{pretrained_model_name_or_path}/{filename}"
|
| 289 |
config = MAEConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
|
| 290 |
state_dict = torch.load(modelpath, map_location="cpu")
|
| 291 |
+
model = cls(config)
|
| 292 |
model.load_state_dict(state_dict["state_dict"])
|
| 293 |
return model
|