temsa/OpenMed-PPSN-v5
OpenMed PPSN v5
Token classification model derived from OpenMed/OpenMed-PII-SuperClinical-Large-434M-v1 with added B-PPSN / I-PPSN support for Irish PPS Number detection.
What this release contains
- Full model weights (
model.safetensors) with original OpenMed labels + PPSN labels. label_meta.jsonwith label mapping and provenance.- Repro/eval artifacts:
irish_ppsn_regression_v5.jsonleval_manual_irish_v5_raw.jsoneval_hybrid_v5_no_plausible.jsonab_non_ppsn_v5_baseline.json
Key results
On irish_ppsn_regression_v5:
- Raw model-only PPSN performance:
P=0.7778 R=0.8750 F1=0.8235. - Recommended strict hybrid mode (model + checksum + span normalization, no plausible fallback):
P=1.0000 R=1.0000 F1=1.0000.
Non-PPSN retention check vs base OpenMed (A/B):
- Real-text behavior agreement F1:
1.0000. - Entity density unchanged in the sampled real-text proxy set.
Recommended production usage
For best PPSN reliability, run this model with a strict hybrid post-processor:
- Keep model detections for all labels.
- For PPSN specifically, normalize/expand spans to full PPSN candidates.
- Validate PPSN with checksum.
- Disable broad "plausible" fallback in production (
no-plausible-ppsn).
This repository includes only the model artifacts; hybrid scripts are in the companion codebase used to train/evaluate this release.
For a quick local smoke test of the packaged checkpoint, use the bundled word_aligned helper:
python3 inference_word_aligned.py \
--ppsn-min-score 0.4 \
--text "My PPSN is 1234567TW and I need help with my housing grant." \
--jsonInstall dependencies from pyproject.toml first if you are not already in an environment with transformers, torch, and regex.
Limitations
- The Irish regression set is small and targeted; additional domain-specific validation is required before regulated deployment.
- PPSN detection in noisy OCR/ASR or heavily malformed text may require extra hardening.
License and attribution
- This derivative release is distributed under Apache-2.0, consistent with the base model license tag.
- Base model:
OpenMed/OpenMed-PII-SuperClinical-Large-434M-v1. - Training/evaluation used synthetic and augmented data sources, including
nvidia/Nemotron-PIIandjoelniklaus/mapa. - See
NOTICEfor attribution details.
QA quick check
- Load this model as a standard
AutoModelForTokenClassificationcheckpoint. - Run against
irish_ppsn_regression_v5.jsonl. - Confirm results in
eval_manual_irish_v5_raw.json(raw) andeval_hybrid_v5_no_plausible.json(strict hybrid).
<!-- portfolio-comparison:start -->
Portfolio Comparison
Updated: 2026-03-16.
Use this section for the fastest public comparison across the temsa PII masking portfolio.
- The first core table only includes public checkpoints that ship both comparable q8 accuracy and q8 CPU throughput.
- The first PPSN table only includes public artifacts that ship comparable PPSN accuracy and CPU throughput.
- Missing cells in the archive tables mean the older release did not ship that metric in its public bundle.
- DiffMask rows use the reconciled
clean_single_passharness that matches the deployed runtime. - GlobalPointer rows use the public raw-only span-matrix release bundle and its packaged q8 ONNX artifact.
- The same content is shipped as
PORTFOLIO_COMPARISON.mdinside each public model repo.
Irish Core PII: Comparable Public Checkpoints
Irish Core PII: Other Public Checkpoints
Finance-boundary q8 F1 is 1.0000 for OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc6, OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc7, OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8, and all public IrishCore-DiffMask releases from rc1 to rc6. OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc5 ships 0.8750 on that public q8 suite.
PPSN-Only: Comparable Public Artifacts
PPSN-Only: Historical Public Checkpoints
If you need the strongest current raw-only Irish core model, start with IrishCore-GlobalPointer-135M-v1-rc4. If you need the fastest CPU-first raw-only line, compare it against IrishCore-DiffMask-135M-v1-rc6. If you need a PPSN-only artifact, compare the canonical fp32, fp16, and q8 variants of OpenMed-mLiteClinical-IrishPPSN-135M-v1 directly in the table above. <!-- portfolio-comparison:end -->
