microsoft / CodeBERT

CodeBERT
MIT License
2.15k stars 442 forks source link

Can the model from Huggingface be used for the quality estimation? #242

Open p4vv37 opened 1 year ago

p4vv37 commented 1 year ago

After loading the model with code: config = T5Config.from_pretrained("microsoft/codereviewer") model = ReviewerModel.from_pretrained("microsoft/codereviewer", config=config) I'm getting the error: Some weights of ReviewerModel were not initialized from the model checkpoint at microsoft/codereviewer and are newly initialized: ['cls_head.weight', 'cls_head.bias'] You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

Does it mean, that the model from Huggingface cannot be used for the quality estimation?

celbree commented 1 year ago

Yes. The pre-trained model needs fine-tuning for the quality estimation task.

Qinhaifu commented 1 year ago

I had the same problem, I download chekpoint from HuggingFace. "The pre-trained checkpoint of CodeReivewer is available in Huggingface." I use these check point directly , and then get the same error.

What are the requirements for fine-tuning with the official data set ? 3090 is OK? "Before you start to run experiments with CodeReviewer, please download the datasets first."?

Qinhaifu commented 1 year ago

After I fine-tuning, how to use the finetuned model and checkpoint that from HuggingFace together?

fasterinnerlooper commented 6 months ago

I would assume that you would have to load the weights separately for each task. Merging models is a task that has been well-researched so you should be able to find a lot of documentation online for this.