nvidia/Nemotron-PII
Viewer • Updated • 200k • 9.07k • 175
How to use HMC83/name-detector-32m-cells with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="HMC83/name-detector-32m-cells") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("HMC83/name-detector-32m-cells")
model = AutoModelForTokenClassification.from_pretrained("HMC83/name-detector-32m-cells", device_map="auto")A 32M-parameter token classifier (O / PERSON) for detecting people's names in English documents and spreadsheet cells. Fine-tuned from jhu-clsp/ettin-encoder-32m (10 layers × 384, ModernBERT architecture) for CPU inference, with additional spreadsheet-cell training examples (company/organisation names and synthetic people in tabular cell formats) to reduce false positives on non-personal spreadsheet cells.
model.safetensors (PyTorch / Transformers) and model.onnx (FP32 ONNX, ~128 MB)0: O, 1: PERSONnamecfg.json): window=510, overlap=128, tau=0.2LICENSE and ATTRIBUTION.md)code/runtime.py, no PyTorch)
import sys
from huggingface_hub import snapshot_download
path = snapshot_download("HMC83/name-detector-32m-cells")
sys.path.insert(0, path + "/code")
import runtime
detector = runtime.Detector(path)
text = "Dear Ms Okonjo,\n\nSam Hill has checked the figures.\n\nPriya Raman"
for f in detector.findings(text):
print(text[f["start"]:f["end"]], f["score"])
transformers
from transformers import pipeline
tagger = pipeline(
"token-classification",
model="HMC83/name-detector-32m-cells",
aggregation_strategy="simple",
)
tagger("Sam Hill has checked the figures with Priya.")
Base model
jhu-clsp/ettin-encoder-32m