Downloads · 30 days
8
0% of all-time downloads
Rojic/VulRoBERTa
VulRoBERTa is a text classification model from Rojic. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This RoBERTa model is trained on Devign for code vulnerability detection. It is a binary classification model.
Downloads · 30 days
8
0% of all-time downloads
All-time downloads
4.3K
Public
Repo size
977 MB
Likes
0
Public
Click a slice to open those files.
.pt977 MB · 67%
From the Hugging Face model README
This RoBERTa model is trained on Devign for code vulnerability detection. It is a binary classification model.
Code example:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("Rojic/VulRoBERTa",trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained("Rojic/VulRoBERTa")
pipe = pipeline("text-classification", tokenizer=tokenizer,model=model, trust_remote_code=True, return_all_scores=True)
#pipe(code)
pipe("static void filter_mirror_setup(NetFilterState *nf, Error **errp)\n{\n MirrorState *s = FILTER_MIRROR(nf);\n Chardev *chr;\n chr = qemu_chr_find(s->outdev);\n if (chr == NULL) {\n error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,\n "Device '%s' not found", s->outdev);\n qemu_chr_fe_init(&s->chr_out, chr, errp);")