cyb3r

A LoRA fine-tune of Qwen3.6-27B for autonomous security agent / CTF operational decision-making โ€” not code review, not vulnerability classification, but the tactical reasoning an operator does during an engagement: when to enumerate, when to exploit, when to pivot, when to abort a rabbit hole, what single command to run next.

The model is named cyb3r-27b. Its operational persona โ€” what you put in the system prompt to activate the fine-tuned behavior โ€” is catdev (see below).

โš ๏ธ Required system prompt (activates the fine-tune)

Every one of the 79,749 training examples used the exact system prompt below. The fine-tuned behavior (structured STATE: output, rabbit-hole recognition, branch ranking, first-command calls) is conditioned on this string. A different prompt will partially fall back to base-Qwen behavior.

You are catdev, an autonomous security intelligence agent for authorized offensive and defensive security work. For every finding, follow the RATH protocol - R: Risk (vulnerability, component, attack surface); A: Assess (CVSS 3.1 + vector, CWE, severity); T: Threat (MITRE ATT&CK, exploit scenarios); H: Highlight (remediation: commands, code fixes, config); D: Document (exec summary, compliance mapping); P: Prevent (detection/monitoring rules). Be precise, evidence-based, and structured, and act only within the authorized scope given by the user.

Recommended decoding for tactical answers: temperature=0.6, top_k=20, top_p=0.95. To get pure tactical output without <think> rambling, pass chat_template_kwargs={"enable_thinking": false} (or --reasoning-budget 512 server-side to bound thinking).

What it does differently from base Qwen3.6-27B

Validated in an A/B test against the unmodified base model (same system prompt, same decoding):

Behavior cyb3r-27b base Qwen3.6-27B
Output format Agent STATE: JSON blocks (current_branch, pivot_reason, next_action, branch_ranking) Textbook vulnerability reports
Rabbit-hole awareness Explicitly recognizes dead ends ("I recognize this as a rabbit hole") and pivots with EV reasoning Classifies CVEs, never says stop
Branch ranking Picks a winner, names the single first command to run, ranks by evidence strength All paths get the same CVSS, no decision made
Token efficiency Self-terminates at ~200-450 tokens Always hits max_tokens cap
Decision orientation "I will abort, I will pivot, first command is X" Reference / remediation material

The fine-tune teaches how an agent should talk and decide, not new security facts. Both models know the same CVEs; cyb3r-27b deploys that knowledge like an operator driving an engagement.

Files

File Size Format Use
cyb3r-27b-Q8_0.gguf 28 GB GGUF, 8.5 BPW Near-lossless. Needs >24 GB VRAM (2ร— GPU or 32 GB+ single GPU).
cyb3r-27b-Q6_K.gguf 21 GB GGUF, 6.6 BPW Sweet spot. Fits a single RTX 3090 (24 GB) with room for context.
cyb3r-27b-Q4_K_M.gguf 16 GB GGUF, 4.9 BPW Compact. 8 GB free for KV cache (32k context) on a 24 GB GPU.
adapter_model.safetensors 1.2 GB PEFT LoRA Load on top of Qwen/Qwen3.6-27B in transformers/unsloth for further tuning.
chat_template.jinja 8 KB Jinja Qwen3.6 native chat template (handles tool calls with arguments as dict). Required for correct tool-call rendering.

All three GGUFs include the MTP (multi-token-prediction) head bundled โ€” block_count=65 (64 transformer layers + 1 MTP layer), nextn_predict_layers=1. Suitable for speculative decoding with --spec-type mtp:n_max=4,p_min=0.4 in ik-llama.cpp.

โš ๏ธ Known issue: PEFT strips the MTP head on merge

If you re-merge the LoRA into the base model yourself with peft.merge_and_unload(), the MTP tensors (mtp.*) will be dropped because no LoRA target covers them. The resulting model has mtp_num_hidden_layers=1 in config but zero mtp.* tensors, producing an unloadable GGUF. See scripts/restore_mtp_layer.py in the source repo for the fix (copies the 15 mtp.* tensors verbatim from the base model into the merged output โ€” they are byte-identical since the LoRA never trained them).

The GGUFs in this repo were produced with that fix applied and verified to contain all 15 blk.64.* (nextn-renamed MTP) tensors.

Training details

  • Base model: Qwen/Qwen3.6-27B (hybrid gated-deltanet / full-attention, 64 layers, hidden_size 5120, vocab 248320, native MTP head)
  • Method: QLoRA via Unsloth (4-bit NF quant)
  • LoRA config: r=64, alpha=128, dropout=0, all linear targets
  • Optimizer: AdamW, learning_rate=1e-4 cosine, warmup ratio 0.03
  • Batch: per_device_train_batch_size=1, gradient_accumulation_steps=8 (effective batch 8)
  • Sequence length: 4096
  • Epochs: 1
  • Steps: 9,968
  • Wall time: 113.5 hours (4.7 days) on 2ร— RTX 3090 with NVLink (model-parallel, single process)
  • Final eval_loss: 0.6309 (from 0.6934 at step 800, โˆ’9.0%)
  • Final train_loss: 0.6234

eval_loss is higher than typical text-prediction fine-tunes (0.3-0.4) because agent decision-making is inherently higher-entropy than code/token prediction. Loss is not the right quality metric for agent behavior โ€” behavioral evaluation (the A/B above) is.

Dataset

79,749 training + 4,240 eval examples, 100% agent/CTF focused. Trace-type distribution:

Trace type Count What it teaches
pentest_trajectory_2 14,079 Full engagement trajectories
htb_walkthrough 10,236 HTB box walkthroughs
pentest_trajectory_1 9,384 Engagement trajectories
ctf_walkthrough 5,741 CTF challenge walkthroughs
rabbit_hole_abort 4,523 When to abandon a dead-end path
enumeration_completeness 4,226 Service inventory + what's missing
bounded_exploration 4,225 Time/effort-budgeted triage
pivot_decision 4,169 When to switch attack branches
post_failure_reassessment 3,982 Hypothesis drop/keep after failure
branch_ranking 3,696 Prioritizing multiple attack paths
service_inventory 3,460 Service enumeration structure
hypothesis_tracking 3,317 Maintaining/Updating hypotheses
replan_checkpoint 3,300 Mid-engagement replanning
planner_executor_replanner 3,174 Agent control loop
ctf_engagement_decision 1,227 CTF-specific tactical decisions
ctf_solution_steps 1,010 CTF solution step sequences

Sequence lengths: mean 1163, median 997, p90 2040, p99 2817, max 3993 tokens.

Intended use

Authorized offensive security work: pentest engagements, CTF play, red-team operations, security research. Use as the decision-making head of an autonomous agent loop, where its STATE: output drives the next tool call.

Not intended for

  • Unauthenticated attacks on systems you don't own or don't have written authorization to test
  • Generating exploits for use against real-world targets without authorization
  • Anything outside the authorized scope the user provides

Limitations

  1. Thinking-mode behavior depends on server config. With --reasoning-budget 0 (unlimited thinking), the model thinks until it hits max_tokens and emits no answer. Set a real reasoning budget or disable thinking via chat_template_kwargs.
  2. Behavioral win is format and decision-orientation, not knowledge. cyb3r-27b does not know more CVEs than base Qwen3.6-27B. It deploys the same knowledge more like an operator.
  3. Trained on catdev persona. A different persona name in the system prompt will produce partial fallback to base behavior.
  4. No v2 epoch 2 yet. v1 saw a 7% eval improvement on epoch 2; v2 may benefit similarly.
  5. Sample size 1 in the behavioral A/B at temperature=0. Suggestive, not statistically rigorous.

Citation

@misc{cyb3r27b2026,
  title  = {cyb3r-27b: a Qwen3.6-27B LoRA fine-tune for autonomous security agent decision-making},
  author = {Cyb3rDudu},
  year   = {2026},
  url    = {https://huggingface.co/Cyb3rDudu/cyb3r}
}

Acknowledgements

  • Qwen Team for the Qwen3.6-27B base model
  • Unsloth for the training stack
  • llama.cpp for the GGUF converter (Qwen3.5/3.6 hybrid arch + MTP support)
Downloads last month
88
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Cyb3rDudu/cyb3r

Base model

Qwen/Qwen3.6-27B
Adapter
(387)
this model