Skip to main content

language: ko license: other license_name: schift-2.0 license_link: LICENSE library_name: onnxruntime pipeline_tag: token-classification tags:

  • pii
  • korean
  • ner
  • privacy
  • onnx
  • token-classification datasets:
  • custom model-index:
  • name: schift-ko-pii-v4 results:
    • task: type: token-classification name: Korean PII Detection metrics:
      • type: f1 value: 0.863 name: F1 (raw, no postprocess)
      • type: f1 value: 0.968 name: F1 (with postprocess)

schift-ko-pii-v4

111M parameter Korean PII detector that outperforms models 3x its size.

Fine-tuned from klue/roberta-base with LoRA on Korean legal, financial, and administrative texts. Exported to ONNX INT8 for CPU-only deployment (107 MB).

Benchmark: schift-ko-pii-v4 vs LFM2.5-Encoder-350M-PII-Detector

Same benchmark, same scoring (50% overlap match), no postprocessing on either side.

Model Params micro F1 strong F1 Size
schift-ko-pii-v4 111M 0.863 0.893 107 MB (ONNX INT8)
LFM2.5-PII-Detector 350M 0.663 0.645 ~1.4 GB

With postprocessing enabled (postprocess=True):

Model strong F1 P R
schift-ko-pii-v4 + postprocess 0.968 0.947 0.991

Category breakdown (raw model, no postprocess)

Category schift-ko-pii LFM2.5-PII
Person (standard) 1.00 0.67
Person (rare surnames) 1.00 0.60
Person (short names) 1.00 0.57
Phone 0.86 0.92
Email 1.00 0.86
Address (urban) 1.00 0.67
Address (rural) 1.00 0.60
Vehicle plate 1.00 0.00
Date (Korean) 1.00 0.00
Resident ID 1.00 0.75
Passport 1.00 1.00

LFM2.5 is a strong multilingual model, but it was not trained on Korean-specific formats: vehicle plates (52가1234), resident registration numbers (850205-1234567), Korean date expressions (2024년 3월 15일), or rare Korean surnames (황보, 남궁, 독고).

Quick start

pip install schift-ko-pii
from schift_ko_pii import detect

# Raw model output
spans = detect("피고 김민수의 전화번호는 010-1234-5678이다.")
# [
#   {"start": 3, "end": 6, "label": "private_person", "score": 0.99, "text": "김민수"},
#   {"start": 14, "end": 27, "label": "private_phone", "score": 0.98, "text": "010-1234-5678"},
# ]

# With postprocessing (regex validation + structured-ID rules, higher precision)
spans = detect("주민번호 850205-1234567을 확인.", postprocess=True)

Postprocessing

The postprocess=True flag applies Korean-specific rules:

  • Regex validation for structured IDs (resident numbers, passports, vehicle plates, bank accounts)
  • Luhn/checksum verification where applicable
  • Context-aware span merging
  • False-positive suppression for legal case numbers and statute references

This raises strong-category F1 from 0.893 to 0.968.

API (free)

For production use without managing model files:

from schift import Schift

client = Schift(api_key="...")  # free at schift.io
result = client.pii.redact("김민수의 전화번호는 010-1234-5678입니다.")
# Postprocessing is always enabled on the API.

Labels

Label Description Examples
private_person Person names (Korean, Hanja, foreign) 김민수, 황보영희, Lee Jenny
private_phone Phone numbers 010-1234-5678, 02-1234-5678
private_email Email addresses user@example.com
private_address Street/postal addresses 서울특별시 강남구 테헤란로 521
private_date Dates 2024년 3월 15일, 2024-03-15
private_url URLs, SNS links, IP addresses instagram.com/user, 192.168.1.1
account_number Structured IDs: resident/business/bank/passport/vehicle 850205-1234567, M12345678
secret Secrets, API keys, passwords

Benchmark

The benchmark suite is included in this repository under benchmark/.

# Benchmark this model
python benchmark/run_benchmark.py

# With postprocess
python benchmark/run_benchmark.py --postprocess

# Compare any HuggingFace model
python benchmark/run_benchmark.py --hf-model LiquidAI/LFM2.5-Encoder-350M-PII-Detector

93 hand-crafted cases covering Korean legal, investigative, and administrative text. Categories: person (standard/rare/short/foreign/hanja), phone, email, address (urban/rural), dates, URLs, resident IDs, business IDs, bank accounts, passports, vehicle plates, IP addresses, plus negative cases (legal case numbers, statute references, Hanja legal terms).

Model details

  • Base model: klue/roberta-base (111M params)
  • Training: LoRA adapter on ~20k Korean legal/financial/admin examples
  • Format: safetensors (420 MB FP32)
  • Inference: transformers pipeline, CPU or GPU
  • Max length: 512 tokens
  • Tagging scheme: BIES (Begin/Inside/End/Single)

License

Schift License v2.0 — Apache 2.0 base with a revenue threshold. Free for everyone under $10M annual revenue. Research, education, and non-profit use always permitted. Companies above the threshold: contact hello@schift.io.

Citation

@software{schift_ko_pii_2026,
  author = {Schift Inc.},
  title = {schift-ko-pii: Korean PII Detection Model},
  year = {2026},
  url = {https://huggingface.co/schift-io/schift-ko-pii-v4},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

schift_ko_pii-0.1.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

schift_ko_pii-0.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file schift_ko_pii-0.1.1.tar.gz.

File metadata

  • Download URL: schift_ko_pii-0.1.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for schift_ko_pii-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e42f59aaeb3f8a1d2e4d3e40ae7fbce3bb0460fbf78621ce16f7f1d4adcdc201
MD5 42be00b3963dab1cd0237c99fe016ba9
BLAKE2b-256 f21c987beddc933949116f8d13fa9f583245ab3e5637b71f35bf999e47150ec0

See more details on using hashes here.

File details

Details for the file schift_ko_pii-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: schift_ko_pii-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for schift_ko_pii-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 321a41d486c6fc97daefac3cf43de68f608b13c0ced9940d0675877c3211bb1f
MD5 c17a08f5494930f5871d5f0c65ed565a
BLAKE2b-256 b7607a12e0540ebbe93e0361f8ad89d211185a482126450cb46a1093f3dbc57d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page