Instructions to use Vasanth155/kon-security-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Vasanth155/kon-security-v5 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Vasanth155/kon-security-v5", filename="kon-security-v5-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Vasanth155/kon-security-v5 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Vasanth155/kon-security-v5:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Vasanth155/kon-security-v5:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Vasanth155/kon-security-v5:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Vasanth155/kon-security-v5:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Vasanth155/kon-security-v5:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Vasanth155/kon-security-v5:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Vasanth155/kon-security-v5:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Vasanth155/kon-security-v5:Q4_K_M
Use Docker
docker model run hf.co/Vasanth155/kon-security-v5:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Vasanth155/kon-security-v5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vasanth155/kon-security-v5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vasanth155/kon-security-v5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Vasanth155/kon-security-v5:Q4_K_M
- Ollama
How to use Vasanth155/kon-security-v5 with Ollama:
ollama run hf.co/Vasanth155/kon-security-v5:Q4_K_M
- Unsloth Studio new
How to use Vasanth155/kon-security-v5 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Vasanth155/kon-security-v5 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Vasanth155/kon-security-v5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Vasanth155/kon-security-v5 to start chatting
- Pi new
How to use Vasanth155/kon-security-v5 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Vasanth155/kon-security-v5:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Vasanth155/kon-security-v5:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Vasanth155/kon-security-v5 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Vasanth155/kon-security-v5:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Vasanth155/kon-security-v5:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Vasanth155/kon-security-v5 with Docker Model Runner:
docker model run hf.co/Vasanth155/kon-security-v5:Q4_K_M
- Lemonade
How to use Vasanth155/kon-security-v5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Vasanth155/kon-security-v5:Q4_K_M
Run and chat with the model
lemonade run user.kon-security-v5-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf Vasanth155/kon-security-v5:Q4_K_M# Run inference directly in the terminal:
llama-cli -hf Vasanth155/kon-security-v5:Q4_K_MUse pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf Vasanth155/kon-security-v5:Q4_K_M# Run inference directly in the terminal:
./llama-cli -hf Vasanth155/kon-security-v5:Q4_K_MBuild from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf Vasanth155/kon-security-v5:Q4_K_M# Run inference directly in the terminal:
./build/bin/llama-cli -hf Vasanth155/kon-security-v5:Q4_K_MUse Docker
docker model run hf.co/Vasanth155/kon-security-v5:Q4_K_Mkon-security-v5
Expert Security Code Reviewer - A fine-tuned Qwen2.5-Coder-7B model specialized for security vulnerability detection and false positive reduction in SAST (Static Application Security Testing) pipelines.
Model Details
| Property | Value |
|---|---|
| Base Model | Qwen2.5-Coder-7B-Instruct |
| Fine-tuning | QLoRA (4-bit quantization) |
| Quantization | Q4_K_M (GGUF) |
| Parameters | 7.6B |
| Context Length | 32,768 tokens |
| File Size | ~4.7 GB |
| Format | GGUF (Ollama-compatible) |
Performance
| Metric | Score |
|---|---|
| Overall Accuracy | 98.1% |
| F1 Score | 0.99 |
| False Positive Rate | 0.0% |
| JSON Compliance | 100% |
| Avg Response Time | 2.8s |
Capabilities
- Identifies true security vulnerabilities across 20+ vulnerability categories
- Eliminates false positives from SAST tools (SQL injection, XSS, command injection, etc.)
- Provides structured JSON output with verdict, confidence, CWE IDs, severity, and remediation
- Understands framework-specific safe patterns (React, Django, Express, Rails, etc.)
- Supports taint analysis reasoning (source-to-sink tracking)
Vulnerability Categories
CRITICAL: SQL Injection (CWE-89), Command Injection (CWE-78), Deserialization (CWE-502), Hardcoded Secrets (CWE-798), Code Injection (CWE-94)
HIGH: XSS (CWE-79), Path Traversal (CWE-22), SSRF (CWE-918), Timing Attacks (CWE-208), Buffer Overflow (CWE-120)
MEDIUM: Weak Crypto (CWE-327), Insecure Random (CWE-330), Information Disclosure (CWE-200), Missing Auth (CWE-306)
Usage with Ollama
# Pull the model
ollama pull kon-security/kon-security-v5
# Or create from GGUF
ollama create kon-security-v5 -f Modelfile
# Run
ollama run kon-security-v5
Example Prompt
<|im_start|>system
You are an expert security code reviewer...
<|im_end|>
<|im_start|>user
Analyze this code for SQL injection:
query = f"SELECT * FROM users WHERE id = {user_id}"
<|im_end|>
<|im_start|>assistant
Example Response
{
"verdict": "TRUE_POSITIVE",
"is_vulnerable": true,
"confidence": 0.97,
"cwe_ids": ["CWE-89"],
"severity": "CRITICAL",
"reasoning": "f-string interpolates user_id directly into SQL query without parameterization",
"remediation": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))"
}
System Prompt
The model is fine-tuned with the following system prompt baked in:
You are an expert security code reviewer specializing in identifying true
vulnerabilities and eliminating false positives. You analyze code with deep
understanding of security patterns across all languages and frameworks.
CRITICAL RULES:
1. Parameterized queries (?, $1, %s, :param) = SAFE from SQL injection
2. textContent, createTextNode = SAFE from XSS
3. React JSX {variable} = SAFE from XSS (React auto-escapes)
4. subprocess.run([list, args]) without shell=True = SAFE from command injection
5. json.loads/JSON.parse = SAFE (cannot execute code)
6. secure_filename() from werkzeug = SAFE from path traversal
7. bcrypt/argon2/scrypt for password hashing = SAFE
8. HMAC.compare_digest/timingSafeEqual = SAFE from timing attacks
9. DOMPurify.sanitize() = SAFE from XSS
10. MD5/SHA1 for non-security purposes (checksums, cache keys) = SAFE
11. Test files testing security scanners = SAFE
12. Environment variables for secrets = SAFE (not hardcoded)
13. ORM methods (Django .filter(), Rails .where(hash), SQLAlchemy) = SAFE from SQLi
14. Content-Security-Policy, helmet(), CORS allowlists = SAFE
Integration with Kon Security Scanner
This model is the default LLM for the Kon Security Scanner, providing:
- SAST finding validation and FP reduction
- CWE ID mapping
- Severity assessment
- Remediation suggestions
from kon.core.ollama_analyzer import OllamaAnalyzer
analyzer = OllamaAnalyzer(model="kon-security-v5:latest")
result = analyzer.analyze_finding_enhanced(
code_snippet="query = f'SELECT * FROM users WHERE id = {user_id}'",
vulnerability_type="SQL Injection",
file_path="app/db.py",
line_number=42
)
print(result.verdict) # TRUE_POSITIVE
Training Details
- Method: QLoRA (4-bit quantization-aware fine-tuning)
- Base: Qwen2.5-Coder-7B-Instruct
- Dataset: Curated security code review examples covering 20+ CWE categories
- Hardware: NVIDIA GPU with CUDA support
- Quantization: Q4_K_M via llama.cpp
License
Apache 2.0 (same as base model)
- Downloads last month
- 11
4-bit
Model tree for Vasanth155/kon-security-v5
Evaluation results
- Accuracyself-reported98.100
- F1 Scoreself-reported0.990
- False Positive Rateself-reported0.000
- JSON Complianceself-reported100.000
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf Vasanth155/kon-security-v5:Q4_K_M# Run inference directly in the terminal: llama-cli -hf Vasanth155/kon-security-v5:Q4_K_M