Org card: one Fortress section for both models
Browse files19 unmodified lines202122232425262728293031323334353637383940414243444546474849505119 unmodified linesfirewall for LLM apps.</p>### 🏰 Fortress-XS: prompt-injection and harmful-request detection on a CPU| Fortress-XS v1 | ||---|---|| **Model** | [gantrly/fortress-xs](https://huggingface.co/gantrly/fortress-xs): 81 MB INT8 ONNX, two outputs (attack, harmful), Apache-2.0 || **Try it** | [Demo](https://huggingface.co/spaces/gantrly/fortress-xs): the model runs in your browser, so your text never leaves the page || **Speed** | 36 ms at 128 tokens, 183 ms at 512 on 4 CPU threads; no GPU, no torch || **Held-out results** | 72% of attacks caught on average over the 8 test families no compared detector trained on, at 1% false positives, against 43% for PIGuard and 32% for ProtectAI v2 || **Use it** | `pip install "mobiusguard[onnx]"`, then `classifier = "fortress-xs"` |<p align="center"><img src="https://huggingface.co/gantrly/fortress-xs/resolve/main/assets/fortress-speed.svg" alt="Fortress-XS: 72% average recall on the 8 held-out attack families none of them trained on, at 1% false positives, 183 ms on a CPU; PIGuard 43% and ProtectAI v2 32% at 1,151 ms" width="680"></p>### 🏯 Fortress-Base: for documents, email and developer traffic| Fortress-Base v1 | ||---|---|| **Model** | [gantrly/fortress-base](https://huggingface.co/gantrly/fortress-base): DeBERTa-v3-base, 308 MB INT8 ONNX, two outputs (attack, harmful), Apache-2.0 || **Held-out results** | The most injections caught inside emails (68.5% of LLMail-Inject) and documents (70.5% of BIPIA) among the detectors compared that did not train on them (Fortress-XS, PIGuard, ProtectAI v2, Horizon-Labs guard-base, keyword rules), at 1% false positives; 6.0% of real developer messages and at most 3.4% of harmless disguised text blocked || **Speed** | 104 ms at 128 tokens, 525 ms at 512 on 4 CPU threads: 2.9× Fortress-XS, faster than the other base-size detectors || **Roles** | Reads each text with its role, user or tool result; each role has its own threshold || **Use it** | Mobius Guard 0.3 or later: `classifier = "fortress-base"` |<p align="center"><img src="https://huggingface.co/gantrly/fortress-base/resolve/main/assets/fortress-base-speed.svg" alt="Fortress-Base: 78.1% average recall on the 7 held-out attack families none of the six detectors trained on, at 1% false positives, 525 ms on a CPU; Fortress-XS 80.2% at 183 ms, Horizon guard-base 70.0% at 914 ms, PIGuard 45.1% and ProtectAI v2 36.4% at 1,151 ms" width="680"></p>### How we publish19 unmodified lines2021222324252627282930313233343536373839404142434419 unmodified linesfirewall for LLM apps.</p>### 🏰 Fortress: prompt-injection and harmful-request detection on a CPU| | [Fortress-XS](https://huggingface.co/gantrly/fortress-xs) | [Fortress-Base](https://huggingface.co/gantrly/fortress-base) ||---|---|---|| **For** | The default: fast, chat traffic | Documents, email, tool output and developer traffic (opt-in) || **Model** | DeBERTa-v3-xsmall, 81 MB INT8 ONNX | DeBERTa-v3-base, 308 MB INT8 ONNX; reads each text with its role || **CPU, 4 threads, 128 / 512 tokens** | 36 / 183 ms | 104 / 525 ms || **Attacks caught, average of 7 held-out families none of the compared detectors trained on** | 80.2% | 78.1% || **Injections caught inside emails / documents** | 47.4% / 12.9% | **68.5% / 70.5%** || **Harmless developer messages / disguised text blocked** | 10.6% / 46.7% | **6.0% / 2.8%** || **Try it** | [Demo](https://huggingface.co/spaces/gantrly/fortress-xs): runs in your browser | – || **Use it** | `pip install "mobiusguard[onnx]"`, then `classifier = "fortress-xs"` | Mobius Guard 0.3 or later: `classifier = "fortress-base"` |Both have two outputs (attack, harmful), are Apache-2.0 and need no GPU or torch. On thesame held-out data at 1% false positives, the compared detectors average: Horizon-Labsguard-base 70.0%, PIGuard 45.1%, ProtectAI v2 36.4% and keyword rules 16.6%.<p align="center"><img src="https://huggingface.co/gantrly/fortress-base/resolve/main/assets/fortress-base-speed.svg" alt="Average recall on the 7 held-out attack families none of the six detectors trained on, at 1% false positives, against CPU latency: Fortress-XS 80.2% at 183 ms, Fortress-Base 78.1% at 525 ms, Horizon guard-base 70.0% at 914 ms, PIGuard 45.1% and ProtectAI v2 36.4% at 1,151 ms, keyword rules 16.6%" width="680"></p>### How we publish
README.md+15-22