--- title: Rampart PII Redaction emoji: 🛡️ colorFrom: purple colorTo: indigo sdk: static app_file: index.html short_description: Client-side PII redaction in your browser --- # Rampart — Client-Side PII Redaction Demo A live demo of the [Rampart](https://huggingface.co/nationaldesignstudio/rampart) model — a 14.7 MB ONNX token-classification model that detects and redacts personally identifiable information (PII) before it leaves your device. ## What this demo does - **Live redaction** — type or paste text and watch PII get replaced with stable placeholders in real time - **17 entity types** — color-coded legend showing all detected PII classes - **7 languages** — English, Spanish, French, German, Italian, Portuguese, Dutch - **Chat simulation** — see how Rampart protects you before sending text to an AI assistant - **Placeholder mapping** — view the reversible placeholder ↔ real value table - **100% client-side** — the model runs in your browser via transformers.js / ONNX Runtime Web (WASM). No data is sent to any server. ## How it works The demo loads the `@nationaldesignstudio/rampart` npm package from jsdelivr CDN, which bundles transformers.js and the ONNX Runtime Web. The model weights are fetched from the Hugging Face Hub and cached in IndexedDB. All inference happens in the browser — no server compute required. ## Model details | Property | Value | |---|---| | Model | `nationaldesignstudio/rampart` | | Architecture | MiniLM-L6-H384 with 35-label BIO head (17 entity types) | | Size | 14.7 MB (4-bit quantized ONNX) | | Runtime | ONNX Runtime Web (WASM) | | Languages | English, Spanish, French, German, Italian, Portuguese, Dutch | | Recall | 98.42% private-term recall across all 7 languages | | Latency | ~4ms p50 (WebGPU), ~12ms p50 (WASM) | ## License CC BY 4.0 — National Design Studio