ONNX Model Zoo

Roblox/roblox-pii-classifier

By Roblox · ↓ 459 · ♥ 27 · Updated 2026-03-06

What's in this repo

This page lists the files in Roblox/roblox-pii-classifier, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 12 files, including 4 .json, 1 .md, 1 .py, 1 .safetensors, 1 .onnx, 1 .onnx_data
  • Repository size ~4.2 GB
  • Last updated 2026-03-06

ONNX files

File Size Download
onnx/model.onnx 478 KB Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Roblox PII Classifier

We present Roblox/roblox-pii-classifier, a PII detection classification model that can be used for identifying attempts to share or solicit personally identifiable information in text. The model has been fine-tuned on the XLM-RoBERTa-Large architecture for multilingual support. All the model training has been conducted with Roblox anonymized internal text datasets labeled by experts and AI generated conversations. The specifcs of AI synthetic data generation can be found in the Tech Blog Post.

The model classifies text into two PII-related categories in a multi-label fashion. The class labels are as follows: privacy_asking_for_pii and privacy_giving_pii.

  • PRIVACY_ASKING_FOR_PII: Attempting to obtain personal identifying information (PII) through direct questions or insinuation.
  • PRIVACY_GIVING_PII: Sharing or threatening to share someone's personal identifying information (PII), including but not limited to telephone numbers, email addresses, government ID numbers, social media handles, and account passwords/credentials. This category also includes attempts to direct a user off-platform to an external platform or real-world location (DUOP).

The classifier expects text input with a maximum sequence length of 512 tokens. The outputs are uncalibrated scores. The recommended cutoff for pii detection is when the sum of both categories max(privacy_asking_for_pii, privacy_giving_pii) >= 0.2691, which achives the optimal F1 score on Roblox English anonymized chat. For per-category cutoffs we recommend privacy_asking_for_pii >= 0.2 and privacy_giving_pii >= 0.3.

The table below displays evaluation metrics on internal held-out datasets and comparisons with other state-of-the-art models.

Model F1 Score (Kaggle PII dataset) F1 Score (Roblox Annonymized English Chat) F1 Score (Roblox Annonymized All Languages Chat)
PII Classifier v1.1 45.48% 94.34% 83.10%
LlamaGuard v3 1B 5.90% 3.17% 20.88%
LlamaGuard v3 8B 5.46% 27.73% 0.03%
LlamaGuard v4 12B 3.72% 26.55% 0.08%
NemoGuard 8B 3.26% 26.29% No multilingual support
Piiranha NER 33.20% 13.88% 9.11%

It is worth noting that the model is specifically designed to understand context and detect adversarial patterns where users attempt to bypass filters through creative spelling, character substitution, or implicit references. It focus on conversational context of asking/sharing PII rather than traditional focus on named-entity recognition, and is especially good at detecting subtle attempts to solicit or share PII even when explicit personal information is not present in the text. More technical details can be found in the Tech Blog Post.

Usage

The dependencies for the inference file can be installed as follows:

pip install -r requirements.txt

The provided Python file demonstrates how to use the classifier with text input. To run the inference, please run the following command:

python inference.py --input_file <your text file path> --model_path <path to Huggingface model>

If model_path isn't specified, the model will be loaded directly from HuggingFace.

Model info

text-classification transformers
transformers onnx safetensors xlm-roberta text-classification privacy pii-detection multilingual arxiv:1911.02116 base_model:FacebookAI/xlm-roberta-large base_model:quantized:FacebookAI/xlm-roberta-large license:apache-2.0
↓ 459 ♥ 27

Created: 2025-10-27

Updated: 2026-03-06

View on Hugging Face

Files (12)

.gitattributes
README.md
config.json
inference.py
model.safetensors
onnx/model.onnx 478 KB ONNX
onnx/model.onnx_data
requirements.txt
sentencepiece.bpe.model
special_tokens_map.json
tokenizer.json
tokenizer_config.json

Related models