Instructions to use barryallen16/Qwen2.5_7B_java_vul_final with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use barryallen16/Qwen2.5_7B_java_vul_final with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("barryallen16/Qwen2.5_7B_java_vul_final", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Uploaded model
- Developed by: barryallen16
- License: apache-2.0
- Finetuned from model : unsloth/qwen2.5-7b-instruct-unsloth-bnb-4bit
This qwen2 model was trained 2x faster with Unsloth and Huggingface's TRL library.
Fine-tuned LLM system that detects vulnerabilities in Java code. Built the full cycle myself: dataset curation β synthetic augmentation β dedup β LoRA fine-tuning β evaluation across model sizes and learning rates.
Headline result: Qwen2.5-Coder-7B fine-tuned at lr 3e-4 reaches 80.39% accuracy on 102 held-out test cases, beating my own 14B run (78.43%) and a 4-bit Mistral-Nemo-Instruct baseline (77.45%).
Results
| Model | LR | Test cases | Correct | Accuracy |
|---|---|---|---|---|
| Qwen2.5-Coder 7B | 3e-4 | 102 | 82 | 80.39% |
| Qwen2.5-Coder 7B (100 max steps) | 2e-4 | 102 | 81 | 79.41% |
| Qwen2.5-Coder 14B | 2e-4 | 102 | 80 | 78.43% |
| Mistral-Nemo-Instruct-2407 (4-bit) | 2e-4 | 102 | 79 | 77.45% |
The 7B outperforming the 14B suggests the task rewards cleaner training data over raw parameter count β consistent with what I saw while deduplicating: a meaningful share of the merged corpora were near-exact duplicates.
Pipeline
raw datasets β standardize β clean β LLM synthetic augmentation
β merge β sha256 dedup β preprocess β conversation-format SFT set
β Unsloth LoRA fine-tune β 102-case eval harness
- Datasets moved through seven curated stages (~1 GB raw); final SFT set is conversation-formatted for Unsloth/SFTTrainer.
- Deduplication by SHA-256 of normalized lines (
datasets/deduped/). - Eval harness (
model-evaluation/testcases_java_eval.ipynb) runs a fixed 102-case set against any checkpoint via one function call:evaluate_model(llm_name, test_cases).
Artifacts
- Datasets: HF datasets
- Source Code: Github repo
