Downloads · 30 days
11
9% of all-time downloads
sainikhiljuluri/deepseek-r1-cve-merged
deepseek-r1-cve-merged is a text generation model from sainikhiljuluri. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of deepseek-ai/DeepSeek-R1-0528-Qwen3-8B specialized for CVE (Common Vulnerabilities and Exposures) vulnerability analysis and security policy recommendation generation.
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
116
Public
Parameters
8.2B
32.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of deepseek-ai/DeepSeek-R1-0528-Qwen3-8B specialized for CVE (Common Vulnerabilities and Exposures) vulnerability analysis and security policy recommendation generation.
The model was trained using LoRA/DoRA (Parameter-Efficient Fine-Tuning) on 5,000 CVE policy recommendation examples and achieves excellent performance metrics.
pip install transformers torch
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
"sainikhiljuluri/deepseek-r1-cve-merged",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
"sainikhiljuluri/deepseek-r1-cve-merged",
trust_remote_code=True
)
# Prepare CVE analysis prompt
prompt = '''Analyze the following vulnerability and provide security recommendations:
CVE ID: CVE-2024-12345
Vulnerability Summary: SQL injection vulnerability in login form allowing unauthorized database access
CVSS Score: 9.8 (Critical)
Weakness Type: Improper Neutralization of Special Elements used in an SQL Command
CWE Code: CWE-89'''
# Format for model
input_text = f"<|user|>\n{prompt}\n<|assistant|>\n"
# Generate recommendation
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=False,
temperature=1.0
)
# Extract response
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
recommendation = response.split("<|assistant|>")[-1].strip()
print(recommendation)
Recommended Action: Immediately patch the vulnerable login form by implementing parameterized
queries or prepared statements to prevent SQL injection attacks. Update the application to
version X.X.X or apply security patch #12345.
Rationale: SQL injection vulnerabilities with CVSS 9.8 are critical and actively exploited.
The vulnerability allows attackers to bypass authentication, access sensitive data, modify
database contents, and potentially gain administrative privileges. Implementing parameterized
queries eliminates the vulnerability by separating SQL code from user input. Additionally,
deploy a Web Application Firewall (WAF) with SQL injection rules as a compensating control
while the patch is being deployed. Monitor database logs for suspicious queries and implement
rate limiting on login attempts.
Evaluated on 100 held-out CVE samples (November 4, 2025):
| Metric | Score | Assessment |
|---|---|---|
| Perplexity | 2.547 | ✅ Excellent - Better than typical (3-8) |
| Quality Retention | 102.0% | ✅ Excellent - Exceeds baseline |
| Average Loss | 0.935 | ✅ Low prediction error |
| Metric | Score | Interpretation |
|---|---|---|
| BLEU-1 | 0.132 | 13.2% unigram overlap |
| BLEU-2 | 0.092 | 9.2% bigram overlap |
| BLEU-4 | 0.044 | Normal for generation tasks |
| ROUGE-1 F1 | 0.193 | 19.3% content overlap |
| ROUGE-2 F1 | 0.102 | 10.2% phrase overlap |
| ROUGE-L F1 | 0.174 | 17.4% LCS overlap |
| Semantic Similarity | 0.297 | Moderate meaning alignment |
✅ Strengths:
📝 Context:
| Parameter | Value |
|---|---|
| Base Model | deepseek-ai/DeepSeek-R1-0528-Qwen3-8B (8B parameters) |
| Training Method | LoRA/DoRA (Parameter-Efficient Fine-Tuning) |
| Training Samples | 4,500 (90% split) |
| Validation Samples | 500 (10% split) |
| Training Epochs | 3 |
| Batch Size | 16 (2 per device × 8 gradient accumulation) |
| Learning Rate | 1.5e-4 |
| Weight Decay | 0.10 |
| Warmup Steps | 500 |
| Max Sequence Length | 2048 tokens |
| Optimizer | AdamW |
| Training Platform | Google Colab (T4/V100/A100) |
| Training Time | ~4-8 hours |
| Parameter | Value |
|---|---|
| Method | DoRA (Weight-Decomposed Low-Rank Adaptation) |
| LoRA Rank (r) | 32 |
| LoRA Alpha | 32 |
| LoRA Dropout | 0.10 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, up_proj, down_proj, gate_proj |
| Trainable Parameters | ~50-100M (0.6-1.2% of base model) |
The model excels at analyzing:
Generates comprehensive recommendations including:
✅ Security Operations Centers (SOC)
✅ Security Analysts
✅ Development Teams
✅ Research and Education
❌ Not Suitable For:
If you use this model in your research or applications, please cite:
@misc{deepseek-r1-cve-merged-2025,
author = {Sainikhil Juluri},
title = {DeepSeek-R1 Fine-tuned on CVE Policy Recommendations},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/sainikhiljuluri/deepseek-r1-cve-merged}},
note = {Fine-tuned using LoRA/DoRA on CVE policy recommendations dataset}
}
Also cite the base model:
@misc{deepseek-r1-2025,
author = {DeepSeek-AI},
title = {DeepSeek-R1-0528-Qwen3-8B},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B}}
}
For questions, issues, or collaborations:
This model is released under the Apache 2.0 License.
🔒 Security Context:
⚠️ Potential Risks:
✅ Do:
❌ Don't:
Built with: 🤖 Transformers • 🔥 PEFT • ⚡ LoRA/DoRA • 🛡️ Cybersecurity Focus
For research and educational purposes. Always validate security findings with professional security tools and experts.