At a glance
| Model | phatvo/deberta_finetuned_pii-ONNX (ONNX build of lakshyakh93/deberta_finetuned_pii) |
|---|---|
| Task / pipeline | token-classification |
| Categories | 60 PII types, BIO-tagged (EMAIL, PHONE_NUMBER, CREDITCARDNUMBER, IBAN, BITCOINADDRESS, SSN, PASSWORD, IP, STREETADDRESS, FIRSTNAME/LASTNAME, DATE, โฆ) |
| Architecture | mDeBERTa-v3 base fine-tuned for PII NER |
| Quantization | q8 (8-bit) ONNX โ verified to match fp16/fp32 detection |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~143 MB, cached after first load |
| License | MIT (base model lakshyakh93/deberta_finetuned_pii) |
| Web APIs | WebAssembly, Web Workers โ all Baseline widely available |
Run it
Type or paste text. Personal data lights up a moment after you stop typing; hover a highlight for its category and confidence. Turn on Redact to mask it and copy the clean text.
See inside โ the per-token BIO tags
The model doesn't see "jordan.mitchell@gmail.com" as one thing โ it tags each sub-word token
independently: B-EMAIL (begin email), I-EMAIL (inside email), and so on.
We stitch consecutive B-/I- runs into whole values, map them back to the exact characters
in your text, and trim stray punctuation so a redaction masks the value โ never half of it. Below are
the raw tags straight from the model.
Use-case ladder
Basics ยท 60-Class BIO Token & Confidence Inspector
Inspect raw SentencePiece B-*/I-* subword tags, cursor-walk character offsets, merged span boundaries, live confidence threshold filtering, and all four redaction modes โ with Show the code synced to worker.js.
Practical ยท Batch Support Ticket & Log Scrubber with Reversible Vault
Scrub multi-record ticket queues or uploaded .txt/.log/.csv/.json files with per-group redaction policies, inspect the reversible pseudonym token vault, and export scrubbed records + formula-safe CSV/JSON audits.
Wild ยท Live Leak-O-Meter & Adversarial Obfuscation Stress Lab
Type into a live exposure-gauge scratchpad and probe five adversarial stress tests (spaced emails, packed adjacent numbers, JSON delimiter soup, synthetic honey-tokens) to see honestly where mDeBERTa-v3 catches leaks and where it fragments.
Multi-model ยท Privacy-Preserving Downstream AI Pipeline (PII โ DistilBERT SST-2)
Chain on-device PII redaction (~143 MB) with DistilBERT SST-2 sentiment classification (~67 MB) in isolated Web Workers, comparing raw vs scrubbed sentiment side-by-side to test whether zero-leak scrubbing preserves downstream predictions.
Why it matters
Detecting personal data on the device means you can scrub it before it ever leaves โ no server sees the raw text. That is exactly the property you want for redaction: the sensitive value never has to be transmitted to be found.
- Redact before you share โ mask names, emails, cards and addresses in a document or screenshot caption client-side.
- Clean prompts for LLMs โ strip PII out of text before pasting it into a chatbot or sending it to an API.
- Scrub logs & tickets โ remove emails, IPs and account numbers from support transcripts before they're stored or indexed.
- Pre-flight compliance โ flag where personal data appears so a human can review it, without shipping the data off-box.
It's a best-effort model, not a guarantee: categories can be approximate (a card number may read as
ACCOUNTNUMBER, an IBAN as MASKEDNUMBER), several numbers packed right next to
each other can get split or mislabelled, and no detector catches everything โ treat it as a
strong first pass, then have a human confirm before relying on the redaction.
How the API works
Token classification is one pipeline call:
import { pipeline } from "@huggingface/transformers";
const pii = await pipeline("token-classification", "phatvo/deberta_finetuned_pii-ONNX");
const out = await pii("email me at sam@acme.io");
// โ [{ entity: "B-EMAIL", word: "โsam", score: 0.99, index: 4 },
// { entity: "I-EMAIL", word: "@", score: 0.99, index: 5 }, โฆ ]
The pipeline returns one BIO-tagged row per sub-word token, but no character offsets. We map each
token back to its span in the original text (a cursor-walk), merge B-/I- runs into whole
values, and trim wrapping punctuation. It all runs in a Web Worker so typing stays smooth.