r/learnmachinelearning • u/PatronusProtect • 15d ago
What we learned choosing a threshold for our new text-moderation models
We released Tiger Guard, two mmBERT classifiers for English and German text moderation. I'm Dominik from Casdo Labs. One part of the release that might be useful here is how the same model changes with the decision threshold.
For the 308M model, our default UNSAFE threshold is 0.5. On a balanced 1,500-prompt development benchmark it catches 83.7% of unsafe prompts and flags 46 of 750 harmless ones.
At a threshold of 0.891 it flags only 5 of those harmless prompts, but recall drops to 63.6%. The model hasn't changed. We've changed the cost we're willing to pay in missed cases versus false alarms.
The 0.891 threshold corresponds to a 1% false-positive rate on our validation data. It does not mean you'll get 1% on every new dataset. Even the default threshold produces different false-positive rates across English, German and different types of text.
There's another evaluation lesson here: we removed benchmark texts from training, but looked at benchmark errors while improving the model. We therefore label that suite as a development result. The card reports separate held-out results and documents data overlap on additional public tests.
The 308M and 141M weights are Apache 2.0, with Transformers examples and ONNX exports.
We'll publish the full training and dataset pipeline in a follow-up release.
Tiger Guard, 308M: https://huggingface.co/patronus-studio/tiger-guard-content-moderation
Tiger Guard Small, 141M: https://huggingface.co/patronus-studio/tiger-guard-content-moderation-small
Happy to get feedback. If you use the examples for an experiment, comparing thresholds on your own validation split is a useful place to start.