microsoft / CodeBERT

CodeBERT
MIT License
2.19k stars 450 forks source link

Unixcoder fine tune on POJ-104, how to use it for inference? #322

Open HamzaBale opened 3 months ago

HamzaBale commented 3 months ago

Hi everybody, yesterday i executed the script that you can find here. This process returned a file called "model.bin" in the directory "saved_models", now i want to use this model in order to create embeddings for source code, in evaluation mode like i used to do here:" model = UniXcoder("microsoft/unixcoder-base") model.to(device) model.eval()" How to do that?