-
Notifications
You must be signed in to change notification settings - Fork 287
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
There is no entire model and model weights file to load #179
Comments
Hi @alakhalil , Can you try without the Best, |
Thank you @urialon for the quick reply! yes now it works. Regards, |
Hi Alaa, However, notice that this code was written long ago, and since then we have newer models. from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("neulab/codebert-python")
model = AutoModelForMaskedLM.from_pretrained("neulab/codebert-python") If you are interested in code completion or NL->Code, check out PolyCoder at: https://github.com/VHellendoorn/Code-LMs#october-2022---polycoder-is-available-on-huggingface. from transformers import AutoTokenizer, AutoModelForCausalLM
from packaging import version
assert version.parse(transformers.__version__) >= version.parse("4.23.0")
tokenizer = AutoTokenizer.from_pretrained("NinedayWang/PolyCoder-2.7B")
model = AutoModelForCausalLM.from_pretrained("NinedayWang/PolyCoder-2.7B") and in this series there are also smaller models here: https://huggingface.co/NinedayWang. Best, |
Hi Uri, I see. Thank you for the clarification. Regards, |
Hello,
I am trying to evaluate the model by testing the trained model on small-java dataset.
wget https://s3.amazonaws.com/code2vec/model/java14m_model.tar.gz tar -xvzf java14m_model.tar.gz
wget https://s3.amazonaws.com/code2vec/data/java-small_data.tar.gz
I tried to test the trained model via
python3 code2vec.py --load models/java14_model/saved_model_iter8.release --test data/java-small/java-small.test.c2v --framework keras
But I got the error
ValueError: There is no entire model to load at path models/java14_model/saved_model_iter8.release__entire-model, and there is no model weights file to load at path models/java14_model/saved_model_iter8.release__only-weights.
How the entire-model and weight can be generated?
Kind regards,
The text was updated successfully, but these errors were encountered: