Peer-AI Code Reviewer
AI-powered code security reviewer fine-tuned on security vulnerability patterns.
Model Description
Peer-AI is a Qwen2.5-Coder-1.5B model fine-tuned with LoRA for code security review tasks. It can identify common security vulnerabilities including:
- CWE-78: Command Injection
- CWE-89: SQL Injection
- CWE-22: Path Traversal
- CWE-79: Cross-Site Scripting (XSS)
- CWE-94: Code Injection
- CWE-120: Buffer Overflow
- CWE-190: Integer Overflow
- CWE-416: Use After Free
- CWE-502: Deserialization
- CWE-798: Hardcoded Credentials
Languages Supported
- Python
- Go
- C/C++
- Rust
- JavaScript/TypeScript
Usage
With Ollama
# Create model
ollama create peer-ai -f Modelfile
# Review code
curl -s http://localhost:11434/api/generate -d '{
"model": "peer-ai",
"prompt": "Review the following python code...",
"stream": false
}'
With CLI
pip install peer-ai
git diff | peer-ai review -
peer-ai review src/main.py
Training
- Base Model: Qwen/Qwen2.5-Coder-1.5B-Instruct
- Method: QLoRA (r=16, alpha=32)
- Dataset: 223 security vulnerability examples
- Epochs: 3
- Final Loss: 0.21
Output Format
{
"line": 2,
"severity": "high",
"category": "security",
"rule": "CWE-78",
"title": "Command injection vulnerability",
"message": "User input passed to shell command.",
"suggestion": "Use subprocess with shell=False."
}
License
Apache 2.0
Links
- Downloads last month
- 210
Hardware compatibility
Log In to add your hardware
We're not able to determine the quantization variants.
Model tree for antoniostepien/peer-ai-reviewer
Base model
Qwen/Qwen2.5-1.5B
Finetuned
Qwen/Qwen2.5-Coder-1.5B
Finetuned
Qwen/Qwen2.5-Coder-1.5B-Instruct