Instructions to use SovereignSystems-cc/sosa-pii-ner-no-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-no-v1.0.0 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("SovereignSystems-cc/sosa-pii-ner-no-v1.0.0") - Notebooks
- Google Colab
- Kaggle
sosa-pii-ner-no-v1.0.0
Regional PII named entity recognition model for Norwegian 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 (459M parameters, DeBERTa-v3-large
encoder) on synthetic Norwegian PII data. Detects fødselsnummer, kontonummer,
organisasjonsnummer, and local phone numbers in natural Norwegian and English
workplace text. Designed to complement a context-gated regex layer — not replace it.
Intended use: Local PII detection within the SOSA DevOps Privacy Filter sidecar. Text never leaves the user's machine. Not intended for cloud inference or batch processing of real patient/citizen data.
Labels
| Label | Description | Format | Validator |
|---|---|---|---|
no_national_id |
Norwegian fødselsnummer / personnummer | 11 digits DDMMYYNNNCC | Modulus-11 checksum |
no_bank_account |
Norwegian kontonummer | 11 digits XXXX.XX.XXXXX | MOD-11 checksum |
no_org_number |
Norwegian organisasjonsnummer | 9 digits | MOD-11 checksum |
no_phone_local |
Norwegian local phone (+47 prefix) | 8 digits | Prefix range validation |
Global labels also carried (defence-in-depth):
email, phone_e164, credit_card, passport_generic, ipv4_public
Evaluation — v1.0.0 gate results
Methodology: Dual-basis evaluation. no_national_id gated on test_no.jsonl
(150 gold NIDs all passing Modulus-11, 150 negatives — purpose-built to exclude
synthetic non-checksummed values present in the shared multi-region test set).
no_bank_account gated on the shared test set scoped to NO examples (270 examples).
Post-inference Modulus-11 filter active in both evals.
| Label | Test set | P | R | F1 | Gate |
|---|---|---|---|---|---|
no_national_id |
test_no.jsonl (150 gold, checksummed) | 1.000 | 0.807 | 0.893 | ≥ 0.85 ✅ |
no_bank_account |
test.jsonl NO-scoped (270 ex) | 0.818 | 0.982 | 0.893 | ≥ 0.80 ✅ |
Training: 12 runs. Best state T7 — D-NO-6 dataset (2,842 positives, 45% neg ratio), 10,000 steps, A40 GPU, 2026-05-29.
Production deployment notes
⚠️ Modulus-11 checksum validator must be co-deployed.
Without it, high-confidence FP on 11-digit reference numbers reach output.
Reference implementation: src-tauri/sidecar/validate_no_nid_checksum.py
in the SOSA DevOps source repo.
Limitations
- Recall gap on structured/CSV contexts (R=0.807): NIDs in
"field","value"format are underdetected. A format-regex + checksum layer covers this gap in production. Do not add structured-format training data — regression confirmed across multiple runs (T12). - NID/bank 11-digit collision: Model fires
no_bank_accounton NID-context spans. A bank MOD-11 post-filter mitigates this in production. - Context-gated: Bare values without surrounding context are unreliable. Use as recall-uplift on top of the regex layer, not standalone.
- Language: Norwegian Bokmål / Norwegian-English mixed documents.
Training data
Synthetic Norwegian PII examples only. No real citizen, patient, or employee data was used at any stage of training or evaluation. Negatives include realistic Norwegian workplace reference numbers (ansattnummer, ordrenummer, kundenummer) and multilingual adversarial strings.
Integrity
pytorch_model.bin SHA-256:
6bcde91df5b9301810a5e05988fbab91592f8570e5ebe125219c3bb4957f1836
License
Apache 2.0 — inherited from urchade/gliner_large-v2.1.
Fine-tuned by Sovereign Systems.
See LICENSE.
- Downloads last month
- 1
Model tree for SovereignSystems-cc/sosa-pii-ner-no-v1.0.0
Base model
urchade/gliner_large-v2.1