/ Модель

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

Контекст
8 192 токена
Параметры
307 млн
Лицензия
MIT
Архитектура
modernbert · dense
Базовая модель
mmBERT-base
Библиотека
transformers
Опубликована
25 окт 2026

seter-pii-he-ar-fast

Разметка токеновТекст → label5 профессий
792скачиваний за 30 дней0лайковвеса обновлены1 дек 2026

Описание модели

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

Модель Shoresh Labs находит и размечает персональные данные в текстах на иврите, арабском и английском языках для последующего редактирования или маскирования.

Seter PII Fast v1.1.2 — модель Shoresh Labs для обнаружения персональных данных в текстах на иврите, арабском и английском языках, в том числе в смешанном тексте. Это дообученная на mmBERT-base модель ModernBERT с архитектурой token classification, примерно 307 млн параметров и контекстом около 8 тысяч токенов. Репозиторий содержит веса Safetensors и квантированный ONNX-файл int8 размером 369 МБ для локального запуска, включая браузер и ноутбук с CPU.

Модель размечает имена людей, адреса, телефоны, электронную почту и номера счетов. Она подходит для предварительного выявления данных перед редактированием или маскированием в письмах, обращениях, кадровых записях и других документах; опубликованные тесты показывают хорошее качество, но версия Fast уступает более крупной модели Seter PII. Лицензия MIT.

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

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

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

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

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

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

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

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

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

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

Открыть на Hugging Face

Seter PII Fast — Hebrew · Arabic · English

Seter Fast v1.1.2 is the recommended default model in the open, MIT-licensed Seter pair, by Shoresh Labs. It finds personal data in Hebrew, Arabic and English, including mixed-language text, and runs locally on a laptop CPU: the int8 ONNX file (onnx/model_quantized.onnx) is 369 MB on disk, 18 ms on a short sentence and 275 ms on a 1,500-character record (4 threads, 603 MB RAM). Use it in the in-browser demo, on a laptop, or behind seter-guard. Labels are private_person, private_address, private_phone, private_email, and account_number. Architecture: mmBERT-base, 308M params, ~8k context.

For offline batch jobs that want the higher-accuracy model, use seter-pii-he-ar v1.2 (559M). On 150 held-out documents, with the published decoder, large v1.2 scores character F1 0.972; fast v1.1.2 int8 scores 0.954.

This repository is v1.1.2 (25 Nov 2026): the weights of v1.1, a config.json that transformers 4.x reads correctly, and a new int8 ONNX file (onnx/model_quantized.onnx, 369 MB; see the changelog). Pin a version in production: revision="v1.1.2". Earlier files remain available as revisions v1.1.1, v1.1 and v1.0.

Why

Free PII detectors are strong in English but miss most Hebrew and Arabic names — especially first names on their own, names with attached prefixes (ל/ו/ש), titles (עו"ד, د.) and Arabic kunyas (أبو …).

Key facts

Measured 2026-11-25 (Asia/Jerusalem), unless noted. REDACT figures are typed character-level micro-F1, evaluation only.

  • Recommended default. This is the model to start with on a laptop CPU and for live guardrail traffic. Seter Large v1.2 is the offline, higher-accuracy option for batch jobs (held-out character F1 0.972 with the published decoder; this int8 file scores 0.954 on the same set).
  • License and deployment. MIT. Inference runs locally. The browser demo never sends the typed text off the page.
  • Languages. Hebrew, Arabic and English, including mixed text.
  • Laptop CPU, v1.1.2 int8 ONNX (4 threads; short sentences and ~1,500-character records): 18 ms / 275 ms, 603 MB RAM, 369 MB disk.
  • REDACT, shipped weights (fp32). Arabic .911. Standalone first-name recall@50%: Hebrew .886, Arabic .940, English .990. The v1.1.2 int8 file scores Hebrew final .897, Arabic .909, English .871.
  • 50-sentence set (lenient character F1, fp32): .991.
  • Decoder. Benchmark figures use the published decoder, seter_entities.py, which includes an account-number clean-up. An optional strict-ids preset masks only identity and financial numbers (see Decoder).

Results

Held-out documents

150 documents (50 Hebrew, 50 Arabic, 50 English; 2,480 labelled spans; 672-1,819 characters each): support tickets, chat threads, emails, HR and medical notes, legal letters, logs, forms. They were written for this evaluation, independently of REDACT and of the training data generator, under Seter's own labelling policy. Text left unlabelled in this set is not personal data, so precision is meaningful here.

fast v1.0fast v1.1 (released weights)fast v1.1, mean of 3 training seedsfast v1.1 released weights, published decoderlarge v1.2 (released weights)
Character F10.8700.9470.9420.9530.968
Character precision0.7990.9160.9070.9290.962
Character recall0.9550.9800.9800.9790.975
Entities fully covered0.8850.9560.9540.9540.961
Predicted spans that touch no labelled entity984317350259117
F1 Hebrew / Arabic / English0.833 / 0.886 / 0.8890.943 / 0.945 / 0.9530.929 / 0.944 / 0.9520.947 / 0.951 / 0.9620.969 / 0.973 / 0.963

Columns other than "published decoder" use the plain decoder. The published decoder (account clean-up plus the account-number calibration, see Decoder) removes 58 stray spans for one point of recall; the v1.1.2 int8 file with it scores F1 0.954 (precision 0.931, recall 0.979), and the large v1.2 weights 0.972. Read this table with its limits in mind: the set is small; it was written and labelled by an AI model from a written policy and proof-read in full by a second AI reviewer per language, not by a person; and the policy was written by the same author as the training classes, so it favours them. The fast model still tags about 2.7 times as many stray spans as the large one; Hebrew precision is its weakest point (0.906 for the released weights, 0.884 on average over seeds).

Independent benchmark: REDACT (Hebrew, Arabic, English subsets)

Evaluated on the Hebrew, Arabic and English records of REDACT (evaluation only; never used for training). REDACT types mapped to the five labels above; out-of-scope types (dates, cities, medical, …) ignored.

Languageopenai/privacy-filter F1seter-pii-he-ar-fast v1.0 F1seter-pii-he-ar-fast v1.1 F1, mean of 3 training seeds (released weights)seter-pii-he-ar v1.2 (xlm-r-large) F1, mean of 3 seeds
Hebrew (621 records)0.6420.8500.905 (0.908)0.915
Arabic (568)0.7350.8930.913 (0.914)0.922
English (534)0.7090.8410.885 (0.886)0.890

REDACT leaves much personal data unlabelled (in an audit of 300 predictions by the large v1.1 weights that touch no REDACT label, 59-66% were personal data), so REDACT precision, and with it F1, understates every system in this table.

Payment-card numbers, including "ending in 1234" and masked forms, are caught in 98% / 94% / 97% of Hebrew / Arabic / English cases (v1.0: 67% / 55% / 52%). English national identity numbers: 98% (v1.0: 89%).

What v1.1 does worse than v1.0, and how it was released. The project's release rule needs, over three training seeds, that no REDACT entity type loses more than 0.05 of recall on average. One group breaks it: English Preferred_Name (78 entities) falls from 0.987 to 0.927 on average (0.936 for the released weights). The missed items are screen names in display-name fields (for example a gamer-style handle in quotes) and a common word used as a display name. v1.0 catches them, and also tags about 2.8 times as many stray spans on the held-out documents. The owner chose to release v1.1 as a stated exception. Also lower, inside the rule: English passport numbers 1.000 → 0.970, surnames standing alone 0.3-0.8 points in each language, and 3 of 304 held-out phone numbers missed (v1.0: none).

The released weights are training seed 3 and were chosen after the scores were seen (best held-out F1 and fewest stray spans of the three). Read the three-seed mean as the expected figure. Full tables: eval/fast_v1.1_eval_summary.md.

ONNX files. onnx/model.onnx gives the same spans as the PyTorch weights on all 150 held-out documents (F1 0.947). onnx/model_quantized.onnx at v1.1.2 is a 369 MB int8 export (per-channel dynamic int8; the mlp/Wo layers and the classification head stay in fp32) and is the file the browser demo loads. On REDACT it scores Hebrew final F1 0.897 (fp32 0.900), Arabic 0.909 and English 0.871. On a CPU with 4 threads it takes 18 ms on a short sentence and 275 ms on a 1,500-character record, and uses 603 MB of RAM. The v1.1.1 int8 file lost about 13 points on REDACT Hebrew final (F1 0.765) and remains at revision v1.1.1; do not use it for int8. The ONNX files published with v1.1 between 12 and 17 Nov 2026 scored 0.931 and 0.930 on the held-out documents: they had been exported under transformers 4.57, which misreads this model's config.json (next paragraph). They remain at revision v1.1; do not use them.

transformers version. The model was trained with transformers 5. Its config.json stores the rotary-position settings in the transformers 5 format, and transformers 4.x ignored them without a warning and used a different value in the local-attention layers: the same weights then score F1 0.931 instead of 0.947 on the held-out documents. v1.1.1 adds the keys transformers 4.x reads; with them transformers 4.57.6 and 5.23.0 give the same output (checked on sequences of 16 to 2,000 tokens). If you load revision="v1.1", use transformers 5 or move to v1.1.1. The same holds for revision="v1.0": its config.json has no such keys either, and its ONNX file was exported the same way and does not match its PyTorch weights (the effect on v1.0's accuracy was not measured). Versions before 4.57.6 were not checked.

Scores use a small post-processing step (merging sub-word pieces, snapping emails to the full address, dropping one-letter names, trimming an Arabic conjunction attached to a kunya such as وأم محمد). Raw pipeline output can differ slightly.

Variants

VariantBaseParamsCPU time per REDACT record (6 threads)Use when
seter-pii-he-arFacebookAI/xlm-roberta-large (MIT)559M~506 msOffline batch jobs; higher accuracy (held-out F1 0.972 with the published decoder)
seter-pii-he-ar-fastjhu-clsp/mmBERT-base (MIT)308M~221 msRecommended default — laptop CPU, live traffic, and the browser (v1.1.2 int8: 369 MB, 18 ms / 275 ms)

CPU times were measured on the v1.0 weights; the architecture is unchanged.

Benchmarks

The figures in this section are on REDACT (Vats et al., ServiceNow; dataset guneeshv/REDACT-PII-Benchmark), used for evaluation only and never for training. The Hebrew final half is the held-out split published with GolemPII-v2-base by Liran Baba, and the scores use that project's typed character-level micro-F1 scorer. Arabic and English use the same scorer on the Hebrew, Arabic and English REDACT subsets described above. Both models are shown with their default decoders; for Seter that is the published decoder in seter_entities.py (account clean-up, and for the fast model the account-number calibration). Measured 2026-11-25 (Asia/Jerusalem).

With default decoders on this protocol, GolemPII-v2-base leads on Hebrew final F1, on Hebrew final precision, and on account-number F1. The strict-ids columns use Seter's optional entity-selection preset (see Decoder), which follows REDACT's labelling policy for numbers: identity and financial numbers are labelled; customer, employee and medical-file numbers, policy numbers, reference codes and card expiry dates are not. With it, Seter large scores .919 on Hebrew final F1; GolemPII-v2-base still leads on Hebrew final precision and on account-number F1.

MeasurementSeter large v1.2 (default)Seter large v1.2 (strict-ids)Seter fast v1.1 (default, fp32)Seter fast v1.1.2 int8 (strict-ids)GolemPII-v2-base
REDACT Hebrew final F1 (precision / recall).913 (.865 / .967).919 (.878 / .964).900 (.841 / .968).903 (.850 / .963).917 (.886 / .951)
REDACT Hebrew final account F1.741.788.727.775.821
REDACT Arabic F1.921.926.911.912.905
REDACT English F1.892.902.880.881.896
Standalone first-name recall@50%, HE / AR / EN.879 / .933 / .986.879 / .933 / .986.886 / .940 / .990.882 / .940 / .986.860 / .886 / .827
50-sentence set, lenient character F1.998.998.991.991.872

The v1.1.2 int8 ONNX file of the fast model scores REDACT Hebrew final .897, Arabic .909, and English .871 (same scorer). CPU latency for that file is reported in Key facts; it was measured on a different machine than earlier fp32 comparisons, so those speed figures are not placed side by side here.

The strict-ids columns were measured 2026-11-26 (Asia/Jerusalem) by applying the preset on top of the published default decoder, to the output of the large v1.2 weights and of the fast v1.1.2 int8 file. Nothing was retrained. The preset's rules were written from the benchmark's published labelling policy and fixed on synthetic development sets before being scored on REDACT once.

GolemPII-v2-base should be credited as requested by its author: GolemPII-v2-base by Liran Baba, with a link to the model on Hugging Face.

Training

  • Base: jhu-clsp/mmBERT-base (MIT), 3 epochs, lr 3e-5, weight decay 0.01, maximum length 512 tokens, ~40,800 fully synthetic records: invented names, nicknames, personal handles and screen names, IDs (valid Israeli ID checksums, identity and passport formats from other countries), person ids (customer / employee / student / user), phones with and without extensions, IBANs, card numbers, last-four forms and expiry dates, emails and addresses, in natural sentences, in structured records (JSON, key=value, pipe- and YAML-style logs) and in about 2,600 multi-sentence documents (paragraphs, chat transcripts, emails) in which the same people recur. About a third contain no PII (organisations, cities, hospitals, dates, order/ticket/request/tracking ids, UUIDs, prices, IPs, URLs, postcodes, floors and rooms, coordinates, street names without a house number).
  • Distilled: besides the labels, the model was trained to match the entity-type probabilities of seter-pii-he-ar v1.2 on the same synthetic text. Whether this term helps was not measured separately.
  • No real personal data was used for training.

Limitations — read before use

  • A redaction aid, not an anonymization guarantee or compliance certification. Keep human review for legal, medical, financial and HR data.
  • Less precise than the large model: expect more stray spans, especially in Hebrew.
  • Screen names in display-name fields are caught less often than by v1.0 (see above).
  • The training data classes were chosen after reading errors on REDACT. No benchmark text was used, and the training text was scanned for benchmark identifiers and handles, but REDACT is not an independent test for this version. The held-out set is small.
  • Cities, organisations and public bodies are intentionally not labelled on their own. Dates, URLs and secrets are not covered (use openai/privacy-filter for those).
  • Israeli ID numbers, passports, bank accounts and customer / employee / student / user ids are all labelled account_number; personal handles are labelled private_person. To mask only identity and financial numbers, use the strict-ids preset (see Decoder).
  • The model reads up to about 8,000 tokens per call, and the pipeline silently drops anything past that. Split longer texts into overlapping windows. (tokenizer.json in v1.0 carried a 192-token truncation setting left over from training, which tools that load the file directly would apply; v1.1 removes it.)
  • Use aggregation_strategy="simple"; multi-word Arabic names (أبو خالد) may come back as two adjacent private_person spans — merge neighbours if you need one span.

Usage

from transformers import pipeline
pii = pipeline("token-classification", model="shoresh-labs/seter-pii-he-ar-fast", aggregation_strategy="simple")
pii("שלום, קוראים לי יוסי כהן, 054-7812345")
# -> entity_group 'private_person' for 'יוסי כהן', 'private_phone' for '054-7812345'

The label names match openai/privacy-filter, so outputs can be swapped into pipelines built around it.

This is the recommended default; pin revision="v1.1.2" in production. For offline batch jobs that want the higher-accuracy model, use model="shoresh-labs/seter-pii-he-ar" with revision="v1.2". Previous fast weights: revision="v1.0".

Decoder: account clean-up and entity selection

The benchmark figures on this card are measured with the published decoder in seter_entities.py (MIT, no dependencies besides the model). Apply it to the pipeline output:

import os, sys
from huggingface_hub import hf_hub_download
sys.path.insert(0, os.path.dirname(hf_hub_download("shoresh-labs/seter-pii-he-ar-fast", "seter_entities.py")))
from seter_entities import calibrate, select_entities

calibrate(pii.model)        # fast model: account-number calibration (no-op for the large model)
text = 'ת"ז 039876541, מספר לקוח 448812'
ents = select_entities(text, pii(text))                       # default: account clean-up (both numbers stay masked)
ids = select_entities(text, pii(text), preset="strict-ids")   # the ID stays masked; the customer number does not
PresetWhat happens to account_number spans
defaultAccount clean-up. Edge punctuation is trimmed; full dates and times are dropped; a number is dropped when the nearest word before it names a non-personal code (order, invoice, ticket, reference, case, tracking, SKU, version, booking, … in Hebrew, Arabic and English) and no identity word is as close. IBAN, card and passport shapes are always kept.
strict-ids (optional)The clean-up, then only identity and financial numbers stay masked: national / identity numbers, passports, driving licences, payment cards (including masked and last-4 forms), tax ids, bank accounts, IBANs. Customer / client / user / member / employee / student / patient ids, medical-file numbers, insurance policy numbers, professional licence numbers, reference-style codes and card expiry dates are left in the text.
noneThe spans exactly as the model returned them.

Person, address, phone and email spans are never changed. select_entities accepts the pipeline's list of dicts or [start, end, label] spans and returns the same shape. calibrate(model) subtracts the fast model's account-number logit offset (1.0) once; for ONNX, subtract ACCOUNT_BIAS from the B-/I-account_number logits before the argmax. A JavaScript port, entities.js, gives the same spans and runs in the demo Space, which has a strict-ids toggle.

Trade-off: on the 150 held-out documents above, written under Seter's own labelling policy, the v1.1.2 int8 file with strict-ids moves character precision from .931 to .937 and recall from .979 to .945 (F1 .954 → .941, against the default decoder), because the preset unmasks numbers that policy treats as personal. Use it when your policy matches the list above. REDACT figures with strict-ids are under Benchmarks.

Changelog

  • Decoder update (26 Nov 2026, seter_entities.py 1.1.0): the account-number clean-up used for this card's benchmark figures is now part of the published decoder and on by default (preset="none" returns the raw spans); calibrate(model) adds the fast model's account-number calibration; the demo uses both. strict-ids now sits on top of the default decoder (the fast int8 strict-ids column moved from .901 to .903). Held-out figures with the published decoder were added. The model files are unchanged, so there is no new revision tag: revision="v1.1.2" loads the same files, and the helper is read from main.
  • Helper and card update (26 Nov 2026): added seter_entities.py with the optional strict-ids entity-selection preset, and strict-ids columns under Benchmarks. The model files are unchanged, so there is no new revision tag: revision="v1.1.2" loads the same files, and the helper is read from main. Default output is unchanged.
  • v1.1.2 (25 Nov 2026): new onnx/model_quantized.onnx (int8) only; onnx/model.onnx and the safetensors weights are unchanged. The v1.1.1 int8 file lost about 13 points on REDACT Hebrew final (F1 0.765). The v1.1.2 int8 file scores 0.897 there, vs 0.900 for fp32. It is 369 MB. English drops from 0.880 to 0.871.
  • v1.1.1 (17 Nov 2026): same weights as v1.1. ONNX files re-exported under the transformers version the model was trained and scored with: the fp32 file now equals the PyTorch model (held-out F1 0.931 → 0.947) and the int8 file scores 0.943 (was 0.930). config.json gained global_rope_theta / local_rope_theta so that transformers 4.x computes the same model as transformers 5.
  • v1.1 (12 Nov 2026): retrained on document-length synthetic records with the classes of the large v1.2 model plus nicknames, surnames standing alone, 8-digit passport numbers and screen names; distilled from the large v1.2 model. On the held-out documents F1 0.870 → 0.947 (mean of 3 seeds 0.942) and stray spans 984 → 317. REDACT F1 +0.055 / +0.020 / +0.044 (Hebrew / Arabic / English, mean of 3 seeds). Released as an exception to the release rule because of a recall loss on English screen names (see Results). New ONNX files. The previous weights remain available as revision v1.0.
  • v1.0 (25 Oct 2026): first fast release, including int8 ONNX for the browser demo.

License

MIT, same as the base model.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForTokenClassification
Ревизия весов
4242f90

0 моделей