Text Classification
Transformers
Safetensors
roberta
code
vulnerability-detection
self-admitted-technical-debt
knowledge-distillation
nlbse
text-embeddings-inference
Run this model with HF Jobs
Run NafiuRahman/divast on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/NafiuRahman/divast. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NafiuRahman/divast on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use NafiuRahman/divast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NafiuRahman/divast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NafiuRahman/divast")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("NafiuRahman/divast") model = AutoModelForSequenceClassification.from_pretrained("NafiuRahman/divast", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DiVaST-3L-768H trained for 5 epochs (selected on validation)
Browse filesFiles changed (2)
- README.md+5-5
- model.safetensors+1-1
49 unmodified lines50515253545556575859606162633 unmodified lines6768697071727349 unmodified lines## ResultsPublic test set, official protocol of the challenge (one Colab T4 session, batch 600,10 repetitions, threshold 0.5):| Model | F1 vulnerability | F1 SATD | Average F1 | Runtime (s) | GFLOPs | Score ||---|---|---|---|---|---|---|| CodeBERT baseline | 0.9390 | 0.8814 | 0.9102 | 242.61 | 2,666,510 | 0.7198 || Teacher (`teacher/`) | 0.9419 | 0.9283 | 0.9351 | 120.73 | 1,333,285 | 0.8480 || **DiVaST-3L-768H** | 0.9323 | 0.9274 | 0.9299 | 60.53 | 666,673 | **0.9014** |## Training3 unmodified linesthe best validation average F1 (remaining 5%) is kept.Student: initialised from the teacher's embeddings, layers 2, 4, and 6, andclassification head, then trained with the same settings on`(1 - a) * BCE(sigmoid(z_s), y) + a * T^2 * BCE(sigmoid(z_s / T), sigmoid(z_t / T))`,with `a = 0.5` and `T = 2`; the teacher is frozen. Thresholds tuned on validationchange the average F1 by at most 0.0002, so the model uses 0.5.49 unmodified lines50515253545556575859606162633 unmodified lines6768697071727349 unmodified lines## ResultsPublic test set, official protocol of the challenge (batch 600, 10 repetitions,threshold 0.5); runtime and GFLOPs on a Colab T4, all models in one session:| Model | F1 vulnerability | F1 SATD | Average F1 | Runtime (s) | GFLOPs | Score ||---|---|---|---|---|---|---|| CodeBERT baseline | 0.9390 | 0.8814 | 0.9102 | 242.61 | 2,666,510 | 0.7198 || Teacher (`teacher/`) | 0.9419 | 0.9283 | 0.9351 | 120.73 | 1,333,285 | 0.8480 || **DiVaST-3L-768H** | 0.9345 | 0.9274 | 0.9310 | 60.53 | 666,673 | **0.9020** |## Training3 unmodified linesthe best validation average F1 (remaining 5%) is kept.Student: initialised from the teacher's embeddings, layers 2, 4, and 6, andclassification head, then trained with the same settings, but for 5 epochs, on`(1 - a) * BCE(sigmoid(z_s), y) + a * T^2 * BCE(sigmoid(z_s / T), sigmoid(z_t / T))`,with `a = 0.5` and `T = 2`; the teacher is frozen. Thresholds tuned on validationchange the average F1 by at most 0.0003, so the model uses 0.5.
123version https://git-lfs.github.com/spec/v1oid sha256:10b1c6511d943d8f4ffdaeb0f5dcfd4e765afe0f2d1948478e569f949c3bdbf2size 248761936123version https://git-lfs.github.com/spec/v1oid sha256:857230d7e2c4a2b0605b12262ab4dcb76881c0ffcdb2d75a43b462cbeca3aa2csize 248761936
README.md+5-5
model.safetensors+1-1