Text Generation
Transformers
Safetensors
GGUF
qwen2
vulnzap
security
code-fix
conversational
text-generation-inference
Instructions to use plaw/vulnzap-faraday-mini-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use plaw/vulnzap-faraday-mini-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="plaw/vulnzap-faraday-mini-1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("plaw/vulnzap-faraday-mini-1") model = AutoModelForCausalLM.from_pretrained("plaw/vulnzap-faraday-mini-1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use plaw/vulnzap-faraday-mini-1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf plaw/vulnzap-faraday-mini-1:BF16 # Run inference directly in the terminal: llama cli -hf plaw/vulnzap-faraday-mini-1:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf plaw/vulnzap-faraday-mini-1:BF16 # Run inference directly in the terminal: llama cli -hf plaw/vulnzap-faraday-mini-1:BF16
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 plaw/vulnzap-faraday-mini-1:BF16 # Run inference directly in the terminal: ./llama-cli -hf plaw/vulnzap-faraday-mini-1:BF16
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 plaw/vulnzap-faraday-mini-1:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf plaw/vulnzap-faraday-mini-1:BF16
Use Docker
docker model run hf.co/plaw/vulnzap-faraday-mini-1:BF16
- LM Studio
- Jan
- vLLM
How to use plaw/vulnzap-faraday-mini-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "plaw/vulnzap-faraday-mini-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "plaw/vulnzap-faraday-mini-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/plaw/vulnzap-faraday-mini-1:BF16
- SGLang
How to use plaw/vulnzap-faraday-mini-1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "plaw/vulnzap-faraday-mini-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "plaw/vulnzap-faraday-mini-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "plaw/vulnzap-faraday-mini-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "plaw/vulnzap-faraday-mini-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use plaw/vulnzap-faraday-mini-1 with Ollama:
ollama run hf.co/plaw/vulnzap-faraday-mini-1:BF16
- Unsloth Studio
How to use plaw/vulnzap-faraday-mini-1 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 plaw/vulnzap-faraday-mini-1 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 plaw/vulnzap-faraday-mini-1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for plaw/vulnzap-faraday-mini-1 to start chatting
- Pi
How to use plaw/vulnzap-faraday-mini-1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf plaw/vulnzap-faraday-mini-1:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "plaw/vulnzap-faraday-mini-1:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use plaw/vulnzap-faraday-mini-1 with Docker Model Runner:
docker model run hf.co/plaw/vulnzap-faraday-mini-1:BF16
- Lemonade
How to use plaw/vulnzap-faraday-mini-1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull plaw/vulnzap-faraday-mini-1:BF16
Run and chat with the model
lemonade run user.vulnzap-faraday-mini-1-BF16
List all available models
lemonade list
- Hermes Agent
How to use plaw/vulnzap-faraday-mini-1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf plaw/vulnzap-faraday-mini-1:BF16
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 plaw/vulnzap-faraday-mini-1:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use plaw/vulnzap-faraday-mini-1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf plaw/vulnzap-faraday-mini-1:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "plaw/vulnzap-faraday-mini-1:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Yağız Erkam Çelebi commited on
add full model card with metadata & usage details
Browse files
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
base_model: unsloth/Qwen2.5-Coder-7B-Instruct
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- vulnzap
|
| 8 |
+
- security
|
| 9 |
+
- code-fix
|
| 10 |
+
- gguf
|
| 11 |
+
datasets:
|
| 12 |
+
- custom
|
| 13 |
+
model_type: gguf
|
| 14 |
+
quantized_by: unsloth
|
| 15 |
+
---
|
| 16 |
+
# VulnZap Faraday Mini 1
|
| 17 |
+
|
| 18 |
+
**VulnZap Faraday Mini 1** is a 4‑bit **GGUF** LoRA‑finetuned snapshot of
|
| 19 |
+
[`unsloth/Qwen2.5‑Coder‑7B‑Instruct`](https://huggingface.co/unsloth/Qwen2.5-Coder-7B-Instruct),
|
| 20 |
+
trained on ~363 security‑oriented code snippets and patches.
|
| 21 |
+
|
| 22 |
+
## intended use
|
| 23 |
+
|
| 24 |
+
* **Patch suggestion** – given a vulnerable code block, return a fixed version.
|
| 25 |
+
* **Risk explanation** – describe *why* the snippet is vulnerable and how the patch mitigates it.
|
| 26 |
+
* **CWE classification** – identify vulnerability class from raw code.
|
| 27 |
+
|
| 28 |
+
Not designed for general chat; it excels at short, code‑focused prompts.
|
| 29 |
+
|
| 30 |
+
## training details
|
| 31 |
+
|
| 32 |
+
* **Base model**: Qwen 2.5 Coder 7 B (instruction‑tuned)
|
| 33 |
+
* **Fine‑tuning**: LoRA (r = 64, α = 128) with
|
| 34 |
+
[Unsloth](https://github.com/unslothai/unsloth) on A100 40 GB
|
| 35 |
+
* **Sequence length**: 4 096 tokens
|
| 36 |
+
* **Epochs**: 3 (effective batch = 8)
|
| 37 |
+
* **Quantisation**: `Q4_K_M` via Unsloth’s GGUF exporter
|
| 38 |
+
* **Date**: 2025-07-19
|
| 39 |
+
|
| 40 |
+
## example
|
| 41 |
+
|
| 42 |
+
```text
|
| 43 |
+
### task: patch the vulnerability
|
| 44 |
+
### language: typescript
|
| 45 |
+
### cwe: CWE‑434 – unrestricted file upload
|
| 46 |
+
### code
|
| 47 |
+
import express from 'express';
|
| 48 |
+
import multer from 'multer';
|
| 49 |
+
const upload = multer();
|
| 50 |
+
app.post('/upload', upload.single('file'), (req, res) => {
|
| 51 |
+
/* vulnerable: accepts any file type without checks */
|
| 52 |
+
});
|
| 53 |
+
### response
|
| 54 |
+
<assistant outputs fixed code here>
|
| 55 |
+
````
|
| 56 |
+
|
| 57 |
+
## evaluation
|
| 58 |
+
|
| 59 |
+
* manual spot‑checks on 50 held‑out snippets show
|
| 60 |
+
|
| 61 |
+
* **100 %** patch compiles,
|
| 62 |
+
* **76 %** fully resolves the vulnerability.
|
| 63 |
+
|
| 64 |
+
(Automatic benchmarks will be added soon.)
|
| 65 |
+
|
| 66 |
+
## limitations & bias
|
| 67 |
+
|
| 68 |
+
* trained on open‑source repos → may under‑perform on exotic frameworks
|
| 69 |
+
* no guarantee the patch is production‑ready; always review before deploying
|
| 70 |
+
* doesn’t reason about business‑logic flaws beyond the CWE classes seen in fine‑tuning data
|
| 71 |
+
|
| 72 |
+
## license
|
| 73 |
+
|
| 74 |
+
Apache 2.0 for both the adapter and the exported GGUF.
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
*(c) 2025 PlawLabs – questions: yaz \[at] plawlabs.com*
|