-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from_pretrained() Error. Cannot use a path to import local model? #132
Comments
you may further refer .../66ecd636588d3100e13598a5720678db6583d01c/data |
I have tried and have same error: File ~/users/wtt/anaconda3/envs/esm3/lib/python3.11/site-packages/esm/models/esm3.py:251, in ESM3.from_pretrained(cls, model_name, device) File ~/users/wtt/anaconda3/envs/esm3/lib/python3.11/site-packages/esm/pretrained.py:87, in load_local_model(model_name, device) ValueError: Model ./huggingface/hub/models--EvolutionaryScale--esm3-sm-open-v1/snapshots/66ecd636588d3100e13598a5720678db6583d01c/data not found in local model registry.` |
The same question for me |
https://blog.csdn.net/m0_61474277/article/details/140348032 |
This is the set of model names that the function supports: https://github.com/evolutionaryscale/esm/blob/main/esm/utils/constants/models.py#L2-L8 If you're looking to download it without internet, I think you should refer to huggingface for details. I would try to just put the right files in the right locations, or to modify this file: esm/esm/utils/constants/esm3.py Lines 100 to 105 in 39a3a6c
|
my code like this:
and give the error:
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [27], line 1
----> 1 model = ESM3.from_pretrained(model_name = "./huggingface/hub/models--EvolutionaryScale--esm3-sm-open-v1/snapshots/66ecd636588d3100e13598a5720678db6583d01c/", device=torch.device("cpu"))
File ~/users/wtt/anaconda3/envs/esm3/lib/python3.11/site-packages/esm/models/esm3.py:251, in ESM3.from_pretrained(cls, model_name, device)
249 if device is None:
250 device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
--> 251 model = load_local_model(model_name, device=device)
252 if device.type != "cpu":
253 model = model.to(torch.bfloat16)
File ~/users/wtt/anaconda3/envs/esm3/lib/python3.11/site-packages/esm/pretrained.py:87, in load_local_model(model_name, device)
83 def load_local_model(
84 model_name: str, device: torch.device = torch.device("cpu")
85 ) -> nn.Module:
86 if model_name not in LOCAL_MODEL_REGISTRY:
---> 87 raise ValueError(f"Model {model_name} not found in local model registry.")
88 return LOCAL_MODEL_REGISTRYmodel_name
ValueError: Model ./huggingface/hub/models--EvolutionaryScale--esm3-sm-open-v1/snapshots/66ecd636588d3100e13598a5720678db6583d01c/ not found in local model registry.`
The text was updated successfully, but these errors were encountered: