Instructions to use SovereignSystems-cc/sosa-pii-ner-th-v1.0.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use SovereignSystems-cc/sosa-pii-ner-th-v1.0.0 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("SovereignSystems-cc/sosa-pii-ner-th-v1.0.0") - Notebooks
- Google Colab
- Kaggle
sosa-pii-ner-th-v1.0.0
Regional PII named entity recognition model for Thai documents. Part of the SOSA DevOps Privacy Filter — a local-first, privacy-preserving AI runtime for developers. Weights are Apache 2.0. No cloud required.
🔗 Source code: SOSA DevOps on GitHub 🌐 Product: sovereignsystems.cc
Model summary
Fine-tuned from urchade/gliner_large-v2.1 on synthetic Thai PII data. Detects
Thai national IDs (เลขบัตรประชาชน), tax IDs, local phone numbers, and healthcare
reference numbers in Thai and Thai-English mixed documents.
Intended use: Local PII detection within the SOSA DevOps Privacy Filter sidecar. Text never leaves the user's machine.
Labels
| Label | Description | Format | Validator |
|---|---|---|---|
th_national_id |
Thai national ID (เลขบัตรประชาชน) | 13 digits, first digit 1–8 | Thai check digit (weighted sum mod 11) |
th_tax_id |
Thai tax identification number | 13 digits, first digit 0–8 | Length + prefix |
th_phone_local |
Thai local phone number | 9–10 digits, 06/08/09/02/etc. prefix | Prefix validation |
th_health_hrn |
Thai hospital reference number (HRN) | Alphanumeric, 8–24 chars | Format validation |
Global labels also carried (defence-in-depth):
email, phone_e164, credit_card, passport_generic, ipv4_public
Evaluation — v1.0.0 gate results
| Label | F1 | Gate |
|---|---|---|
th_national_id |
0.9735 | ≥ 0.85 ✅ |
th_tax_id |
0.9776 | ≥ 0.80 ✅ |
th_phone_local |
0.9814 | ≥ 0.85 ✅ |
First-run gate pass (T1). Training: D-TH-1 dataset, 10,000 steps, A40 GPU, 2026-05-28/29.
Limitations
- NID/TAX 13-digit collision: Both labels share 13-digit format. Context (DOPA/civil keywords vs Revenue Department/VAT keywords) disambiguates. Validated via AP-5 disambiguation pairs in training data.
- Context-gated: Bare values without surrounding context are unreliable.
- Language: Thai and Thai-English mixed text.
Training data
Synthetic Thai PII examples only. No real citizen or patient data used.
Integrity
pytorch_model.bin SHA-256:
ca6219615d8e6e6f4da39762add863334abc5374ac53eb39b5fa7093f33efbc9
License
Apache 2.0 — inherited from urchade/gliner_large-v2.1.
Fine-tuned by Sovereign Systems.
See LICENSE.
- Downloads last month
- -
Model tree for SovereignSystems-cc/sosa-pii-ner-th-v1.0.0
Base model
urchade/gliner_large-v2.1