/ Модель

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

Контекст
512 токенов
Параметры
46 млн
Лицензия
CC BY 4.0
Архитектура
bert · dense
Базовая модель
dictabert-tiny
Библиотека
transformers
Опубликована
13 ноя 2026

GolemPII-v2-tiny

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

Компактная модель BERT для быстрого обнаружения и разметки персональных данных в тексте на иврите.

121скачиваний за 30 дней0лайковвеса обновлены18 ноя 2026

Бенчмарки

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

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

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

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

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

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

GolemPII-v2-tiny — компактная модель CordwainerSmith для обнаружения персональных данных в тексте на иврите и в тексте, где иврит смешан с английским. Это дообученная на dicta-il/dictabert-tiny модель BERT для классификации токенов: она размечает 15 типов сущностей, включая имена, адреса, телефоны, электронные адреса, идентификационные и банковские номера. Размер модели — около 45 млн параметров, контекст — до 512 токенов.

Модель предназначена для ускорения проверки текстов перед редактированием или маскированием персональных данных, в том числе в сценариях DLP и интеграции с Microsoft Presidio. По README, вариант tiny примерно в пять раз быстрее основной модели на GPU, но хуже справляется с корпоративными текстами, особенно с распознаванием номеров счетов и адресов электронной почты. Точность модели не гарантирует полной анонимизации или соблюдения требований законодательства: результатам нужна проверка человеком. Другие языки, отдельный английский текст, распознавание речи, OCR и рукописный текст не оценивались. Лицензия — CC BY 4.0.

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

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

Ограничения

Точность ниже, чем у основной версии, особенно для номеров счетов и электронной почты; другие языки и OCR- или речевые данные не оценивались. Обнаружение не гарантирует полной анонимизации, поэтому результаты требуют проверки человеком.

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

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

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

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

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

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

Открыть на Hugging Face

GolemPII v2: Hebrew PII detection

GolemPII v2 tiny

Version 2.0, 2026-11-13.

The smallest variant of GolemPII-v2-base: the same 15 labels and the same training data on dicta-il/dictabert-tiny (45M parameters). It is about five times faster than the main model and less accurate on enterprise text. Use it when speed or size matters more than accuracy; otherwise use the main model.

The labels, the training data, the way the scores are measured and the limits are described in the main model's card. The numbers below are from the REDACT final half, which was scored once after training.

Which model should I use

ModelParametersUse it for
GolemPII-v2-base277MHebrew mixed with English in enterprise text (emails, tickets, logs, JSON), and the best recall of the three on identity, card and bank numbers
GolemPII-v2-small125MHebrew prose: the best of the three at telling person names from organisations, at less than half the size of base and the same speed
GolemPII-v2-tiny (this model)45MWhen speed or size matters most (about five times faster), with lower accuracy on enterprise text

Usage

from transformers import pipeline

detector = pipeline(
    "token-classification",
    model="CordwainerSmith/GolemPII-v2-tiny",
    aggregation_strategy="simple",
    stride=128,  # lets the pipeline handle texts longer than 512 tokens
)

TEXT = """נושא: RE: ticket #48213 - עדכון פרטי לקוח

היי רונית,
הלקוח יואב בן דוד (ת.ז. 034567891) התקשר הבוקר וביקש לעדכן את הכתובת למשלוח: רחוב הרצל 42, רמת גן, מיקוד 5244302.
אפשר להשיג אותו ב-054-7731920 או במייל yoav.bendavid@example.com.
החיוב החודשי ירד מכרטיס ויזה 4580 1234 5678 9015, והזיכוי יועבר לחשבון IL620108000000099999999.
order_id=ORD-2024-88127, סכום: 349.90 ש"ח, תאריך לידה לאימות: 14/03/1987.

תודה,
Dana Levi | Customer Success"""

EDGE_PUNCTUATION = " .,;:!?()[]{}\"'-"


def clean_spans(text, entities):
    """Trim punctuation from span edges and join spans of one label that touch or overlap."""
    spans = []
    for entity in entities:
        start, end, label = entity["start"], entity["end"], entity["entity_group"]
        while start < end and text[start] in EDGE_PUNCTUATION:
            start += 1
        while end > start and text[end - 1] in EDGE_PUNCTUATION:
            end -= 1
        if start == end:
            continue
        if spans and spans[-1][2] == label and start <= spans[-1][1]:
            spans[-1] = (spans[-1][0], max(end, spans[-1][1]), label)
        else:
            spans.append((start, end, label))
    return spans


def redact(text, spans):
    pieces, position = [], 0
    for start, end, label in spans:
        pieces += [text[position:start], f"[{label}]"]
        position = end
    return "".join(pieces) + text[position:]


spans = clean_spans(TEXT, detector(TEXT))
for start, end, label in spans:
    print(f"{label:<12} {TEXT[start:end]}")
print(redact(TEXT, spans))

The detected spans:

FIRST_NAME   רונית
FIRST_NAME   יואב
LAST_NAME    בן דוד
ID_NUM       034567891
STREET       רחוב הרצל 42
CITY         רמת גן
POSTAL_CODE  5244302
PHONE_NUM    054-7731920
EMAIL        yoav.bendavid@example.com
CC_PROVIDER  ויזה
CC_NUM       4580 1234 5678 9015
IBAN         IL620108000000099999999
DATE         14/03/1987
FIRST_NAME   Dana
LAST_NAME    Levi

The redacted text. The ticket number, the order id and the amount are left alone:

נושא: RE: ticket #48213 - עדכון פרטי לקוח

היי [FIRST_NAME],
הלקוח [FIRST_NAME] [LAST_NAME] (ת.ז. [ID_NUM]) התקשר הבוקר וביקש לעדכן את הכתובת למשלוח: [STREET], [CITY], מיקוד [POSTAL_CODE].
אפשר להשיג אותו ב-[PHONE_NUM] או במייל [EMAIL].
החיוב החודשי ירד מכרטיס [CC_PROVIDER] [CC_NUM], והזיכוי יועבר לחשבון [IBAN].
order_id=ORD-2024-88127, סכום: 349.90 ש"ח, תאריך לידה לאימות: [DATE].

תודה,
[FIRST_NAME] [LAST_NAME] | Customer Success

clean_spans is optional. The pipeline groups sub-word tokens, so a raw span can carry a bracket, a hyphen or a full stop at its edge, or arrive in two pieces; the function trims and joins them. The scores on this page were measured on the raw pipeline output, without it.

The encoder is uncased.

With Microsoft Presidio

A ready recognizer for Presidio is in the GitHub repo. It registers this model for language he, maps the labels to Presidio entity names, and works with the standard analyze and anonymize calls.

Results

The evaluation code published with GolemPII-v2-base produced every number below, and scores any token-classification model on the same sets.

REDACT final, five categories

ModelParametersCharacter P / R / F1Entity P / R / F1
GolemPII-v1277M0.592 / 0.884 / 0.7090.601 / 0.913 / 0.725
GolemPII-v2-base277M0.886 / 0.951 / 0.9170.872 / 0.983 / 0.924
GolemPII-v2-tiny45M0.844 / 0.927 / 0.8840.797 / 0.968 / 0.874

By category (entity level, P / R / F1)

CategoryGolemPII-v2-baseGolemPII-v2-tiny
Person0.888 / 0.986 / 0.9340.846 / 0.971 / 0.904
Address0.777 / 1.000 / 0.8740.735 / 0.985 / 0.842
Phone0.940 / 0.993 / 0.9660.883 / 0.965 / 0.922
Email0.940 / 0.998 / 0.9680.734 / 1.000 / 0.846
Account (identity, card and bank numbers)0.762 / 0.905 / 0.8270.571 / 0.890 / 0.696

By label (character F1)

EMAIL 0.936, PHONE_NUM 0.934, LAST_NAME 0.903, FIRST_NAME 0.898, PASSPORT_NUM 0.835, ID_NUM 0.832, CITY 0.705, CC_NUM 0.539, DATE 0.520, DRIVER_LICENSE_NUM 0.475.

Person names on real text (NEMO, never trained on)

ModelPerson P / R / F1
GolemPII-v10.541 / 0.824 / 0.653
GolemPII-v2-base0.853 / 0.925 / 0.887
GolemPII-v2-tiny0.856 / 0.945 / 0.899

Names the model has never seen

FIRST_NAME F1 0.972, LAST_NAME F1 0.959.

Speed and size

Measured on an Apple M4 Pro (48 GB, macOS 27.0.1, torch 2.15.0, transformers 5.22.1) over 1,000 synthetic enterprise-style texts with a mean length of 1,512 characters, with the pipeline settings shown under Usage and batch size 8. Median of three runs; other programs were running, so treat differences of a few percent as noise.

ModelParametersFile sizeSeconds per 1,000 texts, Apple GPU (MPS)Seconds per 1,000 texts, CPU
GolemPII-v2-base277M1,110 MB63.8115.6
GolemPII-v2-small125M502 MB65.8120.9
GolemPII-v2-tiny45M179 MB13.015.6

The small model is less than half the size of the base model on disk and in memory, and runs at the same speed: both have a 12-layer encoder, and the base model's extra parameters are its larger vocabulary table. The tiny model is about five times faster on the GPU and seven times faster on the CPU.

Intended use and out of scope

Intended use: finding personal information in Hebrew text, and in Hebrew mixed with English, to assist redaction, masking and data-loss-prevention review.

Out of scope or not evaluated:

  • Other languages. Arabic, and English text on its own, were not evaluated.
  • Other sources. Speech transcripts, OCR output and handwriting were not evaluated.
  • Anonymisation. The model is a detector that assists redaction, not a guarantee of anonymisation or of compliance with any privacy law. Text that must be anonymised needs human review.
  • Other entity types. Organisations, job titles, countries and reference numbers (order, ticket and employee numbers) are not labelled.

Limits

All limits of the main model apply. In addition:

  • Precision on account numbers and emails is clearly lower than the main model's: it tags more reference numbers as identity or card numbers, and more non-email strings as emails.
  • One training run; the spread between runs was not measured for this variant.

Training

Same data and settings as the main model, except 10 epochs in place of 3.

Citation

If you use this model in a product, a paper or a derived model, please credit it as: GolemPII-v2-tiny by Liran Baba, with a link to https://huggingface.co/CordwainerSmith/GolemPII-v2-tiny.

@misc{baba2026golempii_v2_tiny,
  author       = {Baba, Liran},
  title        = {GolemPII v2 tiny: personal information detection for Hebrew text},
  year         = {2026},
  version      = {2.0},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/CordwainerSmith/GolemPII-v2-tiny}}
}

Licence and credits

CC-BY-4.0, following the encoder.

  • Encoder: dicta-il/dictabert-tiny by Dicta (CC-BY-4.0).
  • Real training sentences: IAHLT Hebrew named-entity dataset, github.com/IAHLT/hebrew_named_entities_open_dataset (Apache-2.0), with person names replaced.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForTokenClassification
Ревизия весов
fa88d00

0 моделей