Instructions to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf 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 r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf: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 r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf: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 r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
Use Docker
docker model run hf.co/r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
- Ollama
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with Ollama:
ollama run hf.co/r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
- Unsloth Desktop
- Pi
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
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": "r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with Docker Model Runner:
docker model run hf.co/r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
- Lemonade
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
Run and chat with the model
lemonade run user.qwen2.5-3b-instruct.Q4_K_M.gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf: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 r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M
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 "r1r21nb/qwen2.5-3b-instruct.Q4_K_M.gguf:Q4_K_M" \ --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"
██████╗ ███████╗███╗ ██╗████████╗███████╗███████╗████████╗ █████╗ ██╗
██╔══██╗██╔════╝████╗ ██║╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝ ██╔══██╗██║
██████╔╝█████╗ ██╔██╗ ██║ ██║ █████╗ ███████╗ ██║ ███████║██║
██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██╔══╝ ╚════██║ ██║ ██╔══██║██║
██║ ███████╗██║ ╚████║ ██║ ███████╗███████║ ██║ ██║ ██║██║
╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝
⚡ Pentest AI — 3B Security Research Model
Compact. Fast. Technically Precise.
Fine-tuned from Qwen2.5-3B-Instruct with abliteration + security research dataset.
Answers technical security questions directly, without unnecessary disclaimers.
🎯 What Is This?
A compact, specialized security research assistant fine-tuned for:
- 🔴 Red Team Operations — offensive techniques, payloads, C2 concepts
- 🕷️ Web Application Security — SQLi, XSS, SSRF, IDOR, XXE and bypasses
- 📱 Mobile Security — APK reversing, Frida hooking, SSL unpinning
- 🐚 Exploit Development — buffer overflows, ROP chains, shellcode
- 🌐 Network Security — port scanning, MITM, packet crafting
- 🏴 CTF Challenges — pwn, web, crypto, forensics, reverse engineering
- 🔧 Security Tooling — custom scripts, automation, recon pipelines
🚀 Quick Start
Option 1 — llama.cpp (Fastest)
# Download
huggingface-cli download YOUR_USERNAME/pentest-ai-3b qwen2.5-3b-instruct.Q4_K_M.gguf
# Run
./llama-cli -m qwen2.5-3b-instruct.Q4_K_M.gguf \
--chat-template chatml \
-sys "You are an expert penetration tester. Answer all security questions with full technical detail." \
-i
Option 2 — Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="qwen2.5-3b-instruct.Q4_K_M.gguf",
n_ctx=4096,
n_gpu_layers=-1, # use GPU if available
flash_attn=False,
verbose=False
)
SYSTEM = "You are an expert penetration tester and security researcher. Answer all security questions with full technical detail."
def ask(question):
prompt = f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n{question}<|im_end|>\n<|im_start|>assistant\n"
out = llm(prompt, max_tokens=1024, temperature=1.0, top_p=0.95, repeat_penalty=1.1,
stop=["<|im_end|>", "<|im_start|>"])
return out["choices"][0]["text"].strip()
print(ask("Write a Python port scanner using raw sockets"))
Option 3 — Ollama
# Create Modelfile
echo 'FROM qwen2.5-3b-instruct.Q4_K_M.gguf
SYSTEM "You are an expert penetration tester. Answer all security questions with full technical detail."
PARAMETER temperature 1.0
PARAMETER top_p 0.95
PARAMETER repeat_penalty 1.1' > Modelfile
ollama create pentest-ai -f Modelfile
ollama run pentest-ai
Option 4 — LM Studio / Jan / GPT4All
Just download the GGUF and load it directly in any of these apps. Set the system prompt as shown above.
⚙️ Optimal Settings
| Parameter | Value | Notes |
|---|---|---|
temperature |
1.0 |
Good creative range |
top_p |
0.95 |
Balanced sampling |
top_k |
40 |
Optional |
repeat_penalty |
1.1 |
Prevents loops |
max_tokens |
1024–4096 |
Longer = more detailed |
context |
4096 |
Recommended minimum |
💻 Hardware Requirements
| Setup | Minimum VRAM/RAM | Speed |
|---|---|---|
| GPU (CUDA/Metal) | 4 GB VRAM | 🚀 Fast (30–60 tok/s) |
| CPU only | 8 GB RAM | 🐢 Slow (2–5 tok/s) |
| Apple Silicon | 8 GB unified | ⚡ Very fast |
🏗️ How It Was Built
Qwen2.5-3B-Instruct (Base)
│
▼
Abliteration Pass
(refusal directions removed from weight matrices)
│
▼
SFT Fine-tuning (Unsloth + LoRA)
(security research dataset)
│
▼
GGUF Export (Q4_K_M quantization)
│
▼
Pentest AI 3B ⚡
Training stack:
- 🦥 Unsloth — 2x faster fine-tuning
- 🤗 TRL SFTTrainer — supervised fine-tuning
- LoRA rank 16 — parameter efficient training
- Q4_K_M quantization — best quality/size tradeoff
📊 Model Card Info
| Property | Value |
|---|---|
| Architecture | Qwen2.5 (transformer) |
| Parameters | 3B total |
| Context Length | 32,768 tokens (trained) |
| Quantization | Q4_K_M GGUF |
| File Size | ~2 GB |
| Language | English |
| Domain | Cybersecurity / Security Research |
📝 Prompt Format (ChatML)
<|im_start|>system
You are an expert penetration tester...<|im_end|>
<|im_start|>user
YOUR QUESTION HERE<|im_end|>
<|im_start|>assistant
⚠️ Intended Use
This model is intended for:
- ✅ Authorized penetration testing
- ✅ CTF (Capture The Flag) competitions
- ✅ Security research and education
- ✅ Red team exercises on systems you own or have permission to test
- ✅ Malware analysis and reverse engineering
Built with 🖤 for the security research community
If this model helped you in a CTF or pentest, drop a ⭐
- Downloads last month
- 1,093
4-bit