temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8
OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8
Raw-only Irish core PII release derived from OpenMed/OpenMed-PII-mLiteClinical-Base-135M-v1.
This repo does not require the scanner / validator layer used by temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc7. Both the full checkpoint and the ONNX q8 artifact use the same learned score-only decoder over token-presence and typed boundary heads.
Coverage
PPSNACCOUNT_NUMBERBANK_ROUTING_NUMBERCREDIT_DEBIT_CARDPASSPORT_NUMBERPOSTCODEPHONE_NUMBEREMAILFIRST_NAMELAST_NAMESWIFT_BIC
Included Variants
- Full
transformerscheckpoint in the repo root - Unquantized ONNX export in
onnx/model.onnx - Dynamic q8 ONNX artifact in
onnx/model_quantized.onnx inference_mask.pyfor the full checkpointinference_mask_onnx.pyfor the ONNX q8 artifactcommon.py,model.py, andmultitask_model.pyimplementing the raw-only decoder- benchmark files in
eval/
Artifact sizes:
- Full checkpoint:
515 MB(model.safetensors) - Dynamic q8 ONNX:
393 MB(onnx/model_quantized.onnx)
What Changed From rc7
rc7 achieves its public quality with a bundled scanner / validator inference stack.
rc8 removes that layer completely:
- no regex-based candidate extraction
- no checksum validator dependency at inference time
- no separate scanner spec or generated scanner code
- same compact
mLiteClinicalencoder family, but with a raw-only multi-head decoder
The tradeoff is explicit:
rc7is still stronger on the broad manual Irish core suiterc8is easier to embed, simpler to maintain, and its ONNX q8 path stays very close to the full checkpoint
Architecture
rc8 keeps the DistilBERT-size encoder class of the 135M mLiteClinical base and adds:
- a token-presence head for each released label
- a typed start-boundary head
- a typed end-boundary head
- a score-only decoder that uses model scores, token offsets, continuity priors, and minimum-length priors from config
There is no scanner or external validator in the release path.
Design references that informed this direction:
- Split-NER: https://aclanthology.org/2023.acl-short.36/
- SpanNER: https://aclanthology.org/2021.acl-long.558/
- Boundary Smoothing for Named Entity Recognition: https://aclanthology.org/2022.acl-long.490/
- TinyBERT: https://aclanthology.org/2020.findings-emnlp.372/
How To Use It
Full checkpoint:
uv run python inference_mask.py \
--model temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8 \
--min-score 0.5 \
--text "My PPSN is 1234567TW, my Eircode is D02 X285, and my phone is 087 123 4567." \
--jsonDynamic q8 ONNX:
uv run python inference_mask_onnx.py \
--model temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8 \
--min-score 0.5 \
--text "Please provide your passport NN5123456 and call me on 0851234567." \
--jsonBenchmarks
Main comparison:
Irish core label breakdown:
Dynamic q8 Artifact
Artifact paths:
- unquantized:
onnx/model.onnx - preprocessed:
onnx/model.preprocessed.onnx - quantized:
onnx/model_quantized.onnx
Quantization recipe used here:
- ONNX pre-processing before quantization
- ONNX Runtime dynamic int8
qint8per_channel=trueop_types=MatMul,Gemm,Attention
For CPU deployment, the ONNX q8 artifact is the recommended default.
Limits
rc8is raw-only. It intentionally gives up the scanner/validator stack used byrc7, so its broad manual-suite ceiling is lower.- The current remaining local misses are a bare 8-digit account-number case and one Gaelic phone-number case in the manual core suite.
- If you need the exact
rc8behavior, use the bundled inference scripts or importdecode_token_presence_segmentsfromcommon.py.
License And Attribution
- Release license: Apache-2.0
- Base model:
OpenMed/OpenMed-PII-mLiteClinical-Base-135M-v1 - See
NOTICEandtraining_sources.jsonfor attribution and training details.
<!-- 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 -->
