DLP Classifier - ONNX Model

ONNX-optimized version for ~20ms CPU inference.

Model Details

  • Type: ONNX (Open Neural Network Exchange)
  • Base: deepset/gbert-base
  • Format: model.onnx (~1.49 MB)
  • Inference: ~535ms (CPU)

Files

  • model.onnx - ONNX model file
  • config.json - Model configuration
  • tokenizer.json - Tokenizer
  • tokenizer_config.json - Tokenizer config

Labels

  • customer_pii - Customer personal information
  • financial - Financial data
  • credentials - Passwords, API keys
  • internal_ip - Private IP addresses
  • safe - Safe/public content

Loading in Code

Python with ONNX Runtime

import onnxruntime as ort
from transformers import AutoTokenizer

# Load model and tokenizer
sess = ort.InferenceSession("model.onnx")
tokenizer = AutoTokenizer.from_pretrained(".")

# Prepare input
text = "Customer: John Doe"
tokens = tokenizer(text, return_tensors="np")

# Run inference
outputs = sess.run(None, dict(tokens))

Docker (Recommended)

docker run -it eckelj/dlp_model_enhanced:latest
curl -X POST http://localhost:8000/scan \
  -H "Content-Type: application/json" \
  -d '{"text": "text to scan"}'

Repository

License

MIT

Downloads last month
3
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support