k3ssdev's picture
Update README.md
29a4876 verified
|
Raw
History Blame Contribute Delete
5.92 kB
---
license: apache-2.0
base_model: Qwen/Qwen2.5-Coder-3B-Instruct
tags:
- qwen
- qwen2.5
- cybersecurity
- pentesting
- red-team
- gguf
- unsloth
language:
- en
- es
datasets:
- tuandunghcmut/Trendyol-Cybersecurity-Instruction-Tuning-Dataset
---
# 🛡️ Qwen2.5-Coder-3B-Pentest (Red Team Copilot)
*[English Version below | Versión en Español más abajo]*
---
## 🇬🇧 English Version
This model is a specialized fine-tuning of **Qwen 2.5 Coder 3B Instruct**, designed to act as a **Tactical Copilot ("Hacking Buddy")** for offensive cybersecurity tasks, vulnerability analysis, and terminal command automation.
Being available in **GGUF** format and highly lightweight, it is strongly optimized for deployment in **Edge AI** environments (100% offline), such as Raspberry Pi or mobile devices integrated with C++ engines like `llama.cpp` or `lite-cpp-ai`.
### 🎯 Model Objective
Unlike a generalist LLM, this model has been fine-tuned to:
- **Technical Accuracy:** Generate exact flags for terminal tools (`nmap`, `netcat`, `tcpdump`, `iptables`).
- **Offensive/Defensive Scripts:** Automate security tasks in Python (e.g., using `scapy`, `requests`).
- **Rapid Analysis:** Interpret network traces and security logs.
### 🛠️ Training Details
- **Base Model:** `Qwen/Qwen2.5-Coder-3B-Instruct`
- **Technique:** QLoRA (Rank 32, Alpha 32)
- **Framework:** Unsloth
- **Dataset:** `tuandunghcmut/Trendyol-Cybersecurity-Instruction-Tuning-Dataset`
- **Training Hardware:** NVIDIA RTX 4080 (Local)
### 💻 How to Use
#### Option A: Offline Use (Recommended - GGUF)
The repository includes the quantized file `Qwen2.5-Coder-3B-Pentest-Q4_K_M.gguf`. You can run it with `llama.cpp`:
```bash
./llama-cli -m Qwen2.5-Coder-3B-Pentest-Q4_K_M.gguf -p "Write an nmap command to scan for hidden UDP ports."
```
#### Option B: Use with Transformers (Python)
You can load the full tensors (`.safetensors`) using the standard Hugging Face library:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "k3ssdev/Qwen2.5-Coder-3B-Pentest"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
prompt = "Generate a Python script to discover hosts on a local network."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
```
### ⚠️ Legal and Intended Use Disclaimer
**This model is provided EXCLUSIVELY for educational purposes, research, and authorized security audits (Red Teaming / Blue Teaming).**
* The model lacks certain alignment filters (censorship) in order to analyze malicious code and generate Proof of Concepts (PoCs).
* The user is solely responsible for ensuring they have explicit and legal permission to evaluate or attack any network infrastructure.
* The creator of this model is not responsible for any direct or indirect damage resulting from the misuse of the commands or scripts generated by this AI.
---
## 🇪🇸 Versión en Español
Este modelo es un *fine-tuning* especializado de **Qwen 2.5 Coder 3B Instruct**, diseñado para actuar como un **Copiloto Táctico ("Hacking Buddy")** en tareas de ciberseguridad ofensiva, análisis de vulnerabilidades y automatización de comandos de terminal.
Al estar disponible en formato **GGUF** y pesar poco, está fuertemente optimizado para ser desplegado en entornos **Edge AI** (100% offline), como Raspberry Pi o dispositivos móviles integrados con motores C++ como `llama.cpp` o `lite-cpp-ai`.
### 🎯 Objetivo del Modelo
A diferencia de un LLM generalista, este modelo ha sido ajustado para:
* **Precisión Técnica:** Generar flags exactas para herramientas de terminal (`nmap`, `netcat`, `tcpdump`, `iptables`).
* **Scripts Ofensivos/Defensivos:** Automatizar tareas de seguridad en Python (ej. uso de `scapy`, `requests`).
* **Análisis Rápido:** Interpretar trazas de red y *logs* de seguridad.
### 🛠️ Detalles del Entrenamiento
* **Modelo Base:** `Qwen/Qwen2.5-Coder-3B-Instruct`
* **Técnica:** QLoRA (Rank 32, Alpha 32)
* **Framework:** Unsloth
* **Dataset:** `tuandunghcmut/Trendyol-Cybersecurity-Instruction-Tuning-Dataset`
* **Hardware de Entrenamiento:** NVIDIA RTX 4080 (Local)
### 💻 Cómo utilizarlo
#### Opción A: Uso Offline (Recomendado - GGUF)
El repositorio incluye el archivo cuantizado `Qwen2.5-Coder-3B-Pentest-Q4_K_M.gguf`. Puedes ejecutarlo con `llama.cpp`:
```bash
./llama-cli -m Qwen2.5-Coder-3B-Pentest-Q4_K_M.gguf -p "Escribe un comando nmap para escanear puertos UDP ocultos."
```
#### Opción B: Uso con Transformers (Python)
Puedes cargar los tensores completos (`.safetensors`) usando la librería estándar de Hugging Face:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "k3ssdev/Qwen2.5-Coder-3B-Pentest"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
prompt = "Genera un script en Python para descubrir hosts en una red local."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
```
### ⚠️ Disclaimer Legal y de Uso (Intended Use)
**Este modelo se proporciona EXCLUSIVAMENTE con fines educativos, de investigación y para auditorías de seguridad autorizadas (Red Teaming / Blue Teaming).**
* El modelo carece de ciertos filtros de alineación (censura) para poder analizar código malicioso y generar pruebas de concepto (PoCs).
* El usuario es el único responsable de asegurar que tiene permiso explícito y legal para evaluar o atacar cualquier infraestructura de red.
* El creador del modelo no se hace responsable de los daños directos o indirectos derivados del mal uso de los comandos o scripts generados por esta IA.
```