Downloads · 30 days
74
13% of all-time downloads
jaimef21/security-lora-qwen2.5-coder-3b-gguf
security-lora-qwen2.5-coder-3b-gguf is a machine learning model from jaimef21. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
GGUF quants of jaimef21/security-lora-qwen2.5-coder-3b-bf16, a Qwen2.5-Coder-3B-Instruct LoRA fine-tune for detecting malicious npm / PyPI supply-chain attack code.
Downloads · 30 days
74
13% of all-time downloads
All-time downloads
561
Public
Repo size
5.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf5.2 GB · 100%
From the Hugging Face model README
GGUF quants of jaimef21/security-lora-qwen2.5-coder-3b-bf16, a Qwen2.5-Coder-3B-Instruct LoRA fine-tune for detecting malicious npm / PyPI supply-chain attack code.
Outputs a structured JSON verdict with cited line ranges. Tuned via DPO to suppress false positives on legitimate minified / telemetry / crypto code.
Training pipeline: https://github.com/jaimef21/security-lora
| File | Quant | Size | Notes |
|---|---|---|---|
security-lora.q8_0.gguf | Q8_0 | ~3.2 GB | High fidelity; indistinguishable from F16 for most use |
security-lora.q4_k_m.gguf | Q4_K_M | ~1.9 GB | Runs comfortably on an 8 GB laptop or 4 GB CPU server |
./llama-cli -m security-lora.q4_k_m.gguf \
-p "Analyze this code for malicious behaviour. Source: \`example.js\`.\n\n\`\`\`js\nconst x = require('child_process').exec(process.env.CMD);\n\`\`\`"
Build a Modelfile locally:
FROM ./security-lora.q4_k_m.gguf
SYSTEM "You are a security analyst. Given a source code file, return a JSON verdict {verdict, confidence, categories, reasoning, iocs} for whether the code is malicious. verdict ∈ {malicious, suspicious, benign}. Always cite specific line ranges in iocs.lines when flagging behaviour. Be precise and concise."
PARAMETER temperature 0.1
PARAMETER num_ctx 8192
PARAMETER stop "<|im_end|>"
Then:
ollama create security-scan -f Modelfile
ollama run security-scan "Analyze this code..."
{
"verdict": "malicious | suspicious | benign",
"confidence": 0.0,
"categories": ["env_exfil", "crypto_miner", "backdoor", "typosquat",
"install_hook_abuse", "obfuscated_eval", "c2_beacon",
"credential_theft", "protestware"],
"reasoning": "step-by-step taint flow / deobfuscation walkthrough",
"iocs": {"domains": [], "files": [], "lines": [], "env_vars": []}
}