Command Palette

Search for a command to run...

NerGuard

A multilingual model that finds personal data in text, and asks an LLM only about the passages it's unsure of.

About

My master's thesis. Names, addresses and ID numbers turn up everywhere in text, and they have to come out before that text is shared or handed to a model. NerGuard finds them with a small, fast model, and when it isn't sure about a passage it asks a large language model about that passage alone, so most text never needs the expensive call.

The small model is mDeBERTa-v3, fine-tuned on 580,000 examples across eight languages. It measures its own doubt on every passage, as the entropy of its predictions, and only the doubtful ones travel to the LLM, which takes about half the calls. It finds personal data far more reliably than the common open tools, Presidio and GLiNER, answers in about 25 milliseconds on a GPU, and is open source, with the model on Hugging Face.

Stack

mDeBERTa-v3PyTorch DDPHugging Face