Nexus Swarm — Explore Agent (GRPO)
Role: Read-only reconnaissance and classification agent for the NEXUS Swarm v4a-max distributed offensive security system.
This is a LoRA adapter trained with Group Relative Policy Optimization (GRPO) on google/gemma-3-4b-it, built on top of the SFT adapter. This is the final training stage before GGUF quantization.
Swarm Role
The explore agent performs read-only reconnaissance and classification within the NEXUS swarm. It is restricted to read-only tools only:
- Allowed tools: Read, Grep, Glob, LS, WebFetch, ScopeCheck
- Prohibited: Bash, Write, Edit, or any state-modifying tool
- Output format: Structured JSON —
{"category": "...", "confidence": 0.0-1.0, "summary": "..."}
Training Details
| Parameter | Value |
|---|---|
| Base model | google/gemma-3-4b-it |
| SFT adapter | atlas-institute/gemma4-4b-explore-sft |
| DAPT adapter | atlas-institute/gemma4-4b-dapt-classify |
| Method | GRPO (DeepSeekMath) |
| Prompt dataset | atlas-institute/code-trainer-v11-grpo-explore |
| Prompts | 200 |
| Generations per prompt | 4 |
| Learning rate | 2.5e-7 |
| KL coefficient | 0.1 |
| Max new tokens | 512 |
| Precision | BF16 |
| Hardware | NVIDIA A100 80 GB (HuggingFace Jobs) |
| Framework | TRL + PEFT 0.19.1 |
Validation Gate
- Classification accuracy ≥ 0.85
- Zero write-tool violations (hard constraint)
Pipeline Chain
google/gemma-3-4b-it
└─ DAPT → atlas-institute/gemma4-4b-dapt-classify
└─ SFT → atlas-institute/gemma4-4b-explore-sft
└─ GRPO → atlas-institute/gemma4-4b-explore-grpo ← you are here
└─ GGUF → atlas-institute/gemma4-4b-explore-gguf (Q8_0)
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"google/gemma-3-4b-it", torch_dtype="bfloat16", device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "atlas-institute/gemma4-4b-explore-grpo")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-3-4b-it")
messages = [{"role": "user", "content": "Classify this finding: open port 22 with SSH banner OpenSSH_8.9"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
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 | 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