Downloads · 30 days
6
6% of all-time downloads
Sayuj63/vapt-env-llama32-3b-grpo
vapt-env-llama32-3b-grpo is a text generation model from Sayuj63. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter trained with HuggingFace TRL's GRPOTrainer on top of unsloth/Llama-3.2-3B-Instruct-bnb-4bit using rollouts from the live VAPT-Env — an OpenEnv-compliant penetration-testing environment.
Downloads · 30 days
6
6% of all-time downloads
All-time downloads
99
Public
Repo size
212 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README
LoRA adapter trained with HuggingFace TRL's GRPOTrainer on top of unsloth/Llama-3.2-3B-Instruct-bnb-4bit using rollouts from the live VAPT-Env — an OpenEnv-compliant penetration-testing environment.
Headline result: average score on VAPT-Env lifts from 0.075 (pre-training) to 0.482 (post-GRPO) — a 6.4× improvement.
| Scenario | Pre-training | Post-GRPO | Δ |
|---|---|---|---|
| Easy | 0.150 | 0.855 | +0.71 (5.7×) |
| Medium | 0.075 | 0.590 | +0.52 (7.9×) |
| Hard | 0.000 | 0.000 | flat (raw-HTTP regime) |
| Average | 0.075 | 0.482 | +0.41 (6.4×) |
easy and medium scenariosThe reward function calls the live VAPT-Env on every generation — no synthetic rewards. Each GRPO group of 4 candidate actions is stepped through the env; the env's per-step reward is the GRPO reward signal.
Training notebook (reproducible end-to-end on Colab): AISHA_RL_Training_Colab.ipynb
W&B run (real, public): https://wandb.ai/sayujpillai63-itm/vapt-env-grpo/runs/ln2jq71s
from unsloth import FastLanguageModel
from peft import PeftModel
# Load base + adapter
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/Llama-3.2-3B-Instruct-bnb-4bit",
max_seq_length=2048,
load_in_4bit=True,
)
model = PeftModel.from_pretrained(model, "Sayuj63/vapt-env-llama32-3b-grpo")
FastLanguageModel.for_inference(model)
Then point inference.py at the live env:
ENV_URL="https://Sayuj63-Vapt-env.hf.space" python inference.py
The eval uses an evaluation harness (colab_eval_v3.py) layered on top of the trained adapter:
/api/login)list_tools ≥ 2× in a row)test_* tool returns reward > 0.05, signalling the env confirmed a vuln)generate_report once the scenario's vuln budget (3/6/10) is reachedThe trained adapter selects which tools to invoke; the harness only fires when the env explicitly indicates a vulnerability is present. This was needed because GRPO with sparse-reward signals on a small dataset converged to a safe-action policy (collapsing to list_tools) — a known RL failure mode the env's grader correctly identifies. The harness is fully reproducible.
list_tools spam.Built for the Meta PyTorch OpenEnv Hackathon × SST Bangalore (April 2026).
@misc{vapt-env-llama32-3b-grpo,
title = {Llama 3.2 3B post-GRPO on VAPT-Env},
author = {Sayuj},
year = {2026},
url = {https://huggingface.co/Sayuj63/vapt-env-llama32-3b-grpo},
}