Downloads · 30 days
0
sahilempire/redsec-7b-distill
redsec-7b-distill is a text generation model from sahilempire. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as other.
A LoRA adapter (MLX format) that turns WhiteRabbitNeo-2.5 (Qwen2.5-Coder-7B) into RedSec, a security assistant for authorized penetration testing, red-team, and LLM-security research. Trained by distillation on the ba…
Downloads · 30 days
0
Access
Public
Updated Aug 7, 2026
Repo size
23.1 MB
Likes
0
Public
Click a slice to open those files.
.safetensors23.1 MB · 100%
From the Hugging Face model README
A LoRA adapter (MLX format) that turns WhiteRabbitNeo-2.5 (Qwen2.5-Coder-7B) into RedSec, a security assistant for authorized penetration testing, red-team, and LLM-security research. Trained by distillation on the base model's own correct answers plus curated gold examples.
mlx-lm) format, ~22 MBProduces concrete, structured security test payloads in a consistent voice (Payload / Explanation / Authorization Reminder) for common attack classes.
| Metric | Result |
|---|---|
| Refusals | 0 / 24 |
| Looping / degenerate output | 0 / 24 |
| Structured / on-voice | 24 / 24 |
| Correct on standard attacks | strong (SQLi, XSS, SSRF, XXE, NoSQL, LDAP, JWT, CSRF, Log4Shell, file upload, nmap, secure-code fix) |
Known soft spots (7B capability ceiling — verify these): indirect prompt injection can be confused with XSS, and username-enumeration methodology can be imprecise. Nuanced categories should be reviewed by a human.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler, make_logits_processors
# point adapter_path at this repo (or a local copy); base = the 4-bit WhiteRabbitNeo-2.5 Qwen2.5-Coder-7B
model, tok = load("<your-local-whiterabbitneo-2.5-qwen-coder-7b-4bit>", adapter_path="redsec-7b-distill")
sys = ("You are RedSec, a security assistant for authorized penetration testing and red-team work. "
"Answer with concrete, correct payloads or steps, a brief explanation, and an authorization reminder.")
msgs = [{"role": "system", "content": sys},
{"role": "user", "content": "Give me SQL injection payloads to test a login form."}]
text = tok.apply_chat_template(msgs, add_generation_prompt=True)
print(generate(model, tok, prompt=text, max_tokens=400,
sampler=make_sampler(temp=0.5),
logits_processors=make_logits_processors(repetition_penalty=1.1)))
Authorized security testing, red-teaming, and defensive research only. This adapter makes the model emit live attack payloads. Not for unauthorized access or harm. Use only on systems you own or are explicitly authorized to assess.
Distillation (the base model teaching itself from its own correct outputs) + curated gold for prompt-injection and other categories, then LoRA fine-tuning (MLX). Best checkpoint selected by validation loss. See the dataset card for full method and provenance.