Downloads · 30 days
18
27% of all-time downloads
minhhungg/qwen35-9b-p2s-lora
qwen35-9b-p2s-lora is a text generation model from minhhungg. Use it when you need the model to write or continue text. It is set up for peft.
This repository contains the LoRA/PEFT adapter produced by the P2S (Primitive-to-Semantics) research training run.
Downloads · 30 days
18
27% of all-time downloads
All-time downloads
66
Public
Repo size
253 MB
Likes
0
Public
Click a slice to open those files.
.safetensors233 MB · 92%
From the Hugging Face model README
This repository contains the LoRA/PEFT adapter produced by the P2S (Primitive-to-Semantics) research training run.
It is the smallest representation of the learned P2S specialization and is intended for researchers who want to inspect, load, merge, or continue adapting the learned delta rather than downloading a complete merged checkpoint.
Recommended starting point for the full system:
https://github.com/alberttrann/p2s-fuzzing-framework
P2S is a stateful REST API security-testing framework. It reconstructs valid business-flow state, grounds recorded requests through OpenAPI/OCLI, asks a model to produce state-conditioned mutations, executes those mutations against a resettable backend, and records the observed outcome.
The model is therefore one component of a larger execution harness; it is not intended to decide vulnerability success from text alone.
| Resource | Link |
|---|---|
| P2S Framework / SDK | https://github.com/alberttrann/p2s-fuzzing-framework |
| P2S research artifacts / Golden-Silver records | https://huggingface.co/datasets/minhhungg/p2s-research-artifacts |
| AITasker specialization-data source | https://github.com/alberttrann/AITasker/tree/feat/Hung/SWT-Main |
| SEAL Track-A evaluation target | https://github.com/triet2809/SWP391_SealHackathon_BackEnd/tree/be-10/07/src/main/java/vn/edu/fpt/seal |
| LoRA adapter | https://huggingface.co/minhhungg/qwen35-9b-p2s-lora |
| Merged 4-bit checkpoint | https://huggingface.co/minhhungg/qwen35-9b-p2s-merged-4bit |
| Merged 16-bit checkpoint | https://huggingface.co/minhhungg/qwen35-9b-p2s-merged-16bit |
| GGUF F16 / Q8_0 | https://huggingface.co/minhhungg/p2s_gguf |
AITasker P2S self-play
↓
2,266-example SFT corpus
↓
Qwen3.5-9B + LoRA
↓
THIS REPOSITORY
qwen35-9b-p2s-lora
│
├── merge → qwen35-9b-p2s-merged-16bit
├── merge/quantize → qwen35-9b-p2s-merged-4bit
└── merged 16-bit → GGUF F16/Q8_0
The model was specialized from P2S self-play records generated on AITasker.
| Corpus stage | Silver | Candidate-Golden | Total |
|---|---|---|---|
| Raw generator output | 1,917 | 44 unique | 1,961 |
| Deduplicated source corpus | 1,782 | 44 unique | 1,826 |
| Final SFT corpus | 1,782 | 484 training instances | 2,266 |
The 484 positive training instances are repetitions of the same 44 unique candidate-Golden records:
44 × 10 = 440
440 + one additional 44-record copy = 484
1,782 + 484 = 2,266
The 44 candidate-Goldens are training labels, not 44 independently verified vulnerabilities. A 5xx candidate represents server-fault evidence; a 2xx authorization/security-intent candidate requires stronger semantic verification before it can be called a verified security bypass.
| Setting | Value |
|---|---|
| Base | Qwen3.5-9B |
| Method | response-only SFT / LoRA |
| LoRA rank / alpha | 32 / 64 |
| LoRA dropout | 0.05 |
| Max sequence length | 24,576 |
| Batch / accumulation | 1 / 4 |
| Epochs | 6 |
| Peak LR | 2e-4 |
| Optimizer | AdamW 8-bit |
| Scheduler | cosine with restarts |
| Weight decay | 0.01 |
| NEFTune alpha | 5.0 |
| Precision | bfloat16 |
| Hardware | 1× A100 80 GB |
A real-batch mask check measured 92.6% prompt tokens masked from the supervised loss. The full training run used 3,402 optimization steps, adapted 58,195,968 / 9,468,009,712 parameters (0.61%), reported final loss 0.1418, peaked at 34.69 GB reserved GPU memory, and ran for approximately 8.3 hours.
The adapter was trained using the Unsloth/PEFT stack. A typical research workflow is:
pip install -U unsloth peft transformers accelerate
Then load the same Qwen3.5-9B base family and attach the adapter with PEFT/Unsloth.
from unsloth import FastModel
from peft import PeftModel
base_id = "unsloth/Qwen3.5-9B"
adapter_id = "minhhungg/qwen35-9b-p2s-lora"
model, tokenizer = FastModel.from_pretrained(
model_name=base_id,
max_seq_length=24576,
load_in_4bit=True,
)
model = PeftModel.from_pretrained(model, adapter_id)
Exact library APIs can evolve; for research reproduction, prefer the training/reproduction notebook and instructions in the P2S framework repository.
Choose the LoRA adapter when you want to:
If you only want to reproduce P2S inference, the GGUF Q8_0 artifact is the most direct match to the reported Track-A model-serving setup.
The reported Track-A evaluation uses the independent SEAL Spring Boot backend, not the AITasker source application.
| Metric | P2S FT | DeepSeek-V4-Flash-0731 | Base Qwen3.5-9B |
|---|---|---|---|
| Executed records | 1,075 | 1,094 | 1,122 |
| Candidate-Golden | 48 | 29 | 21 |
| Validated outcomes | 31 | 26 | 16 |
| ↳ validated 5xx server faults | 24 | 23 | 13 |
| ↳ verified security bypasses | 7 | 3 | 3 |
| Validated-outcome rate | 2.9% | 2.4% | 1.4% |
The reported P2S evaluation uses the Q8_0 GGUF artifact. Candidate-Golden records are not automatically vulnerabilities; Track A applies post-hoc semantic adjudication before security-bypass claims are made.
This is a research specialization for stateful REST API security testing, not a general-purpose assistant and not an autonomous vulnerability oracle.
Use it for:
Important limitations:
Do not use this artifact to test systems without authorization.
Associated work:
Tran Vo Minh Hung. P2S: Primitive-to-Semantics for Stateful REST API Security Testing Beyond Code Coverage. EAI FISAT 2026.
The publisher DOI/BibTeX can be added once the proceedings record is available.