Downloads Β· 30 days
13
25% of all-time downloads
innovius/shinrai-pii-m-v1.2
shinrai-pii-m-v1.2 is a token classification model from innovius. Use it when you need labels on individual words, such as names. The card lists the license as apache-2.0.
<img src="https://huggingface.co/spaces/innovius/README/resolve/main/shinrai-logo.png" width="104" alt="ShinrAI β shield logo" align="right"
Downloads Β· 30 days
13
25% of all-time downloads
All-time downloads
52
Public
Parameters
308M
3.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.onnx1.8 GB Β· 59%
From the Hugging Face model README
You use the AI. The AI does not use you.
Superseded by
shinrai-pii-m-v1.3and by ShinrAI 1.5 in the managed API at getshinrai.com for every language this model covers β 15 locales, 19 heads, format detection, Japanese back at flagship quality. v1.2 remains available as the archived western-six generation.
π License: v1.2 is and remains Apache 2.0 β the permanently open tier. The v1.3 flagship ships under the Innovius Open License v1.0 (free for government, education, research, and companies under $10M revenue; it converts to Apache 2.0 on 2028-09-01).
M-size ShinrAI encryption model β the detection layer of ShinrAI semantic encryption (ShinrAI, δΏ‘ι Ό, is Japanese for trust), and the western-six generation: German, English, Italian, French, Spanish and Polish, with a 1024-token window and inventories at Wikidata/OpenStreetMap scale.
Architecture: ModernBERT-family mmBERT-base encoder with a multi-head token classifier β
PERSON / CITY / STREET / ORG spans with frequency/size tiers and span attributes
(origin, gender expression, name part) for realm-preserving pseudonymization:
detected entities are swapped for natural alternatives matched to context, culture and
language (never [MASK] wreckage, never bias-triggering hard cuts), so downstream AI keeps
reasoning over natural text. Suited to mass de-identification (ePA / clinical,
high-security, banking) as well as realtime protection.
Developed by Innovius with the EECC Research Labs, trained on the JURECA supercomputer at the JΓΌlich Supercomputing Centre (Forschungszentrum JΓΌlich) under the WestAI compute grant, scaling onto JUPITER, Europe's first exascale system.
Given text in any of the six languages, the model emits entity spans with rich attributes:
entity class, a frequency/size tier (how common a name is, how large a city is), cultural
origin, gender expression and name-part structure. This is what enables realm-preserving
replacement: Robert β Paul β a substitute matching the original's cultural register,
frequency tier and gender expression, with no visible trace that anything was replaced and
minimal bias distortion for the consuming model.
| head | labels | tiers |
|---|---|---|
| PERSON | IOB2 Γ 3 tiers | common / uncommon / rare (name-frequency rank) |
| CITY | IOB2 Γ 3 tiers | major / medium / small (population bands) |
| STREET | IOB2 Γ 3 tiers | generic / specific / local (recognizability) |
| ORG | IOB2 Γ 3 tiers | international / national / regional |
Plus three span-pooled attribute heads computed in the same forward pass: origin
(42 classes, independent of text language β "Mailand" in German text is a CITY with origin
IT), gender expression (masc / fem / neutral / unknown; replacement never flips
mascβfem) and name part (given / family / full). The full machine-readable schema ships
in labels-v2.0.yaml.

ShinrAI models exist for the multi-dimensional, context-dependent part of the problem: knowing that Keller is a surname here and a basement there, that 8 avenue Victor Hugo is an address, how identifying each entity is, and what a culturally consistent replacement looks like. That is what statistical models are for.
Deterministic identifiers are not. IBANs, credit-card and account numbers, BTC/ETH wallet addresses, postal codes, phone numbers, e-mail addresses, tax and insurance IDs follow fixed formats, most with checksums β catch and replace them in an application layer in front of the model (validators, regex, lookup tables). Hunting fixed patterns with a 300M-parameter encoder is highly error-prone compared to a validator that is exact by construction, and a waste of resources β RAM footprint and response time β on something a rule decides in microseconds; anything the validator removes can never leak past it. Our own software layer does exactly that: the ShinrAI Connector ships it on your desktop, and the Secure AI Suite ([email protected]) brings it to your company β this model only ever owns what rules cannot decide.
Span F1 on surface-disjoint evaluation suites (never seen in training, disjoint surface forms), measured for this exact checkpoint. The suites draw on Wikidata/OSM-scale entity inventories β on these same suites the previous generation (v1.1) reads 33.6β49.3 macro. Register matters: these are business/medical register documents; on encyclopedic register (Wikipedia-class prose) the same checkpoint reads substantially lower (37.7β70.4 strict, measured 2026-08) β a known register deficit, addressed in v1.3:

| suite | PERSON | CITY | STREET | ORG | macro | tier acc |
|---|---|---|---|---|---|---|
| de | 91.6 | 92.6 | 92.3 | 92.4 | 92.2 | 68.5 |
| en | 97.2 | 93.8 | 95.9 | 90.5 | 94.3 | 58.7 |
| it | 95.5 | 92.0 | 94.9 | 88.4 | 92.7 | 49.7 |
| fr | 95.9 | 94.7 | 93.9 | 93.0 | 94.4 | 49.6 |
| es | 96.9 | 90.0 | 95.8 | 93.8 | 94.1 | 53.8 |
| pl | 93.8 | 81.9 | 91.4 | 89.9 | 89.2 | 56.7 |
Attribute accuracy on detected spans (these steer replacement selection):

| suite | origin | gender expression | name part |
|---|---|---|---|
| de | 92.4 | 88.1 | 98.7 |
| en | 87.5 | 84.6 | 95.1 |
| it | 95.0 | 85.6 | 97.2 |
| fr | 93.8 | 87.1 | 95.7 |
| es | 95.2 | 91.4 | 97.2 |
| pl | 94.8 | 84.9 | 94.6 |
name_part: full).shinrai-pii-m-v1.3
(ja register F1 98.1).Against public PII models. We benchmarked the strongest openly released PII models we could find on this model's serving suites β the OpenMed-PII family (clinical-domain de-identification, RoBERTa/DeBERTa-class encoders), taking the best in-language checkpoint per suite (SuperClinical-434M / SnowflakeMed-568M class). Identical scoring pipeline, span-level concept intersection over {PERSON, CITY, STREET, ORG}, measured 2026-08. Macro span F1:
| suite | best in-language OpenMed-PII | shinrai v1.2 |
|---|---|---|
| de | 35.7 | 92.2 |
| en | 70.6 | 94.3 |
| it | 28.0 | 92.7 |
| fr | 24.2 | 94.4 |
| es | 46.4 | 94.1 |
| pl | β (no PII model exists) | 89.2 |
Read it fairly, in both directions:
Against v1.1
(shinrai-pii-m-v1.1):
this model supersedes it for German and English β 92.2 / 94.3 macro where v1.1 reads
33.6β49.3 on these harder suites β adds Italian, French, Spanish and Polish, doubles the
window to 1024 tokens and fixes ORG generalization (88.4β93.8 vs 56.6β68.9; feature
details under "What's new"). Japanese: 83.8 macro on v1.1 against 60.8 here β both
superseded by v1.3's dedicated ja track (98.1 register F1).
This model family is trained to avoid machine biases β the documented, systematic
biases of LLMs β not to correct human bias in text. Large models measurably treat text
differently depending on name origin, gender association, name rarity, city size or
organization prestige. Naive anonymization changes those signals: [MASK] tokens,
<PII> tags and randomly chosen substitute names all shift how the consuming model
scores, ranks and reasons over a document β which makes results unstable and the
pseudonymization itself detectable.
The replacement policy is therefore bias-stable by construction:

The full ONNX ladder ships in quant/ (opset 17; export parity vs PyTorch: max logit
delta 2.8e-05 across all 7 output heads β quant/parity-onnx.json):
| suite | FP32 (1.23 GB) | Q8 (309 MB) | Ξ | Q4 (spot checksΒΉ) |
|---|---|---|---|---|
| de | 92.35 | 92.38 | +0.03 | 91.15 |
| en | 94.45 | 94.45 | Β±0.00 | β |
| it | 92.75 | 92.55 | β0.20 | β |
| fr | 94.18 | 94.07 | β0.10 | β |
| es | 94.05 | 94.20 | +0.15 | β |
| pl | 89.40 | 89.10 | β0.30 | 88.65 |
Q8 is the serving baseline for all six languages: within Β±0.33 macro-F1 of FP32 on every suite (several improve), 4Γ smaller, CPU-friendly.
ΒΉ Q4 was measured during release QA (0.75β2.1 macro points below FP32) but the artifact does not ship in this repo β v1.1's Q4 build is available today, and a v1.x point release carries the next ladder.
The repo is a self-contained HF-layout release:
model.safetensors # full-precision weights (custom multi-head architecture)
config.json # encoder configuration (ModernBERT / mmBERT-base)
tokenizer/ # HF tokenizer (256k vocab)
labels-v2.0.yaml # machine-readable label schema (heads, tiers, attributes)
calibration.json # per-head confidence temperatures
quant/ # ONNX ladder + MANIFEST.json + parity report
assets/ # model card figures
The heads are a custom multi-head architecture, so plain
AutoModelForTokenClassification does not expose them β use the ONNX graph (named
inputs/outputs, works with onnxruntime alone; β₯ 1.28 for the Q4 file), or the ShinrAI
inference SDK (sliding-window batching, IOB2 decoding, span merging, calibration β pip
package planned):
import onnxruntime as ort
from transformers import AutoTokenizer
repo = "innovius/shinrai-pii-m-v1.2" # local: path to a clone
tok = AutoTokenizer.from_pretrained(repo, subfolder="tokenizer")
sess = ort.InferenceSession("quant/model-q8.onnx")
enc = tok("Le dossier de Mme Claire Dubois, 8 avenue Victor Hugo, Lyon, est complet.",
return_tensors="np")
out = sess.run(None, {"input_ids": enc.input_ids, "attention_mask": enc.attention_mask})
# 7 named outputs:
# logits_person / logits_city / logits_street / logits_org [batch, seq, 7] (IOB2 Γ 3 tiers + O)
# attr_logits_origin [.., 42] Β· attr_logits_gender_expression [.., 4] Β· attr_logits_name_part [.., 3]
# label inventories for decoding: labels-v2.0.yaml
Decoded output (via the ShinrAI predictor, verified against this exact checkpoint) for
"Le dossier de Mme Claire Dubois, 8 avenue Victor Hugo, Lyon, est complet.":
{"span": [18, 31], "text": "Claire Dubois", "type": "PERSON", "tier": "common", "confidence": 0.941,
"attrs": {"origin": "FR", "gender_expression": "unknown", "name_part": "family"}}
{"span": [33, 53], "text": "8 avenue Victor Hugo", "type": "STREET", "tier": "generic", "confidence": 0.852,
"attrs": {"origin": "FR"}}
{"span": [55, 59], "text": "Lyon", "type": "CITY", "tier": "medium", "confidence": 0.848,
"attrs": {"origin": "FR"}}
and for "Bitte senden Sie den Bericht an Frau Dr. Anna Keller, Lindenweg 12, 04109 Leipzig.":
{"span": [41, 52], "text": "Anna Keller", "type": "PERSON", "tier": "common", "confidence": 0.959,
"attrs": {"origin": "DE", "gender_expression": "fem", "name_part": "full"}}
{"span": [54, 66], "text": "Lindenweg 12", "type": "STREET", "tier": "specific", "confidence": 0.770,
"attrs": {"origin": "DE"}}
{"span": [74, 81], "text": "Leipzig", "type": "CITY", "tier": "medium", "confidence": 0.989,
"attrs": {"origin": "DE"}}
Note what is not in the output: the postal code 04109. Deterministic identifiers are
your validation layer's job (see the pipeline section) β by design, not omission.
Inference is sliding-window (window 1024, stride 128, overlap merge) β documents of any
length work. Confidences are temperature-calibrated per head from calibration.json.
βοΈ As a developer or company β the ShinrAI API. ShinrAI 1.5, the current model, runs in the managed ShinrAI PII detection and pseudonymisation API, hosted on STACKIT in the EU. Start at getshinrai.com β see the ShinrAI plans and pricing and the API documentation.
π₯οΈ On your own machine β ShinrAI Connector. Our desktop client runs ShinrAI models locally on your own GPU β or CPU-only, thanks to the Q8 build β and funnels your AI traffic through semantic encryption before it leaves your machine. Works with Claude Desktop and Cursor today, the ChatGPT Desktop app soon. Get it at chtsafe.com/apps.

The Connector running the v1.1 sibling on a Mac β 0.12 GB in memory, CPU-only; this model slots in the same way, with the deterministic categories (banking and cards, crypto wallets, ID numbers, contact details) handled by the Connector's software layer, exactly as described above.
π As a private person β ChtSafe. Chat fully anonymously with any leading AI model, protected in realtime by the latest ShinrAI models (currently in review and training, publication to follow). Sign up at chtsafe.com or get the app from the App Store.
π’ As a company β the Secure AI Suite. Semantic encryption plus onion routing across as many model-access paths as you like, deployed on-premise first β your hardware, your keys β or in your private cloud. You get the complete software and code for review; we support the rollout on your infrastructure, or deliver custom GPU servers with 5-year support. Register your company at chtsafe.com or write to [email protected].
The training corpus is synthetic: generated, cross-checked and quality-gated by openly released models β for this generation primarily the Mistral, Gemma (Google DeepMind) and NVIDIA Nemotron families β and anchored in open data: GeoNames (CC-BY), Wikidata (CC0), OpenStreetMap (ODbL), US SSA/Census name statistics (public domain) and national open-data sources (INSEE, INE, PESEL, Italian and German municipal portals). No customer data, no scraped personal records, no proprietary APIs anywhere in the pipeline.
Provenance note: during v1.3 preparation we found and fixed a labeling defect in the v1.1-era generation pipeline (unlabeled person names in a subset of LLM-generated records). The v1.2 corpus was regenerated with the fixed pipeline and re-audited to 0.00% unlabeled person names across all six languages before this checkpoint trained.
Every record carries a license-provenance field; released datasets contain only the license-clean subset (CC0 / CC-BY / public-domain / our own generated text). Data releases: https://huggingface.co/innovius (as they land).
The model detects and helps pseudonymize personal data; it does not memorize real individuals β training text is synthetic. Detection is probabilistic: for regulated deployments, treat it as one layer of a defense-in-depth privacy architecture, not a sole control (and keep deterministic identifiers in your validation layer, per above). Attribute predictions (origin, gender expression) exist to preserve the statistical texture of text under replacement β never use them to profile real people.
EECC Research Labs Β· Forschungszentrum JΓΌlich (JSC, JURECA & JUPITER) Β· WestAI Β· mmBERT (JHU CLSP, MIT) Β· the ModernBERT lineage Β· Mistral Β· Gemma Β· NVIDIA Nemotron Β· GeoNames Β· Wikidata Β· OpenStreetMap Β· the statistics offices and open-data portals of the countries we cover.
@software{shinrai_pii_2026,
author = {Innovius AI and EECC Research Labs},
title = {ShinrAI PII Models: tier- and bias-aware PII detection for realm-preserving pseudonymization},
year = {2026},
version = {1.2},
url = {https://huggingface.co/innovius}
}