CoolFace
Modelpublic

temsa/IrishCore-GlobalPointer-135M-v1-rc4

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes22downloads
Model Card

IrishCore-GlobalPointer-135M-v1-rc4

IrishCore-GlobalPointer-135M-v1-rc4 is a raw-only Irish PII masking model derived from OpenMed/OpenMed-PII-mLiteClinical-Base-135M-v1.

It targets explicit masking with placeholders such as [PII:PPSN], [PII:EMAIL], and [PII:POSTCODE] for:

  • —PPSN
  • —ACCOUNT_NUMBER
  • —BANK_ROUTING_NUMBER
  • —CREDIT_DEBIT_CARD
  • —PASSPORT_NUMBER
  • —POSTCODE
  • —PHONE_NUMBER
  • —EMAIL
  • —FIRST_NAME
  • —LAST_NAME
  • —SWIFT_BIC

The main target is English plus Irish Gaelic text in citizen-support, public-sector, and HSE-style flows. The repo ships both the full transformers checkpoint and a dynamic q8 ONNX artifact for CPU deployment.

What This Model Is

This release is a compact span-matrix extractor built on top of the OpenMed mLiteClinical encoder.

Short version:

  • —Base OpenMed: plain BIO token classification
  • —DiffMask: token-span extraction with per-token presence plus boundary heads
  • —GlobalPointer: direct typed span scoring over the token grid

This release is fully raw-only:

  • —no external regex scanner layer
  • —no external checksum validator layer
  • —only a bundled lightweight span-repair stage inside common.py

The published behavior is fully defined by the weights plus the bundled decode/repair logic in common.py.

Architecture

  • —Encoder: DistilBERT-size encoder from OpenMed/OpenMed-PII-mLiteClinical-Base-135M-v1
  • —Span head: GlobalPointer-style typed span matrix
  • —Positional encoding inside the span head: RoPE
  • —Training objective: positive-weighted BCE with hard-negative mining over valid upper-triangular spans
  • —Runtime: one forward pass plus span decoding, with lightweight context-aware repairs for a few boundary-sensitive labels

Unlike the DiffMask line, this release does not use diffusion-style training. It directly predicts whether each (start_token, end_token) pair is an entity span for each released label.

Why This Line Exists

The main reason for this architecture change was to improve the cases where earlier raw-only lines were fragile:

  • —mixed messages containing 2-3 PII types together
  • —Eircode and IBAN/card boundaries in realistic support text
  • —PPSN and phone/entity overlap cases
  • —broader generalization on unseen nearby phrasing

The tradeoff is straightforward:

  • —accuracy is materially better on the hard Irish/UAT suites
  • —CPU q8 speed is slower than the DiffMask q8 line

Included Artifacts

  • —full transformers checkpoint in the repo root
  • —dynamic q8 ONNX artifact in onnx/model_quantized.onnx
  • —inference_mask.py
  • —inference_mask_onnx.py
  • —benchmark JSON and summaries in eval/
  • —release provenance in training_sources.json

Benchmark Summary

Gov Chatbot Red-Team v2

SuiteFull F1Q8 F1Q8 Exact F1Q8 Failures
Gov chatbot red-team v21.00001.00001.00000.0000
Gov chatbot gap holdout v21.00001.00001.00000.0000

This Release

SuiteFull F1Q8 F1Q8 ex/s
Irish core1.00001.0000221.5743
UAT exact1.00001.0000188.6537
Fresh holdout0.98410.9841145.9336
Hardening exact1.00001.0000112.4948
Edge1.00001.0000235.2888
Multilingual PPSN overall0.93330.9333224.6955
Multilingual PPSN label-only1.00001.0000—

Closest Public Comparisons

RepoStackQ8 Core F1Q8 Hardening F1Q8 Multilingual F1Q8 Core ex/s
temsa/IrishCore-GlobalPointer-135M-v1-rc4GlobalPointer raw-only span-matrix1.00001.00000.9333221.5743
temsa/IrishCore-DiffMask-135M-v1-rc6DiffMask raw-only token-span0.97330.97560.9274130.3415
temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8Raw-only token-span0.9737—0.917646.1420

Practical reading:

  • —This release is the strongest raw-only checkpoint in this repo family on the hard Irish/UAT/holdout suites.
  • —The q8 CPU artifact keeps the same accuracy on the main suites used for release.
  • —The multilingual benchmark's overall score is lower than the PPSN label-only score because that suite penalizes extra name detections as false positives. On the label that matters there, PPSN, this release is strong.

Usage

Full checkpoint

bash
python3 inference_mask.py \
  --model temsa/IrishCore-GlobalPointer-135M-v1-rc4 \
  --text "My PPSN is 1234567T, my Eircode is D02 XY45, and my phone is 087 123 4567." \
  --json

ONNX q8 CPU artifact

bash
python3 inference_mask_onnx.py \
  --model temsa/IrishCore-GlobalPointer-135M-v1-rc4 \
  --text "My PPSN is 1234567T, my Eircode is D02 XY45, and my phone is 087 123 4567." \
  --json

Both scripts emit:

  • —extracted spans with offsets and labels
  • —masked text using [PII:LABEL]

How It Differs From Other OpenMed-Derived Lines

Compared with the original OpenMed base model:

  • —this release does not use a BIO token head
  • —it scores typed spans directly
  • —it is tuned only for the released Irish core PII labels

Compared with DiffMask:

  • —no diffusion-style masked denoising during training
  • —no token-presence or boundary heads
  • —direct span-matrix scoring instead of reconstructing spans from token and boundary logits

Compared with the old hybrid releases:

  • —no external scanner or validator layer is required for the published behavior
  • —deployment stays simple: encoder + span head + deterministic replacement

Limitations

  • —It is slower on CPU than the DiffMask q8 release.
  • —The multilingual benchmark is not a clean multilingual NER benchmark; it is a PPSN-focused suite where extra name detections count against the overall score.
  • —If you need the fastest CPU-first public line rather than the strongest raw-only accuracy, compare this release against temsa/IrishCore-DiffMask-135M-v1-rc6.

References

  • —DistilBERT: https://arxiv.org/abs/1910.01108
  • —Global Pointer: Novel Efficient Span-based Approach for Named Entity Recognition: https://arxiv.org/abs/2208.03054
  • —RoFormer: Enhanced Transformer with Rotary Position Embedding: https://arxiv.org/abs/2104.09864

License And Attribution

  • —Release license: Apache-2.0
  • —Base model: OpenMed/OpenMed-PII-mLiteClinical-Base-135M-v1
  • —Dataset attribution is listed in NOTICE

<!-- 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_pass harness 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.md inside each public model repo.

Irish Core PII: Comparable Public Checkpoints

RepoStackFull Core F1Q8 Core F1Q8 Multilingual PPSN F1Q8 Core ex/s
`temsa/IrishCore-GlobalPointer-ContextPII-4L-122M-v1-rc6`4-layer GlobalPointer distilled fast student1.00001.00000.9333282.9
`temsa/IrishCore-GlobalPointer-ContextPII-4L-122M-v1-rc5`4-layer GlobalPointer distilled fast student1.00001.00000.9333282.9
`temsa/IrishCore-GlobalPointer-ContextPII-4L-122M-v1-rc3`4-layer GlobalPointer distilled fast student1.00001.00000.9333317.9
`temsa/IrishCore-GlobalPointer-ContextPII-4L-122M-v1-rc2`4-layer GlobalPointer distilled fast student1.00001.00000.9333292.5
`temsa/IrishCore-GlobalPointer-ContextPII-4L-122M-v1-rc1`4-layer GlobalPointer distilled fast student1.00001.00000.9333337.3
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc29`GlobalPointer raw-only + context labels1.00001.00000.9333232.7
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc28`GlobalPointer raw-only + context labels1.00001.00000.9333232.7
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc25`GlobalPointer raw-only + context labels1.00001.00000.9333212.1
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc24`GlobalPointer raw-only + context labels1.00001.00000.9333278.9
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc23`GlobalPointer raw-only + context labels1.00001.00000.9333237.6
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc22`GlobalPointer raw-only + context labels1.00001.00000.9333106.8
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc21`GlobalPointer raw-only + context labels1.00001.00000.9333150.8
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc20`GlobalPointer raw-only + context labels1.00001.00000.9333181.9
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc19`GlobalPointer raw-only + context labels1.00001.00000.933373.1
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc18`GlobalPointer raw-only + context labels1.00001.00000.9333126.2
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc17`GlobalPointer raw-only + context labels1.00001.00000.9333125.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc16`GlobalPointer raw-only + context labels1.00001.00000.9333125.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc15`GlobalPointer raw-only + context labels1.00001.00000.9333125.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc14`GlobalPointer raw-only + context labels1.00001.00000.9333119.2
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc13`GlobalPointer raw-only + context labels1.00001.00000.9333126.1
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc12`GlobalPointer raw-only + context labels1.00001.00000.933373.6
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc11`GlobalPointer raw-only + context labels1.00001.00000.933394.1
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc10`GlobalPointer raw-only + context labels1.00001.00000.9333125.8
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc9`GlobalPointer raw-only + context labels1.00001.00000.9333119.8
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc8`GlobalPointer raw-only + context labels1.00001.00000.9333128.9
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc7`GlobalPointer raw-only + context labels1.00001.00000.933389.0
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc6`GlobalPointer raw-only + context labels1.00001.00000.933389.0
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc5`GlobalPointer raw-only + context labels1.00001.00000.933384.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc4`GlobalPointer raw-only + context labels0.99350.99350.933361.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc3`GlobalPointer raw-only + context labels0.99350.99350.933361.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc2`GlobalPointer raw-only + context labels0.99350.99350.922261.5
`temsa/IrishCore-GlobalPointer-ContextPII-135M-v1-rc1`GlobalPointer raw-only + context labels0.99350.99350.922261.5
`temsa/IrishCore-GlobalPointer-135M-v1-rc4`GlobalPointer raw-only span-matrix1.00001.00000.9333221.6
`temsa/IrishCore-GlobalPointer-135M-v1-rc3`GlobalPointer raw-only span-matrix1.00001.00000.9213204.9
`temsa/IrishCore-GlobalPointer-135M-v1-rc2`GlobalPointer raw-only span-matrix0.99340.99340.9326231.2
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc8`Raw-only token-span0.97370.97370.917646.1
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc7`Hybrid classifier + generated scanner spec1.00000.99341.000030.0
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc6`Hybrid classifier + repair decoders1.00000.99341.000029.5
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc5`Hybrid classifier + repair decoders0.97370.96690.933334.4
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc4`Hybrid classifier + repair decoders0.98700.97400.9600114.2
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc3`Hybrid classifier + repair decoders0.98060.96770.933344.9
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc2`Hybrid classifier + repair decoders0.95540.96150.7887119.1
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v1`Hybrid classifier baseline0.95300.93330.9882103.3
`temsa/IrishCore-DiffMask-135M-v1-rc6`DiffMask token-span, scanner-free0.98010.97330.9274130.3
`temsa/IrishCore-DiffMask-135M-v1-rc5`DiffMask token-span, scanner-free0.97330.97330.9379249.2
`temsa/IrishCore-DiffMask-135M-v1-rc4`DiffMask token-span, scanner-free0.97330.97330.937129.5
`temsa/IrishCore-DiffMask-135M-v1-rc3`DiffMask token-span, scanner-free0.96640.96640.959130.0
`temsa/IrishCore-DiffMask-135M-v1-rc2`DiffMask token-span, scanner-free0.96640.96640.9212247.1
`temsa/IrishCore-DiffMask-135M-v1-rc1`DiffMask token-span, scanner-free0.98010.99340.9412251.2

Irish Core PII: Other Public Checkpoints

RepoStackFull Core F1Q8 Core F1Q8 Multilingual PPSN F1Notes
`temsa/OpenMed-mLiteClinical-IrishCorePII-135M-v2-rc1`Hybrid classifier prototype0.9487——Predates the public q8 artifact.

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

RepoArtifactIrish Large F1Multilingual PPSN F1User Raw F1QA v8 F1CPU ex/s
`temsa/OpenMed-mLiteClinical-IrishPPSN-135M-v1`fp32 canonical checkpoint0.89790.97040.80000.738557.4
`temsa/OpenMed-mLiteClinical-IrishPPSN-135M-v1-fp16`fp16 CPU/GPU artifact—0.97040.80000.738545.8
`temsa/OpenMed-mLiteClinical-IrishPPSN-135M-v1-q8`dynamic int8 CPU artifact—0.9040——132.1

PPSN-Only: Historical Public Checkpoints

RepoMain Published MetricsNotes
`temsa/OpenMed-PPSN-mLiteClinical-v1`same as canonical fp32 repo: multilingual 0.9704, user raw 0.8000Legacy alias; prefer temsa/OpenMed-mLiteClinical-IrishPPSN-135M-v1.
`temsa/OpenMed-PPSN-v6-raw-rc2`irishregv5 0.8750; userraw 0.8000; qav8 0.7385Raw PPSN-only research checkpoint; no packaged multilingual CPU benchmark row.
`temsa/OpenMed-PPSN-v5_1`irishlargev2 raw 0.9285; qa_v6 hybrid strict 1.0000Hybrid PPSN-only checkpoint; predates the canonical multilingual suite packaging.
`temsa/OpenMed-PPSN-v5`irishregv5 raw 0.8235; irishregv5 hybrid strict 1.0000Hybrid PPSN-only checkpoint; predates the canonical multilingual suite packaging.
`temsa/OpenMed-PPSN-v4`synthetic non-PPSN drift check onlyPredates the current PPSN eval suite; no packaged apples-to-apples multilingual CPU row.

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 -->