kiji-pii-model-onnx
1
license:apache-2.0
by
DataikuNLP
Other
OTHER
New
0 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
Usagepythontransformers
import numpy as np
from onnxruntime import InferenceSession
from transformers import AutoTokenizer
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("DataikuNLP/kiji-pii-model-onnx")
session = InferenceSession("DataikuNLP/kiji-pii-model-onnx/model_quantized.onnx") # or local path
# Tokenize
text = "Contact John Smith at [email protected] or call +1-555-123-4567."
inputs = tokenizer(text, return_tensors="np", truncation=True, max_length=512)
# Run inference
outputs = session.run(None, dict(inputs))
pii_logits, coref_logits = outputs # (1, seq_len, 53), (1, seq_len, 7)
# Decode PII predictions
pii_predictions = np.argmax(pii_logits, axis=-1)[0]
# See label_mappings.json for label ID -> label name mappingDeploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.