Decision-WAF-V1-0.8B

A compact request classifier for a web application firewall. It reads a single HTTP request โ€” method, path, query, and headers inspection; bodies are not inspected โ€” and answers one question: is this request benign, or which attack class is it? It replies with a single letter token, which the decision-waf ingress scores as a probability distribution over the categories.

What it is designed for

  • Per-request WAF verdicts at the edge: block-or-allow in one forward pass, with a tunable threshold on the attack score (1 โˆ’ p(benign)).
  • HTTP inspection: classify requests using the method, path, query, and headers without inspecting request bodies.
  • Defense in depth, not sole protection: it is one signal in front of real services, alongside TLS, authentication, and backups. It is not an exploit detector or a substitute for patching.

Categories

benign ยท auth_abuse ยท file_access ยท injection ยท other_attack ยท recon ยท ssrf_redirect ยท xss

Intended use and serving

  • Served via llama.cpp (llama-server, build โ‰ฅ 11822) with the decision metadata embedded in this GGUF (qwen35.decision.* + the systemone chat template); scored through the /v1/systemone endpoint.
  • Recommended threshold: 0.001โ€“0.05 (see evaluation). Q8_0 quantization; ~812 MB.
  • Latency: ~0.67 s median on an Apple M4, ~30 ms class on an RTX 4000 SFF Ada.

Training

LoRA r=64, ฮฑ=128, approximately 43M trainable parameters on Qwen3.5-0.8B-Base, merged into the base weights. One-token classification head readout; loss on the answer token only. Trained for 3,988 steps (approximately 12.4 h) on a single RTX 4000 SFF Ada.

Data: approximately 129k labeled HTTP requests, with the evaluation set strictly held out via request-line, query-value, and header-value fingerprints.

Evaluation

Benchmark: recall vs FPR and F1 vs threshold

The benchmark set (299 requests: 145 benign, 154 attacks) uses the same harness for all models. h2o-lightning-4b and d1-3B numbers are from the official decision-waf-eval reports (threshold grid 0.05โ€“0.95); Decision-WAF-V1-0.8B is computed from per-row scores on the same rows, backend and scoring semantics (attack score = 1 โˆ’ p(benign)).

Threshold sweep (attack recall / false-positive rate):

threshold h2o-lightning-4b d1-3B Decision-WAF-V1-0.8B
0.05 1.000 / 1.000 1.000 / 1.000 0.838 / 0.007
0.10 0.994 / 0.517 1.000 / 0.945 0.831 / 0.007
0.20 0.968 / 0.248 0.994 / 0.621 0.825 / 0.007
0.35 0.961 / 0.221 0.909 / 0.159 0.825 / 0.000
0.50 0.955 / 0.207 0.799 / 0.055 0.799 / 0.000
0.70 0.922 / 0.152 0.636 / 0.028 0.792 / 0.000
0.80 0.903 / 0.131 0.565 / 0.007 0.773 / 0.000
0.90 0.896 / 0.055 0.461 / 0.000 0.766 / 0.000
0.95 0.857 / 0.041 0.338 / 0.000 0.747 / 0.000

Best F1 per model (dots on the chart):

Model Best F1 at threshold P / R / FPR Best recall @ FPR โ‰ค 1%
h2o-lightning-4b 0.920 0.90 0.945 / 0.896 / 0.055 none (min FPR 4.1%)
d1-3B 0.883 0.35 0.859 / 0.909 / 0.159 0.565
Decision-WAF-V1-0.8B 0.936 0.001 0.979 / 0.896 / 0.021 0.851

It catches header-borne Log4Shell/Shellshock payloads and correctly handles benign requests with non-browser clients, well-known service URLs in parameters, and code-like search terms.

Known limitations:

  • Conservative bias: under-flags attacks delivered by normal-looking clients on normal endpoints (per-label recall @0.9: auth_abuse 3/8, ssrf_redirect 5/10, recon 20/30, injection 51/63). A follow-up version should rebalance attack coverage on these shapes.
  • Headers-only: body-borne attacks are out of scope in the current inspection mode.
  • Trained on curated and synthetic data; distribution shift (new apps, unusual API shapes, encodings) can move both error directions. Monitor and retrain.
  • A WAF classifier can be evaded and can misclassify; use as one layer, keep audit logs, and never let it be the only thing between the internet and a vulnerable service.

Files

  • model.safetensors + tokenizer โ€” merged HF weights
  • Conversion notes: exclude NextN speculative tensors (--no-nextn); the decision metadata must be present or the decision endpoints are not registered.
Downloads last month
42
Safetensors
Model size
0.9B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for 0xBrandon/Decision-WAF-V1-0.8B

Finetuned
(156)
this model
Quantizations
1 model

Collection including 0xBrandon/Decision-WAF-V1-0.8B