Downloads · 30 days
18
0% of all-time downloads
starmage520/Coderbert_finetuned_detect_vulnerability_on_MSR
Coderbert_finetuned_detect_vulnerability_on_MSR is a text classification model from starmage520. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
I finetuned a RobertaForSequenceClassification model which is initialized from CodeBert [https://huggingface.co/microsoft/codebert-base] to judge whether a code is vulnerable or not. I selected balanced samples from M…
Downloads · 30 days
18
0% of all-time downloads
All-time downloads
121K
Public
Parameters
125M
1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors499 MB · 48%
From the Hugging Face model README
I finetuned a RobertaForSequenceClassification model which is initialized from CodeBert [https://huggingface.co/microsoft/codebert-base] to judge whether a code is vulnerable or not. I selected balanced samples from MSR dataset [https://github.com/ZeoVan/MSR_20_Code_vulnerability_CSV_Dataset] for training, validation, and testing. The "func_before" is used for code classification. All the data is in the file "msr.csv".
Test Reulsts: acc 0.7022935779816514, f1 0.6482384823848238, precision 0.7920529801324503, recall 0.5486238532110091