/ Модель

Характеристики

Контекст
512 токенов
Параметры
21,5 млн
Лицензия
Apache 2.0
Архитектура
electra · dense
Базовая модель
koelectra-small-v3-discriminator
Библиотека
transformers
Опубликована
26 авг 2026

koelectra-ko-pii-ner

Разметка токеновТекст → label6 профессий

Компактная корейская ELECTRA-модель для обнаружения и классификации персональных данных перед их маскированием или передачей внешним сервисам.

1 746скачиваний за 30 дней0лайковвеса обновлены26 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

atonlee/koelectra-ko-pii-ner — корейская модель распознавания именованных сущностей, разработанная для обнаружения персональных данных в тексте и определения их типа и позиции. Она предназначена для маскирования чувствительных данных и для проверки текста перед передачей во внешний LLM или облачный сервис. Модель различает 29 меток, включая идентификационные номера, паспортные и банковские данные, имена, телефоны, адреса и организации; категории помогают определить, какие сущности следует скрыть.

Модель построена на ELECTRA и дообучена для классификации токенов на основе monologg/koelectra-small-v3-discriminator. Метаданные указывают 21,5 млн параметров, контекст до 512 токенов и поддержку корейского языка. Доступны веса Safetensors и ONNX, включая варианты FP16 и INT8 для локального запуска. В оценке на 5 171 размеченном предложении F1 составил 94,2% для совпадения типа сущности и 88,1% для точного совпадения границ; качество может различаться по классам, а неполное совпадение границ способно повлиять на маскирование. Модель распространяется по лицензии Apache-2.0.

Сценарии применения

  • обнаружение корейских идентификационных и регистрационных номеров
  • поиск телефонов, адресов и имён в корейском тексте
  • классификация чувствительных данных по уровню риска
  • маскирование персональных данных перед отправкой текста в облако
  • локальная проверка текстов и документов на утечки персональных данных

Ограничения

Точное совпадение границ сущностей в оценке ниже, чем обнаружение их позиции и типа (F1 88,1% против 94,2% для типа). Результаты оценки не гарантируют безошибочное выявление или маскирование всех персональных данных.

Для каких профессий подходит6

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

koelectra-ko-pii-ner · Korean PII Detection Model

A 14M-parameter NER model that detects personal data in Korean text and returns its position and type.

Used for masking personal data, or for identifying it before text is sent to an external LLM or to the cloud.

tiercriterionrecommended actionmain labels
tier1identifies a person on its owndo not send off-deviceresident registration number · alien registration number · passport · driver's licence · card number · account number · password
tier2identifies a person in combination with other datamask, then sendname · phone · email · address · date of birth · user id · employee id · vehicle plate · IP
noneentity that is not treated as personal datasend as-isdate · time · quantity · place · organisation

none does not mean the sentence contains no personal data. It means an entity that is detected but not treated as personal data, such as PLACE or ORGANIZATION.

Usage

import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer

MODEL_ID = "atonlee/koelectra-ko-pii-ner"

tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForTokenClassification.from_pretrained(MODEL_ID).eval()

text = "김민준 씨한테 010-1234-5678로 연락해줘"

inputs = tokenizer(
    text,
    return_offsets_mapping=True,
    return_tensors="pt",
    truncation=True,
    max_length=512,
)

offsets = inputs.pop("offset_mapping")[0]

with torch.no_grad():
    logits = model(**inputs).logits

predictions = logits.argmax(dim=-1)[0]

for pred, (start, end) in zip(predictions, offsets):
    if start == end:
        continue

    label = model.config.id2label[pred.item()]

    if label != "O":
        print(label, repr(text[start:end]), f"[{start}:{end}]")

Output:

B-NAME  '김민'  [0:2]
I-NAME  '준'    [2:3]
B-PHONE '010'   [8:11]
I-PHONE '-'     [11:12]
I-PHONE '123'   [12:15]
I-PHONE '4'     [15:16]
I-PHONE '-'     [16:17]
I-PHONE '56'    [17:19]
I-PHONE '78'    [19:21]

The model predicts personal data using the BIO scheme.

  • B- — start of a region
  • I- — continuation of the same region
  • O — token that is not a target

Tokens are subword units, so consecutive BIO tags have to be joined to recover the actual region.

김민준                          NAME
010-1234-5678                   PHONE
900101-1234567                  RRN
5310-99**-****-1122             CARD_NUMBER
서울시 강남구 테헤란로 152 3층      ADDRESS

One joined region is one entity. 김민준 = NAME (0, 3) is one. A sentence can contain several, and the evaluation below counts entities, not sentences.

Labels

29 labels.

tier1 — do not send off-device

Identifies a person on its own.

labeldescriptionexample
RRNresident registration number900101-1234567
ALIEN_IDalien registration number920414-6613077
PASSPORTpassport numberW858W0028
DRIVER_LICENSEdriver's licence number19-61-620553-00
IPINi-PIN · connecting information7275209485124
CARD_NUMBERcard number4594-1722-2866-5259
CARD_EXPIRYcard expiry date10/2028
CVCcard security code488
ACCOUNT_NUMBERbank account number719-938-027247
SECRETpassword · credentialA2UfgtKg!W1x

tier2 — mask, then send

Identifies a person in combination with other data.

labeldescriptionexample
NAMEperson's name김민준
PHONEphone number010-6517-8506
EMAILemail addressjkim899@example.com
ADDRESSaddress with a building or unit number인천광역시 연수구 송도동 6
ZIPCODEpostal code55857
BIRTHDATEdate of birth2001년 5월 25일
USER_IDaccount idquiet_owl22
GENERIC_IDassigned number — employee id, membership idMEM-865502
VEHICLE_NUMBERvehicle plate89라 8008
IP_ADDRESSIP address221.139.235.53
URLlink containing a personal identifierhttps://example.co.kr/account/9uemxnc5l
DEPARTMENTdepartment인사팀
POSITIONjob title팀장
ATTRIBUTEpersonal attribute — blood type, religion, majorA형 · 천주교

none — send as-is

Detected, but not treated as personal data.

labeldescriptionexample
PLACEplace name without a building number강릉시 · 메가박스 강남
ORGANIZATIONinstitution · company · group환경부 · NAVER
DATEdate1939-10-14
TIMEtime오전
QUANTITYquantity40%

ADDRESS and PLACE are split by form. With a building or unit number it is ADDRESS (tier2); without one it is PLACE (none).

ONNX

ONNX models are included.

filesize
model.onnx56.6 MB
model_fp16.onnx28.5 MB
model_int8.onnx14.7 MB
model_uint8.onnx14.7 MB
model_quantized.onnx14.7 MB
model_q4f16.onnx15.0 MB

model_quantized.onnx is the uint8 model under the name Transformers.js looks for.

Training

Base modelmonologg/koelectra-small-v3-discriminator
Parameters14.1M
TokenizerKorean WordPiece
TaskToken Classification
TaggingBIO
Max input512 tokens

Training used public datasets and hand-written PII examples.

sourcelicencecontribution
BCCard/pii-masking-openpii-financeCC BY 4.0financial and administrative prose, structured identifiers
townboy/korean-pii-datasetCC BY 4.0Korean names, affiliations, personal-data expressions

The following were written for this model and added to the training data.

  • masked identifiers
  • partially revealed identifiers
  • ordinary sentences containing no personal data
  • strings shaped like identifiers but not personal data

Neither the source datasets nor the merged training corpus is redistributed here.

Evaluation

5,171 test sentences carry ground-truth annotations — 17,537 entities in total, personal data included. Predictions were compared against those annotations.

Three criteria, differing in how much has to match.

criterioncounts as correct whenneeded for
positionit overlaps the ground truthdeciding whether personal data is present
typeit overlaps and the label matchestier routing
boundarystart and end character positions match toomasking
criterionPrecisionRecallF1
position93.8%98.4%96.1%
type92.0%96.5%94.2%
boundary86.1%90.3%88.1%

By tier, on the type criterion.

tierground truthPrecisionRecallF1
tier11,97984.8%94.3%89.3%
tier28,97594.9%98.5%96.7%
none6,58390.2%94.3%92.2%

Licence

Model weights: Apache-2.0

Inherited from the base model. Each external dataset used in training keeps its own licence.

  • BCCard/pii-masking-openpii-finance — CC BY 4.0
  • townboy/korean-pii-dataset — CC BY 4.0

This repository does not relicense or redistribute the source datasets.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
ElectraForTokenClassification
Ревизия весов
1e75c01

0 моделей