GGUF
English
red-team
penetration-testing
offensive-security
cybersecurity
gemma-4
qlora
unsloth
anthropic-skills
conversational
Instructions to use RedTeamLab/Gemma-4-12B-redteam-v5 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 RedTeamLab/Gemma-4-12B-redteam-v5 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 RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M # Run inference directly in the terminal: llama cli -hf RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M # Run inference directly in the terminal: llama cli -hf RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
Use Docker
docker model run hf.co/RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with Ollama:
ollama run hf.co/RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
- Unsloth Desktop
- Pi
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RedTeamLab/Gemma-4-12B-redteam-v5: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with Docker Model Runner:
docker model run hf.co/RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
- Lemonade
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
Run and chat with the model
lemonade run user.Gemma-4-12B-redteam-v5-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RedTeamLab/Gemma-4-12B-redteam-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:9931/v1 hermes config set model.default RedTeamLab/Gemma-4-12B-redteam-v5:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RedTeamLab/Gemma-4-12B-redteam-v5 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RedTeamLab/Gemma-4-12B-redteam-v5: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:9931/v1 \ --custom-model-id "RedTeamLab/Gemma-4-12B-redteam-v5: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"
Darren Bennett commited on
Upload README.md with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192---license: gemmalanguage:- entags:- red-team- penetration-testing- offensive-security- cybersecurity- gemma-4- qlora- unslothbase_model: unsloth/Gemma-4-12B-itlibrary_name: ggufinference: false---# Gemma-4-12B-Redteam-v5
Red team security LLM fine-tuned from `unsloth/Gemma-4-12B-it` using QLoRA. Designed for authorized penetration testing — provides concrete working commands with code block formatting, CVE context, and phase-based attack chains.
## Training Details
| Parameter | Value ||---|---|| Base model | unsloth/Gemma-4-12B-it (QAT) || Fine-tuning | QLoRA (r=32, alpha=32, dropout=0) || Dataset | 19,191 records (17,271 train / 1,920 val) || Epochs | 3 || Learning rate | 2e-4, cosine scheduler || GPU | Modal A100-40GB || Training time | ~3h 20m || Final train loss | **0.226** |
## Dataset
Generated from 714 red-teaming skill definitions across tools:- **Reconnaissance**: nmap, gobuster, ffuf, bloodhound, responder- **Exploitation**: sqlmap, hydra, certipy, impacket, metasploit, CVE exploits- **Post-exploitation**: mimikatz, chisel, netexec, hashcat, john- **Attack chains**: phase-based (recon → exploit → post-exploit) and hand-crafted scenarios- **CVE scenarios**: MS17-010, Zerologon, NopAC, NTLM Reflection (CVE-2025-33073), BadSuccessor (CVE-2025-53779), Kerberos Unicode (CVE-2026-26128), ADCS ESC1/ESC3/ESC8/ESC13
All commands use verified tool names (netexec, not crackmapexec). Responses include code block formatting (```bash), CVE references, and failure-mode alternatives.
## Files
| File | Size | Description ||---|---|---|| `Gemma-4-12B-redteam-v5-Q4_K_M.gguf` | 6.9 GB | Quantized merged model (Q4_K_M) || `adapter_config.json` | 1.5 KB | PEFT LoRA configuration || `adapter_model.safetensors` | 251 MB | LoRA adapter weights || `training_stats.json` | — | Full training metrics |
## v5 Improvements
| Metric | v4.1 | v5 ||---|---|---|| Train records | 776 | **17,271** || LoRA rank | 16 | **32** || Epochs | 2 | **3** || LR scheduler | linear | **cosine** || Final loss | 1.097 | **0.226** || Question variants | 1-2 per cmd | **5-7 per cmd** || Code block formatting | Yes | **Yes** || CVE context | Some | **Expanded** || Attack chains | Manual only | **Manual + auto-generated** |
## Usage (llama.cpp)
```bashllama-cli \ -m Gemma-4-12B-redteam-v5-Q4_K_M.gguf \ -ngl 99 \ --prompt "Show me the netexec command for SMB enumeration on 10.10.10.5." \ -n 200 \ -t 8 \ --temp 0.2```
## Local Inference Server
```bashllama-server \ -m Gemma-4-12B-redteam-v5-Q4_K_M.gguf \ -ngl 99 \ --port 8080```
## Disclaimer
This model is intended for **authorized security testing only**. The user is responsible for complying with all applicable laws and regulations. Do not use against systems you do not own or have explicit written permission to test.README.mdAdded+92