Pawn-32M (v1.1)
A 36M-parameter calibrated decision model, distilled from Rook-1 and Laya's typed-decisions checkpoint.
Give it evidence and typed questions (choice, score, noul), and it returns a calibrated probability for every option in one forward pass.
| Rook SecOps test accuracy (6,005 questions) | 0.766 (ECE 0.041) |
| typed-decisions test accuracy (2,000 questions) | 0.709 (ECE 0.136) |
| Latency, T4 GPU | 18.4 ms median / 21.1 ms p95 per case |
| Latency, CPU (Kaggle 4 vCPU) | 147 ms median / 247 ms p95 per case |
| Weights | 71 MB (fp16 safetensors) |
| Base encoder | jhu-clsp/ettin-encoder-32m |
v1.1: what changed
| Metric | v1 | v1.1 | Change |
|---|---|---|---|
| Rook test accuracy | 0.706 | 0.766 | +0.060 |
| typed-decisions accuracy | 0.658 | 0.709 | +0.050 |
| typed-decisions ECE (lower is better) | 0.120 | 0.136 | +0.016 |
The changes since v1:
- Second teacher: Laya's typed-decisions checkpoint now soft-labels the business workflows, and those cases are repeated 2x.
- More severity data: 30,000 extra CVE descriptions from CIRCL with real CVSS labels in the natural class mix. They exclude every CVE in the Rook validation and test splits and in CTI-Bench.
- Softer teacher targets (distillation temperature 2.0).
- Training schedule: 4 epochs at a higher learning rate (encoder 0.00012, head 0.0004).
- Calibration on held-out security and business data together.
Usage
pip install laya
import laya
pawn = laya.load("nuhmanpk/pawn-32m")
q = {"phishing": {"type": "noul", "instructions": "Is this message a phishing, smishing or scam attempt?",
"criteria": {"false": "no: a legitimate message with no attempt to deceive",
"true": "yes: it tries to trick the reader into giving up credentials, money or data"}}}
print(pawn.predict({"message": "Your account is locked. Verify here: http://secure-login.example"}, q)["answers"]["phishing"]["noul"])
Use it in the browser
Pawn runs fully inside a web page with ONNX Runtime Web, with no server and no API key, and the data never leaves the device. Live demo | Browser docs
import * as ort from "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.20.1/dist/ort.all.min.mjs";
import { AutoTokenizer } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.1";
import { Pawn } from "./pawn.js"; // web/pawn.js in this repo
const pawn = await Pawn.load("nuhmanpk/pawn-32m", { ort, AutoTokenizer });
const out = await pawn.predict({ message: "Verify your password: http://x.example" },
{ phishing: { type: "noul", instructions: "Is this message a phishing, smishing or scam attempt?" } });
| Browser weights | Size | Agreement |
|---|---|---|
fp32 (onnx/model.onnx) |
143 MB | 100.0% of decisions match PyTorch |
int8 (onnx/model_int8.onnx) |
97 MB | 93.2% match fp32, not published (below 98%) |
Training
- Teachers: nuhmanpk/rook-1 for the security workflows and extra CVEs. Laya typed-decisions for the business workflows.
- Targets: gold-to-teacher mix of 0.5 (security), 0.7 (extra CVEs) and 0.5 (business); teacher softened with tau = 2.0.
- Recipe: Laya RLCD (proper-scoring-rule policy gradient plus soft cross-entropy) on Kaggle 2x T4 with DDP and fp16. 69,240 training questions; 25 minutes.
- Calibration: temperatures choice 0.871, score 0.769, noul 0.730.
Rook test accuracy by workflow
| workflow | accuracy |
|---|---|
alert_triage |
1.000 |
phishing_message |
0.963 |
phishing_url |
0.944 |
prompt_attack |
0.937 |
cwe_root_cause |
0.931 |
attack_technique |
0.818 |
kev_ransomware |
0.787 |
vuln_exploitation |
0.708 |
security_incidents |
0.706 |
vuln_severity |
0.682 |
guidance_domain |
0.673 |
mitigation_select |
0.663 |
Limitations
- Smaller than its teachers. Knowledge-heavy tasks such as CVSS severity and mitigation selection remain the hardest.
alert_triagereproduces rule-based labels (WitFoo). It measures rule learning, not analyst judgment.- English only.
- Defensive use only. Keep a human in the loop for consequential actions.
- Can be steered by adversarial text placed in the state.
Credits
Built by Nuhman PK on Laya (Convai Innovations), Ettin encoders (Johns Hopkins University) and CIRCL vulnerability data. The training data is credited on the dataset card.