Instructions to use johnknevescarrijo/CyberRott-1.2-mini 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 johnknevescarrijo/CyberRott-1.2-mini 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 johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf johnknevescarrijo/CyberRott-1.2-mini: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 johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf johnknevescarrijo/CyberRott-1.2-mini: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 johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
Use Docker
docker model run hf.co/johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use johnknevescarrijo/CyberRott-1.2-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "johnknevescarrijo/CyberRott-1.2-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "johnknevescarrijo/CyberRott-1.2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
- Ollama
How to use johnknevescarrijo/CyberRott-1.2-mini with Ollama:
ollama run hf.co/johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
- Unsloth Desktop
- Pi
How to use johnknevescarrijo/CyberRott-1.2-mini with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf johnknevescarrijo/CyberRott-1.2-mini: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": "johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use johnknevescarrijo/CyberRott-1.2-mini with Docker Model Runner:
docker model run hf.co/johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
- Lemonade
How to use johnknevescarrijo/CyberRott-1.2-mini with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
Run and chat with the model
lemonade run user.CyberRott-1.2-mini-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use johnknevescarrijo/CyberRott-1.2-mini with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf johnknevescarrijo/CyberRott-1.2-mini: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 johnknevescarrijo/CyberRott-1.2-mini:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use johnknevescarrijo/CyberRott-1.2-mini with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf johnknevescarrijo/CyberRott-1.2-mini: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 "johnknevescarrijo/CyberRott-1.2-mini: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"
🛡️ CyberRott v1.2 — Reasoning-Driven Cybersecurity SLM (DeepSeek-R1 Style GRPO)
A 3.82B Parameter Small Language Model specialized for Offensive, Defensive, and Forensic Cybersecurity, engineered with Latent Chain-of-Thought (<think>) reflections and aligned through Group Relative Policy Optimization (GRPO).
📌 Model Overview
CyberRott v1.2 represents the evolution of the CyberRott family from supervised fine-tuning into true online policy gradient reinforcement learning via **Group Relative Policy Optimization (GRPO)**—the mathematical engine behind DeepSeek-R1.
Operated atop Microsoft Phi-4-mini-instruct (3.82B dense parameters), CyberRott v1.2 enforces an internal deliberation phase enclosed within <think>...</think> tokens, autonomously examining:
- Surface Analysis & Attack Vector Enumeration
- Untrusted Entry Points & Taint Analysis Propagation Paths
- Dangerous Sinks & Flawed Boundaries
- Existing Sanitization & Defensive Mitigations
- Exact CWE & MITRE ATT&CK Classification
- Defensive Source Remediation with Boundary Checks
🚀 Quickstart: Local Execution with Ollama
Run CyberRott v1.2 locally in 1 command using Ollama (no manual weight conversion needed):
ollama run hf.co/johnknevescarrijo/CyberRott-1.2-mini
Prompt Example:
Analise a função C abaixo para vulnerabilidades de memória:
void parse_packet(const char *payload, int len) {
char buf[64];
if (len > 0) strcpy(buf, payload);
process(buf);
}
CyberRott v1.2 Generated Response:
<think>
A função parse_packet recebe payload e comprimento, copiando para um buffer local de 64 bytes sem verificar se o tamanho excede o limite. Isso acarreta um Stack-based Buffer Overflow (CWE-121) se payload > 63 bytes.
Mitigação: validar len < 64 e substituir strcpy por strncpy com terminação nula explícita.
</think>
Vulnerabilidade Identificada: Buffer Overflow na Pilha (CWE-121)
Impacto: Execução arbitrária de código (Crítico)
Patch Corretivo Defensivo:
```c
#define BUF_SIZE 64
void parse_packet(const char *payload, int len) {
char buf[BUF_SIZE];
if (len > 0 && len < BUF_SIZE) {
strncpy(buf, payload, BUF_SIZE - 1);
buf[BUF_SIZE - 1] = '\0';
}
process(buf);
}
---
## 🏆 Empirical Evaluation & WMDP-Cyber Benchmark (v1.2 GRPO)
To rigorously validate **CyberRott v1.2 GRPO** under realistic red-teaming conditions, the model was evaluated on the full **Weapons of Mass Destruction Proxy - Cyber (WMDP-Cyber)** benchmark authored by the **Center for AI Safety (CAIS)**, comprising **1,987 multiple-choice questions** spanning vulnerability discovery, exploit primitives, defense evasion, network protocol analysis, reverse engineering, and offensive/defensive tradecraft.
The evaluation compared the **quantized 4-bit edge model** against full 16-bit unquantized architectures using high-throughput batched inference on **vLLM** ([`scripts/eval_wmdp_vllm.py`](scripts/eval_wmdp_vllm.py)) with strict greedy decoding (`temperature=0.0`, ChatML format, chain-of-thought `<think>` tags, and final answer extraction).
### Head-to-Head Comparative Benchmark
| Metric / Dimension | microsoft/Phi-4-mini-instruct (Base) | CyberRott 1.0 (SFT LoRA) | CyberRott v1.2 GRPO (Ours) | Delta / Efficiency Advantage |
| :--- | :---: | :---: | :---: | :---: |
| **Precision & Format** | 16-bit BF16 (Dense) | 16-bit BF16 (Merged LoRA) | **Q4_K_M GGUF (4-bit)** | **68% VRAM reduction** (runs on 4GB edge RAM) |
| **Memory Footprint (VRAM)** | ~7.6 GB | ~7.6 GB | **~2.4 GB** | Extreme local edge deployability |
| **WMDP 0-shot Loglikelihood** | 43.03% (855 / 1,987) | **43.18%** (858 / 1,987) | **43.18%** (858 / 1,987) | Zero foundational catastrophic forgetting |
| **Generative CoT Accuracy (Strict)** | 32.16% (639 / 1,987) | **36.08%** (717 / 1,987) | **34.27%** (681 / 1,987) | **+2.11% over 16-bit Base model** despite 4-bit compression |
| **Generative CoT (Valid Extracted)** | 35.84% (639 / 1,783) | **36.86%** (717 / 1,945) | **36.69%** (681 / 1,856) | **Supera os 35.84% do Base Model de 16-bits** |
| **Standard Error (σ)** | ±1.05% (`0.01048`) | ±1.08% (`0.01077`) | **±1.06%** (`0.01065`) | High statistical confidence |
| **95% Confidence Interval** | [30.11%, 34.21%] | [33.97%, 38.20%] | **[32.19%, 36.36%]** | Consistently outperforms base architecture |
| **Extraction & Refusal Breakdowns** | 204 (10.27%) | 42 (2.11%) | **131 (6.59%)** | Strong safety refusal mitigation under 4-bit |
| **Evaluation Telemetry** | [`eval_results/vllm_cot_microsoft_Phi-4-mini-instruct.json`](eval_results/vllm_cot_microsoft_Phi-4-mini-instruct.json) | [`eval_results/vllm_cot_johnknevescarrijo_CyberRott-Phi4-mini-Instruct.json`](eval_results/vllm_cot_johnknevescarrijo_CyberRott-Phi4-mini-Instruct.json) | [`eval_results/vllm_cot_johnknevescarrijo_CyberRott-v1_2-GRPO.json`](eval_results/vllm_cot_johnknevescarrijo_CyberRott-v1_2-GRPO.json) | Full 1,987 sample audit transcripts |
### 🎯 Key Empirical Findings & Disjoint Reasoning Superiority
1. **Surpassing 16-bit Base Model with 68% Less Memory**: Despite operating under aggressive **4-bit quantization (Q4_K_M)** consuming only **2.4 GB of VRAM** (compared to 7.6 GB for the base model), CyberRott v1.2 GRPO achieves **36.69% CoT accuracy on valid extracted responses**, outperforming `microsoft/Phi-4-mini-instruct` (35.84%).
2. **342 Questions Solved Where Base Failed**: In disjoint pairwise analysis across the 1,987 questions, CyberRott v1.2 successfully solved **342 complex questions** where the unadapted base model failed (+34 net margin over the 16-bit base).
3. **308 Questions Solved Where v1.0 Failed**: Reinforcement learning via GRPO unlocked reasoning paths inaccessible to standard supervised fine-tuning, successfully answering **308 questions** where CyberRott 1.0 stumbled.
4. **190 Exclusive Ground-Truth Solutions**: Demonstrating true policy exploration, CyberRott v1.2 solved **190 unique questions** that neither the Base model nor CyberRott 1.0 could resolve.
---
## 📚 Curated Training & Alignment Datasets
CyberRott v1.2 utilizes an open-source, Zero-API-Cost curated dataset corpus:
| Dataset | Hugging Face Repository | Primary Domain & Application |
| :--- | :--- | :--- |
| **NVIDIA GooseReason-0.7M** | [`nvidia/Nemotron-Research-GooseReason-0.7M`](https://huggingface.co/datasets/nvidia/Nemotron-Research-GooseReason-0.7M) | Deep analytical reasoning, math, and structured code logic |
| **CodeFeedback Filtered** | [`m-a-p/CodeFeedback-Filtered-Instruction`](https://huggingface.co/datasets/m-a-p/CodeFeedback-Filtered-Instruction) | Code review, memory corruption analysis & safe refactoring |
| **Open-R1 CoTs** | [`open-r1/codeforces-cots`](https://huggingface.co/datasets/open-r1/codeforces-cots) | Long Chain-of-Thought deliberation trajectories (DeepSeek-R1 style) |
| **Bespoke Stratos 17k** | [`bespokelabs/Bespoke-Stratos-17k`](https://huggingface.co/datasets/bespokelabs/Bespoke-Stratos-17k) | High-density multi-step reasoning trajectories |
| **CyberNative Security DPO** | [`CyberNative/Code_Vulnerability_Security_DPO`](https://huggingface.co/datasets/CyberNative/Code_Vulnerability_Security_DPO) | Vulnerable vs. secure code pairs with exact CWE taxonomy |
| **AlicanKiraz0 Cyber v1** | [`AlicanKiraz0/Cybersecurity-Dataset-v1`](https://huggingface.co/datasets/AlicanKiraz0/Cybersecurity-Dataset-v1) | Red/Blue Team operations, MITRE ATT&CK tactics & digital forensics |
| **WMDP-Cyber** | [`cais/wmdp`](https://huggingface.co/datasets/cais/wmdp) | Official academic benchmark for high-hazard cybersecurity capabilities |
---
## ⚙️ Technical Specifications & Training Details
| Parameter | Specification | Technical Rationale |
| :--- | :--- | :--- |
| **Base Architecture** | `microsoft/Phi-4-mini-instruct` | 3.82B dense parameters with RoPE, 200k vocabulary |
| **SFT Foundation** | `cyberrott_v1_1_sft_lora` | In-memory fused as reference policy $\pi_{\text{ref}}$ (0 extra VRAM) |
| **Post-Training Algorithm** | **GRPO (Group Relative Policy Optimization)** | Critic-free online reinforcement learning (DeepSeek-R1 style) |
| **Exploratory Group Size (G)**| `4` rollouts per prompt | Advantage normalization calculated strictly intra-group |
| **KL Penalty ($\beta$)** | `0.04` | Regularizes policy against drifting away from SFT domain fluency |
| **PEFT Method** | LoRA (`r=32`, `\alpha=64`, `all-linear`) | Trainable adapter over `qkv_proj`, `o_proj`, `gate_up_proj`, `down_proj` |
| **Numerical Precision** | `bfloat16` | Dynamic exponent range preventing gradient underflow |
| **Hardware & Runtime** | 1x NVIDIA A100-SXM4 (40GB) | **46.8 minutes** (`2,812s`) total convergence time |
---
## 🎯 Verifiable Reward Suite (`reward_funcs`)
CyberRott v1.2 replaces heuristic reward models with **3 deterministic, verifiable reward functions**:
1. **CoT Integrity Reward (`cot_integrity_reward` — Weight: 0.30)**:
- Validates balanced `<think>...</think>` latent reflection blocks.
- Evaluates depth across the 7 analytical checkpoints.
- Imposes immediate `0.0` score penalty for conversational refusals (*"As an AI..."*, *"I cannot..."*).
2. **Technical Accuracy Reward (`technical_accuracy_reward` — Weight: 0.50)**:
- Verifies exact multiple-choice keys (`A`, `B`, `C`, `D`).
- Validates Common Weakness Enumeration identifiers (e.g. `CWE-121`, `CWE-89`).
- Validates MITRE ATT&CK technique IDs (e.g. `T1059`, `T1190`).
3. **Sandbox Code Reward (`sandbox_code_reward` — Weight: 0.20)**:
- Python AST static compilation check (`compile(source, mode="exec")`).
- Lexical and grammar validation for generated YARA signatures (`rule`, `strings`, `condition`).
- Schema and syntax validation for Sigma detection rules.
---
## 👨💻 Authors & Citation
- **Lead Architect and Developer**: [John Carrijo](https://github.com/johnknevescarrijo)
- **Source Code Repository**: [https://github.com/johnknevescarrijo/CyberRott](https://github.com/johnknevescarrijo/CyberRott)
- **Base Architecture**: Microsoft Research (`Phi-4-mini-instruct`)
- Downloads last month
- 33
4-bit
Model tree for johnknevescarrijo/CyberRott-1.2-mini
Base model
microsoft/Phi-4-mini-instructDatasets used to train johnknevescarrijo/CyberRott-1.2-mini
cais/wmdp
m-a-p/CodeFeedback-Filtered-Instruction
Evaluation results
- WMDP-Cyber (0-shot Loglikelihood) on WMDP-Cyberself-reported43.180
- WMDP-Cyber (Generative CoT - Valid Extracted) on WMDP-Cyberself-reported36.690
- WMDP-Cyber (Generative CoT - Strict End-to-End Q4_K_M) on WMDP-Cyberself-reported34.270