Views
No views yet
mlx-lm) format, ~22 MB| 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) |
1from mlx_lm import load, generate
2from mlx_lm.sample_utils import make_sampler, make_logits_processors
3
4# point adapter_path at this repo (or a local copy); base = the 4-bit WhiteRabbitNeo-2.5 Qwen2.5-Coder-7B
5model, tok = load("<your-local-whiterabbitneo-2.5-qwen-coder-7b-4bit>", adapter_path="redsec-7b-distill")
6
7sys = ("You are RedSec, a security assistant for authorized penetration testing and red-team work. "
8 "Answer with concrete, correct payloads or steps, a brief explanation, and an authorization reminder.")
9msgs = [{"role": "system", "content": sys},
10 {"role": "user", "content": "Give me SQL injection payloads to test a login form."}]
11text = tok.apply_chat_template(msgs, add_generation_prompt=True)
12print(generate(model, tok, prompt=text, max_tokens=400,
13 sampler=make_sampler(temp=0.5),
14 logits_processors=make_logits_processors(repetition_penalty=1.1)))