Nexus Swarm — Triage Agent (GRPO)
Role: Request classifier and router for the NEXUS Swarm v4a-max distributed offensive security system.
This is a LoRA adapter trained with Group Relative Policy Optimization (GRPO) on Qwen/Qwen3.5-0.8B, built on top of the SFT adapter. This is the final training stage before RKLLM conversion for deployment on the RK3588 NPU.
Swarm Role
The triage agent is the entry point for the NEXUS swarm. It classifies incoming requests and routes them to the correct swarm node.
Input: Any user request
Output: JSON classification — {"category": "...", "route": "...", "confidence": 0.0-1.0}
Categories: recon, exploit, code-review, report, admin, unknown
Routing Rules:
| Pattern | Route |
|---|---|
| Complex multi-step tasks | nexus-orchestrator |
| Simple single-tool tasks (scan, edit, run) | nexus-worker |
| Search, read, classify tasks | nexus-explore |
| Unsure | nexus-orchestrator (fallback) |
Training Details
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3.5-0.8B |
| SFT adapter | atlas-institute/qwen35-08b-triage-sft |
| Method | GRPO (DeepSeekMath) |
| Prompt dataset | atlas-institute/code-trainer-v11-grpo-triage |
| Prompts | 200 routing prompts |
| Generations per prompt | 4 |
| Learning rate | 1e-6 |
| KL coefficient | 0.1 |
| Max new tokens | 64 |
| Precision | BF16 |
| Hardware | NVIDIA A100 80 GB (HuggingFace Jobs) |
| Framework | TRL + PEFT 0.19.1 |
Validation Gate
- Routing accuracy ≥ 0.90
Pipeline Chain
Qwen/Qwen3.5-0.8B
└─ SFT → atlas-institute/qwen35-08b-triage-sft
└─ GRPO → atlas-institute/qwen35-08b-triage-grpo ← you are here
└─ RKLLM → w8a8 for RK3588 NPU
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3.5-0.8B", torch_dtype="bfloat16", device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "atlas-institute/qwen35-08b-triage-grpo")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B")
messages = [{"role": "user", "content": "Analyze the /etc/passwd file for suspicious accounts"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
# Expected: {"category": "recon", "route": "nexus-explore", "confidence": 0.92}
Swarm Topology
| Node | GPU | Role | Model |
|---|---|---|---|
| nexus-k1 | RTX 5060 Ti 16 GB | Orchestrator | Qwen3-14B Q4_K_M |
| nexus-control | RTX 3070 8 GB | Worker | Qwen3-8B Q4_K_M |
| nexus-3060 | RTX 3060 6 GB | Explore | Gemma-3-4B-it Q8_0 |
| nexus-opi5p | RK3588 NPU 6 TOPS | Triage | Qwen3.5-0.8B w8a8 |
| nexus-opi5b | RK3588S ARM | Embeddings | — |
Citations
@article{shao2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300},
}
Developed By
Atlas Institute — Code-Trainer / RTPI pipeline