JACA369's picture
Update README.md
afeb483 verified
|
Raw History Blame Contribute Delete
3.15 kB
---
license: cc-by-nc-sa-4.0
language:
- en
base_model: fastino/gliner2.5-small-v1
pipeline_tag: text-classification
library_name: onnx
tags:
- onnx
- pii
- privacy
- sensitive-data
- browser
---
# Sensitivity Scanner v6 (browser build)
A small model (74M parameters, 143 MB fp16 ONNX) that flags English text containing sensitive personal information. Its purpose is classifying sensitive university files, such as documents in a university Google Drive, so that student records, medical details, ID numbers, financial details, credentials and HR matters can be audited. It's a fine-tuned GLiNER2.5-small (`fastino/gliner2.5-small-v1`), exported to ONNX so it runs entirely in the browser with ONNX Runtime Web.
It classifies a block of up to 100 words into one of 7 labels:
| Label | Meaning |
|---|---|
| `medical` | Health, medical, or mental-health details about a specific person |
| `student_records` | Grades, conduct, advising, accommodations, or other FERPA records about a named student |
| `id_numbers` | Social Security, passport, driver's license, visa, or other ID numbers |
| `financial` | Bank accounts, card numbers, salaries, income, or payroll for a specific person |
| `credentials` | Real passwords, API keys, private keys, or login secrets |
| `legal_hr` | Legal, HR, disciplinary, harassment, criminal, or immigration matters about a person |
| `none` | None of these: general, public, aggregate, fictional, redacted, or placeholder content |
A block's score is **1 − P(none)**, and a file is flagged at the first block scoring **0.5 or higher**. The model is meant to be used with pattern rules for structured secrets (SSNs, card numbers, API keys) that run first.
## Files
| File | What it is |
|---|---|
| `onnx/model_fp16.onnx` | The model (fp16). Gives the same decisions as the PyTorch checkpoint on every test block. |
| `tokenizer.json`, `tokenizer_config.json`, `config.json` | Tokenizer and encoder config |
| `scanner_spec.json` | The label prompt as token IDs, label order, threshold and block size. The browser appends a block's tokens after the prompt. |
## Results
On 647 English test files with the full pipeline (rules + model):
- **Missed:** 0 of 309 high-sensitivity files
- **False alarms:** 40 of 317 harmless files
- **Speed:** about 0.06 s per file on a laptop CPU
## Training data
8,983 labeled blocks: synthetic templates (fictional schools and people), plus public datasets: Nemotron-PII, Gretel synthetic PII finance, MTSamples, Asclepius synthetic clinical notes, Wikipedia, AG News and legal-contract sections. No real personal data about real people was used for the sensitive examples.
## License
**CC BY-NC-SA 4.0, non-commercial use only.** The training data includes 300 blocks from Asclepius (`starmpcc/Asclepius-Synthetic-Clinical-Notes`), which is licensed CC BY-NC-SA 4.0. Check the base model's license (`fastino/gliner2.5-small-v1`) before any other use.
## Limitations
- English only.
- Tuned for recall: about 1 in 8 harmless files is flagged.
- Some test sets were used while writing the pattern rules, so real-world results may be lower than the numbers above.