Blackbar is a small English token classifier that finds personal data in text in one forward pass: thirteen classes, from names and account numbers to medications and court case numbers. It runs on a CPU from a 210 MB int8 ONNX graph, at about 1,400 words a second on 8 cores.
Monotonic Labs built it to replace two larger models in its own document scrubber (OpenAI's privacy-filter and a GLiNER model, 2.3 GB together) with one that is about 2.9 times as fast and makes about a quarter of the false positives.
| Base model | answerdotai/ModernBERT-base (Apache-2.0), 22 layers |
| Parameters | 149 million, with a linear head of 53 labels |
| Labels | BIOES over 13 classes |
| Context | Any length: read in windows of 1,500 tokens that overlap by 128 |
| Language | English |
| Version | v1. Inside Monotonic Labs this model is called r3 |
| Files | onnx/model_quantized.onnx (int8, 210 MB), tokenizer.json, tagger.json, config.json |
| Group | Classes |
|---|---|
| General | person, email, phone, address, date, url, account, secret |
| Medical | medication, condition, procedure |
| Legal | case_number, party |
A payment card or a government ID is tagged account. An IP address is tagged url. A password, an API key or a token is tagged secret. The model always emits all thirteen: drop the groups you do not want.
Download this repository, install the three libraries in requirements.txt (numpy, onnxruntime, tokenizers), and run the example from its folder:
hf download monotonic-labs/blackbar-pii-base-en --local-dir blackbar
cd blackbar
pip install -r requirements.txt
python example.py
It does not need PyTorch or transformers. The code that runs the model is the small monotonic_pii/ folder beside it, about 1,000 lines of plain Python you can read first; nothing is loaded with trust_remote_code.
from pathlib import Path
from monotonic_pii.detect import load_onnx
tagger = load_onnx(Path("."), threads=8) # the folder that holds this repository's files
text = (
"Dr. Elena Marsh saw Tomas Reyes on March 3, 2025 for type 2 diabetes and renewed his metformin. "
"Reach him at 206-555-0142 or tomas.reyes@example.com. "
"His claim is filed as Reyes v. Northgate Mutual, case no. 24-CV-01877."
)
for span in tagger.detect(text):
print(span.start, span.end, span.category.value, round(span.confidence, 3), text[span.start : span.end])
4 15 person 0.97 Elena Marsh
20 31 person 0.969 Tomas Reyes
35 48 date 0.77 March 3, 2025
53 68 condition 0.862 type 2 diabetes
85 94 medication 0.99 metformin
109 121 phone 0.997 206-555-0142
125 148 email 0.986 tomas.reyes@example.com
172 177 person 0.797 Reyes
181 197 party 0.944 Northgate Mutual
208 219 case_number 0.998 24-CV-01877
Offsets are character offsets into the text. A span's confidence is the probability of its least sure token.
The graph alone is not the model. Three steps around it produce the numbers on this card, and monotonic_pii.detect does all three:
tagger.json.The graph takes a window's tokens without special tokens (input_ids, attention_mask); [CLS] and [SEP] are added inside it.
Span-level precision, recall and F1, the model alone with no rules around it. "Exact" asks for the same class and the same start and end. "Overlap" asks for the same class and any shared character.
| Corpus | What it is | Exact F1 | Overlap F1 |
|---|---|---|---|
| PII-TRACE | 500 synthetic conversations, 2,442 spans. No part of it was trained on | 0.915 | 0.940 |
| TAB, test split | 127 real court judgments, 1,063 names. Names only | not comparable | 0.957 |
| Nemotron-PII, test split | 6,208 documents, 21,538 spans. Its train split was trained on | 0.987 | 0.993 |
TAB's labels include a title ("Mr", "Dr") in 843 of its 1,063 names and this model leaves titles out, so only the overlap reading means anything there.
Per class on PII-TRACE:
| Class | Spans | Exact precision | Exact recall | Exact F1 | Overlap F1 |
|---|---|---|---|---|---|
email |
392 | 1.000 | 1.000 | 1.000 | 1.000 |
address |
222 | 0.996 | 1.000 | 0.998 | 0.998 |
date |
221 | 1.000 | 0.986 | 0.993 | 0.993 |
person |
748 | 0.909 | 0.973 | 0.940 | 0.975 |
phone |
218 | 0.940 | 0.940 | 0.940 | 1.000 |
url |
207 | 0.898 | 0.855 | 0.876 | 0.970 |
secret |
210 | 1.000 | 0.776 | 0.874 | 0.874 |
account |
224 | 0.648 | 0.362 | 0.464 | 0.476 |
Each model alone on the same documents, each model's own labels folded into this model's classes by one published table. Measured by Monotonic Labs on 2026-11-11, not taken from the other models' cards.
| Model | Parameters | PII-TRACE: exact / overlap | TAB: overlap | Nemotron-PII: exact / overlap |
|---|---|---|---|---|
| Blackbar (this model) | 150M | 0.915 / 0.940 | 0.957 | 0.987 / 0.993 |
perplexity-ai/PII-Tracer |
600M | 0.908 / 0.940 | 0.840 | 0.937 / 0.956 |
nvidia/gliner-PII |
570M | 0.789 / 0.812 | 0.958 | 0.928 / 0.932 |
openai/privacy-filter |
1.4B | 0.833 / 0.862 | 0.811 | 0.881 / 0.915 |
OpenMed/privacy-filter-nemotron |
1.4B | 0.476 / 0.852 | 0.918 | 0.958 / 0.983 |
kalyan-ks/ettin-68m-nemotron-pii |
68M | 0.409 / 0.829 | 0.908 | 0.950 / 0.987 |
What to hold against this table:
No outside benchmark carries these classes with this model's boundaries, so these are thinner evidence.
Measured on 8 CPU cores of a desktop machine, int8, ONNX Runtime 1.31, end to end from text to spans.
| This model | privacy-filter and GLiNER together | |
|---|---|---|
| Words a second | 1,398 | 481 |
| Files | 210 MB | 2.3 GB |
| Peak memory | 420 to 890 MiB | 3,635 MiB |
85,137 examples. All of it is synthetic or openly licensed. No customer data and no private data of any person was used.
| Source | Examples | License |
|---|---|---|
| Monotonic's synthetic corpus: documents written by a local Qwen3-4B, with made-up values planted by code so the labels are exact | 36,926 | Monotonic Labs |
| An earlier synthetic corpus of Monotonic's | 2,000 | Monotonic Labs |
nvidia/Nemotron-PII, train split |
30,000 | CC-BY-4.0 |
gretelai/gretel-pii-masking-en-v1 |
10,000 | Apache-2.0 |
mamahealth/mama-deid-dataset, English rows |
5,971 | CC-BY-4.0 |
E3-JSI/synthetic-multi-med-notes-ner-v1, English |
240 | MIT |
Where a public set does not label a class this model has (Nemotron-PII labels no medications or case numbers, for one), its unlabeled tokens are trained with a partial-label loss: they may be background or one of the classes that set cannot mark, and are not taught to be background.
Recipe. Every weight trained. AdamW, 5e-5 on the encoder and 1e-3 on the head, 24,576 padded tokens a step, two passes over the data (3,800 steps), windows of 1,024 tokens, seed 0. 52 minutes on one RTX 4080. Calibrated afterwards on held-out synthetic documents.
Finding personal data in English documents so that a person or a system can review, mask or remove it. It is one layer of a scrubber, not a guarantee: it misses values, and nothing it reads should be treated as clean without review. It is not a compliance tool on its own, and it is not for identifying or profiling people.
This model is fine-tuned from ModernBERT-base (Answer.AI and LightOn, Apache-2.0).
Its training data includes Nemotron-PII (NVIDIA, CC-BY-4.0) and mama-deid (mama health, CC-BY-4.0), each adapted by folding its labels into this model's classes; the Gretel PII masking dataset (Gretel, Apache-2.0); and the synthetic multilingual medical notes of E3-JSI (MIT).
Evaluated on PII-TRACE (Perplexity, MIT) and the Text Anonymization Benchmark (Pilán et al., MIT), neither of which was trained on.
Built by Monotonic Labs LLC.
onnx/model.onnx 598 MBonnx/model_quantized.onnx 210 MBanswerdotai/ModernBERT-base