Downloads · 30 days
36
17% of all-time downloads
elsiddik/pentest-vulnerability-detector
pentest-vulnerability-detector is a text generation model from elsiddik. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is a fine-tuned version of DeepSeek-Coder-1.3B-Instruct, specialized for detecting security vulnerabilities in code.
Downloads · 30 days
36
17% of all-time downloads
All-time downloads
206
Public
Repo size
38.5 MB
Likes
1
Public
Click a slice to open those files.
.safetensors37.8 MB · 65%
From the Hugging Face model README
This is a fine-tuned version of DeepSeek-Coder-1.3B-Instruct, specialized for detecting security vulnerabilities in code.
Base Model: deepseek-ai/deepseek-coder-1.3b-instruct
Training Data: 440 synthetic vulnerability examples
Training Method: LoRA (Low-Rank Adaptation) with 4-bit quantization
Training Platform: Google Colab (Free T4 GPU)
The model can detect and analyze:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = "deepseek-ai/deepseek-coder-1.3b-instruct"
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(base_model)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, "YOUR_USERNAME/pentest-vulnerability-detector")
# Analyze code
code = "SELECT * FROM users WHERE id = 'user_input'"
prompt = f"System: You are a security expert.\n\nUser: Analyze this code:\n{code}\n\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
For easier usage, use the provided inference script:
python inference_deepseek.py --model ./model --code "YOUR_CODE_HERE"
The model provides:
This model is intended for:
Do not use for:
The model was trained on 440 synthetic vulnerability examples covering:
If you use this model, please cite:
@misc{pentest-vulnerability-detector,
author = {YOUR_NAME},
title = {Pentest Vulnerability Detector},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/YOUR_USERNAME/pentest-vulnerability-detector}}
}
This model adapter is released under the Apache 2.0 License.
The base model (DeepSeek-Coder-1.3B-Instruct) has its own license terms.
See LICENSE file for full terms.
For questions or issues, please open an issue on the model repository.