Skip to main content
DataFog research preview · September 2026 We fine-tuned a 65.2-million-parameter DistilBERT model to detect seven categories of PII and packaged it for local inference in Rust. It returns typed spans for redaction, with no hosted model or Python runtime required during inference. The first evaluation covered detection accuracy, local runtime behavior, and the resources needed for fine-tuning.

Detection quality

The model detects first names, last names, email addresses, phone numbers, street addresses, customer IDs, and account numbers. On 90,018 held-out synthetic Nemotron-PII documents, containing 248,739 annotated entities: A prediction counts as correct when both its category and boundaries match the annotation. Separate partitions were used for checkpoint selection, confidence calibration, and threshold selection. The inference artifacts were frozen before test scoring. Results across all seven categories: For email and phone numbers, the model was compared with the legacy DataFog Python 4.8.1 regex engine. These were the two categories supported by that baseline within the seven-category evaluation: These results describe performance on this synthetic dataset. Structural validation removed malformed annotations, but semantic annotation errors remain. Generalization to real customer-support data has not yet been established. A separate set of seven hand-authored support fixtures recovered 14 of 18 entities. Those examples exposed failures that the aggregate score alone would not convey.

Local deployment

The model runs through a native Rust runtime and returns UTF-8 byte offsets into the original text. Long inputs are processed in overlapping windows. The deployment bundle is approximately 300 MB, including the inference runtime. On the development Mac, individual warm requests produced these measurements: These are preliminary observations at four input lengths. Repeated latency measurements and throughput testing are still needed. Confidence calibration and the acceptance threshold are experimental. Detection is limited to the seven listed categories.

Fine-tuning on a Mac

Fine-tuning completed in 2 hours 15 minutes on an Apple M5 Pro with 48 GB of unified memory. An existing pretrained DistilBERT encoder was used; the model was not pretrained from scratch. The run demonstrates that this fine-tuning workflow can be completed locally on a laptop. No comparison of training speed or inference performance against NVIDIA hardware was conducted.

Next

The frozen model will next be evaluated on a separate public PII dataset, followed by a reviewed support-ticket set. Missed entities, unnecessary redaction, and performance relative to regex will be measured across both. Repeated runtime measurements will be used to characterize median latency, tail latency, and throughput on explicitly documented hardware. Read the evaluation methodology and detailed results.