/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
rubai-PII-detection-v1-latin
Библиотека
transformers
Опубликована
6 сен 2026

gapi-pii-v3-hard

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

BERT-модель для поиска имён, телефонов и адресов в узбекском тексте перед маскированием персональных данных.

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

Бенчмарки

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

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

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

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

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

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

Gapi PII — модель islomov для поиска персональных данных в узбекском тексте. Она размечает токены и возвращает точные символьные границы найденных фрагментов; для маскирования и обработки структурированных логов README также описывает сопутствующий программный компонент. Модель построена на BERT и имеет 136,7 млн параметров, работает с контекстом до 512 токенов. Доступны веса Safetensors и версия ONNX, включая int8 для CPU; лицензия — Apache-2.0.

Модель предназначена для обнаружения имён, телефонов и адресов в документах, чатах, логах и транскриптах распознавания речи. Она рассчитана на узбекский язык в латинице, в том числе на телефоны, продиктованные словами, и предложения с русскими словами. README приводит результаты на тестовых транскриптах звонков: точный F1 85,5 % и полноту маскирования 92,6 %; эти оценки основаны на машинной разметке по заданной политике, а не на независимой человеческой проверке.

Модель может пропускать части персональных данных, особенно адреса и фрагменты телефонов, поэтому при высокой цене утечки нужна дополнительная проверка. Она не обнаруживает электронную почту, URL, автомобильные номера и налоговые номера; узбекский текст кириллицей может обрабатываться хуже, в частности для дат. Для логов README описывает дополнительные правила обработки, предоставляемые сопутствующим компонентом.

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

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

Ограничения

На тестовых транскриптах звонков часть персональных данных оставалась незамаскированной; особенно часто пропускались адреса и фрагменты телефонов. Модель не выявляет электронную почту, URL, автомобильные и налоговые номера, а для узбекского текста кириллицей возможны пропуски частей дат.

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

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

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

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

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

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

Открыть на Hugging Face

Gapi PII — personal data in Uzbek text

The safest personal data is the data you never kept. Mask it before you store it, and sleep through the night.

Gapi PII finds personal data in Uzbek text and returns exact character spans and a masked copy. It reads documents, chats, application logs and speech-to-text output — including the messy kind, where numbers are dictated in words, digits arrive in groups and get repeated, and Russian words sit inside Uzbek sentences. It is the model behind the pii option of Gapi speech recognition.

ClassWhat it marks
NAMEpeople's first names, surnames and patronymics, with attached suffixes
PHONEcontact numbers in digits or words, including partial and repeated dictation
ADDRESSdistricts, streets, mahallas, landmarks, house and apartment numbers given as a location
DATEcalendar dates, weekdays and dates of birth (not "today", ages or times)
DOCUMENT_IDpassport, ID and personal numbers
CARD_NUMBERbank-card numbers

Quick start on CPU

pip install berkiting
from berkiting import Berkiting

b = Berkiting()  # int8 ONNX model, ~110 MB, no PyTorch
b.mask("Ismim Sardor Rustamov, raqamim 90 123 45 67")
# 'Ismim [NAME], raqamim [PHONE]'

b.mask('{"user": "Dilnoza Karimova", "phone": "998935551122", "city": "Toshkent"}')
# '{"user": "[NAME]", "phone": "[PHONE]", "city": "Toshkent"}'

b.detect("Karta raqami 8600 1234 5678 9012")["entities"]
# [{'label': 'CARD_NUMBER', 'start': 13, 'end': 32, 'value': '8600 1234 5678 9012'}]

From the shell: berkiting -f app.log > app.masked.log, or cat notes.txt | berkiting --json.

Ready-made scripts in examples/: masking a log file or a live log stream, a field in a JSONL dataset, a CSV column with pandas, a small HTTP masking service, and the full-precision PyTorch path on GPU.

Quality

Exact F1 needs the right class and both boundaries; masking recall is the share of personal-data characters that end up masked.

TextSizeExact F1Masking recall
Uzbek call transcripts, held out1,392 fragments85.5 %92.6 %
— the base model on the same texts1,392 fragments49.2 %67.7 %
General-domain text (seen by the base model)3,000 sentences95.4 %99.1 %
Documents: applications, contracts, orders, IDs16 entities100 %100 %
Chat messages and SMS8 entities87.5 %100 %
Russian text5 entities100 %100 %
Application logs, model alone16 entities29.6 %53.0 %
Application logs, with berkiting log rules16 entities83.9 %93.5 %
Uzbek in Cyrillic script5 entities54.5 %91.2 %

Per class on the call set: NAME 96.0 %, PHONE 80.4 %, ADDRESS 71.3 % exact F1 (base model 76.1 / 31.8 / 21.7 %). The call references are machine labels under a written policy, not independent human annotation. The small rows are hand-labelled invented examples — sanity checks, not benchmarks; the log row was written after the log rules were frozen and run once.

The int8 ONNX model scores 85.6 % exact F1 / 92.9 % masking recall on the same call set and runs 2.7x faster than PyTorch on 4 CPU threads (1,392 fragments in 26 s vs 70 s); the fp32 ONNX model gives the PyTorch output exactly.

Logs and structured text

The model labels whitespace-separated words, so phone=+998901234567 or "user": "Dilnoza Karimova" reads as one word glued to its key. berkiting (and gapi_pii_v0.detect_any below) recognises log, JSON, key=value and CSV lines, turns their delimiters into spaces for the model (offsets unchanged), and adds rules: values of keys such as name, phone, passport_no, card; Luhn-valid card numbers; +998 phones; ISO dates. Timestamps and IP addresses are never reported. Prose is sent to the model unchanged, so call transcripts and documents score exactly as without the rules.

PyTorch

pip install "torch>=2.9" "transformers>=4.57.3" safetensors huggingface_hub
from pathlib import Path
import sys
from huggingface_hub import snapshot_download

root = Path(snapshot_download("islomov/gapi-pii-v3-hard", local_dir="gapi-pii",
                              allow_patterns=["*.json", "*.txt", "*.safetensors", "gapi_pii_v0/*"]))
sys.path.insert(0, str(root.resolve()))
from gapi_pii_v0 import PIIComponent, detect_any

pii = PIIComponent(root=root, device="cpu")  # or "cuda:0"
result = pii.detect(["Ismim Sardor, raqamim to'qson bir yuz yigirma uch qirq besh oltmish yetti"])[0]
print(result["entities"])       # [{'label': 'NAME', 'start': 6, 'end': 12}, {'label': 'PHONE', 'start': 22, 'end': 73}]
print(result["redacted_text"])  # Ismim [NAME], raqamim [PHONE]

detect_any(pii, ["name=Otabek surname=Usmonov passport=AA0011223"])[0]["redacted_text"]
# 'name=[NAME] surname=[NAME] passport=[DOCUMENT_ID]'

detect(texts, redact_labels=[...]) masks only the classes you list. Long texts are read in overlapping 256-token windows; offsets are Unicode characters into your text. The component checks its files against release.json before loading and never logs or stores the text it is given.

The weights also load directly with AutoModelForTokenClassification. To reproduce the numbers above, split text on whitespace and take each word's label from its first sub-token, as gapi_pii_v0 and berkiting do; the generic pipeline aggregation splits words differently.

Files

PathWhat
model.safetensors, config.json, tokenizer filesPyTorch / Transformers weights
gapi_pii_v0/PyTorch decoder, masking and log rules
onnx/model_int8.onnxint8 ONNX for CPU (used by berkiting by default)
onnx/model_fp32.onnxfp32 ONNX, output identical to PyTorch
onnx/tokenizer.jsontokenizer for the ONNX models
examples/usage scripts

Limits

  • Not a complete anonymiser: on call transcripts about 7 % of personal-data characters stay unmasked, mostly addresses and phone fragments. Keep a human or a second check where a leak is costly.
  • Emails, URLs, car plates and tax numbers are not detected.
  • Trained for Uzbek in Latin script (with Russian words inside). Russian text works; Uzbek in Cyrillic script finds names and phones but can miss parts of dates.
  • In logs, values in CSV with ; separators and no header-key rule can be missed, and a dashed phone like 90-555-66-77 may come out as DOCUMENT_ID (still masked).

License

Apache-2.0. Fine-tuned from islomov/rubai-PII-detection-v1-latin (Apache-2.0); the tokenizer is unchanged from it.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей