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
python
1from schift_ko_pii import detect, mask,apply23# Detect PII spans (each entity gets a sequential id)4spans = detect("피고 김민수의 전화번호는 010-1234-5678이다.")5# [6# {"id": "person_1", "start": 3, "end": 6, "label": "private_person", ...},7# {"id": "phone_1", "start": 14, "end": 27, "label": "phone_number", ...},8# ]910# Mask: get masked text + entity map in one call11result = mask("피의자 김철수가 피해자 박영희에게 서울시 강남구에서 금품을 전달하였다.")12print(result["masked"])13# 피의자 [사람1]가 피해자 [사람2]에게 [주소1]에서 금품을 전달하였다.1415for e in result["entities"]:16print(f" {e['id']}: {e['text']}")17# person_1: 김철수18# person_2: 박영희19# address_1: 서울시 강남구2021# Apply: replace selected entities (user can edit the map before applying)22text =apply(23"피의자 김철수가 피해자 박영희에게 서울시 강남구에서 금품을 전달하였다.",24 result["entities"],25 replacements={"person_1":"OOO","person_2":"△△△"}26# address_1 omitted → left unmasked27)28# 피의자 OOO가 피해자 △△△에게 서울시 강남구에서 금품을 전달하였다.2930# With postprocessing (regex validation + structured-ID rules)31spans = 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
API (free)
For production use without managing model files:
python
1from schift import Schift
23client = Schift(api_key="...")# free at schift.io4result = client.pii.redact("김민수의 전화번호는 010-1234-5678입니다.")5# Postprocessing is always enabled on the API.
1# Benchmark this model (v1, 93 cases)2python benchmark/run_benchmark.py
34# Benchmark v2 (253 cases)5python benchmark/run_benchmark.py --benchmark benchmark/benchmark_v2.jsonl
67# With postprocess8python benchmark/run_benchmark.py --postprocess
910# Compare any HuggingFace model11python benchmark/run_benchmark.py --hf-model LiquidAI/LFM2.5-Encoder-350M-PII-Detector
Model details
Base model: klue/roberta-base (111M params)
Training: LoRA adapter on ~20k Korean legal/financial/admin examples
Format: safetensors bf16 (210 MB)
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
bibtex
1@software{schift_ko_pii_2026,
2 author = {Schift Inc.},
3 title = {schift-ko-pii: Korean PII Detection Model},
4 year = {2026},
5 url = {https://huggingface.co/schift-io/schift-ko-pii-v4},
6}