You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I managed to finetune codebert for the codesearch task, and I was wondering how I could use the model.bin I just created to perform codesearch on my own natural langage queries.
So the model.bin is a state dictionnary containing all the weight but I don't get how I am supposed to go from that to a working model.
I tried to instanciate it with
model = RobertaModel.from_pretrained("microsoft/codebert-base")
but it returns the following error
RuntimeError: Error(s) in loading state_dict for RobertaModel:
Missing key(s) in state_dict: "embeddings.position_ids", "embeddings.word_embeddings.weight", "embeddings.position_embeddings.weight", "
etc,etc
And I noticed that there is a Model class in model.py so it is probably the one I mused use but I don't get how am I supposed to instanciate it in order for the model to work ? Can you show me an example or explain me a little bit ?
Thank you very much
The text was updated successfully, but these errors were encountered:
And if instanciate is too complicated, how can I use the inference.py file to get my predictions in a file? Like I give the model a string of the query and it output me the code predicted
Hello I managed to finetune codebert for the codesearch task, and I was wondering how I could use the model.bin I just created to perform codesearch on my own natural langage queries.
So the model.bin is a state dictionnary containing all the weight but I don't get how I am supposed to go from that to a working model.
I tried to instanciate it with
model = RobertaModel.from_pretrained("microsoft/codebert-base")
but it returns the following error
etc,etc
And I noticed that there is a Model class in model.py so it is probably the one I mused use but I don't get how am I supposed to instanciate it in order for the model to work ? Can you show me an example or explain me a little bit ?
Thank you very much
The text was updated successfully, but these errors were encountered: