Instructions to use 0xBrandon/Decision-WAF-V1-0.8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0xBrandon/Decision-WAF-V1-0.8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="0xBrandon/Decision-WAF-V1-0.8B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("0xBrandon/Decision-WAF-V1-0.8B") model = AutoModelForMultimodalLM.from_pretrained("0xBrandon/Decision-WAF-V1-0.8B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 0xBrandon/Decision-WAF-V1-0.8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0xBrandon/Decision-WAF-V1-0.8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xBrandon/Decision-WAF-V1-0.8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/0xBrandon/Decision-WAF-V1-0.8B
- SGLang
How to use 0xBrandon/Decision-WAF-V1-0.8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "0xBrandon/Decision-WAF-V1-0.8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xBrandon/Decision-WAF-V1-0.8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "0xBrandon/Decision-WAF-V1-0.8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xBrandon/Decision-WAF-V1-0.8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use 0xBrandon/Decision-WAF-V1-0.8B with Docker Model Runner:
docker model run hf.co/0xBrandon/Decision-WAF-V1-0.8B
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.*+ thesystemonechat template); scored through the/v1/systemoneendpoint. - 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
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
- 27
