/ Модель

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

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

maschera-ch-v63b

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

MASCHERA CH v63b — модель разметки токенов для поиска персональных данных в швейцарских документах перед их передачей сторонним ИИ-сервисам.

53скачиваний за 30 дней0лайковвеса обновлены15 окт 2026

Бенчмарки

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

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

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

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

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

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

MASCHERA CH v63b — модель разметки токенов, разработанная для распознавания персональных данных в документах Швейцарии. Она основана на jhu-clsp/mmBERT-base с архитектурой ModernBERT и дообучена для классификации токенов по BIO-схеме. Модель содержит 306,9 млн параметров, принимает текст и поддерживает контекст до 8192 токенов. Она распознаёт имена, адреса, даты и швейцарские идентификаторы, включая AHV, UID, IBAN, QR-ссылки и GLN; доступны немецкий, французский, итальянский и английский языки.

Модель предназначена для этапа распознавания в MASCHERA: найденные фрагменты заменяются заполнителями перед передачей текста стороннему ИИ-сервису. В оценке на девяти реальных документах утечка составила 1,27%, а micro-F1 — 0,736; на синтетическом наборе показатели выше и не отражают полностью качество на реальной переписке. Модель может пропускать данные и чрезмерно расширять маскировку, поэтому результат требует проверки человеком. Она ориентирована на швейцарские форматы, не поддерживает романшский и сама по себе не гарантирует соблюдение требований защиты данных. Лицензия — MIT.

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

  • поиск имён и фамилий в швейцарской деловой переписке
  • распознавание швейцарских адресов и почтовых индексов
  • выявление AHV, UID, IBAN и других швейцарских идентификаторов
  • подготовка документов к псевдонимизации перед отправкой в ИИ-сервис

Ограничения

Обучена на синтетических документах; на небольшом наборе из девяти реальных документов утечка составила 1,27%, поэтому результат необходимо проверять человеком. Ориентирована на швейцарские форматы и не поддерживает романшский; длинные документы при прямом использовании нужно разбивать на окна.

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

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

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

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

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

Открыть на Hugging Face

maschera-ch-v63b

Use it: MASCHERA is the free desktop app (Windows, macOS, Linux, Docker) that runs this model to mask and anonymise personal data in Swiss documents before they go to an AI service. Source: github.com/semprerudi/maschera.

Token classification for personal data in Swiss documents in the three national languages German, French and Italian, as well as in English. Rumantsch is not supported.

It labels spans that carry personal data so they can be replaced by placeholders before a text is handed to an AI service.

Sehr geehrte Frau Brülhart      ->   Sehr geehrte Frau [FULLNAME_1]
AHV 756.1234.5678.97            ->   AHV [AHVN13_1]
Lindenstrasse 12, 3011 Bern     ->   [STREET_1] [BUILDINGNUM_1], [ZIPCODE_1] [CITY_1]

Where it is used

This model is the recognition stage of MASCHERA, a local masking tool for Swiss documents. MASCHERA fetches or bundles exactly this model; it runs on your own device and sends nothing anywhere.

What it is

Base modeljhu-clsp/mmBERT-base (ModernBERT), 22 layers, 308M parameters
Tasktoken classification, BIO
Labels91 BIO labels over 45 tags, frozen contract b7a96dc9
Context512 tokens; longer documents are windowed by the tool
Weightsmodel.safetensors, 1.2 GB
Training datasynthetic only — it has never seen a real document

The tag set covers Swiss identifiers with checksums (AHV, UID, IBAN, QR reference, GLN), addresses, names, dates, and administrative references. The full taxonomy lives in the repository.

How good it is

Two measurements. Both are here, not only the friendlier one.

syntheticgold documents
Size2000 documents, 29,210 gold spans9 documents, 280 gold spans
Leak rate0.02 % (13 leaks)1.27 % (6 leaks)
Micro-F10.9970.736
Over-masking8495
Reproducibleyesno

The synthetic figure is the reproducible one. Measured with MASCHERA 1.0.1 (python3 tools/mess_synthetisch.py --model runs/ch-v63b --n 2000); the documents depend on the templates and the generator, so the numbers change if those change. The documents are generated from the templates and nomenclatures in the repository; the values come from a holdout zone, so no value in the measurement was seen during training. That separates "recognises names" from "memorised a list" — but it does not replace real documents.

⚠️ The gold documents cannot be recomputed by anyone. They contain real personal data and are not published. There are nine, hand-marked. It is the most honest figure available and the least comfortable one.

⚠️ This test set resolves very little. Earlier evaluations on an older version of the test set (four training runs, each evaluated after epoch 2 and after epoch 3, eight evaluations in total) ranged from 0.769 to 0.833 micro-F1. Two models less than about 0.06 micro-F1 apart (roughly ±0.03) cannot be told apart by it. The 0.736 above was measured on the current test set and is not directly comparable to that range.

⚠️ Over-masking is not a leak. One word too many costs readability; one word too few costs personal data. The model is tuned towards the second.

What this means in practice

The leak rate on real documents is around one percent, not zero. Review the masked text before you pass it on. This is pseudonymisation, not anonymisation: as long as the dictionary exists the step is reversible, and under Swiss data protection law the data remain personal data.

Intended use

Masking personal data in Swiss administrative and business correspondence before it is given to a third-party AI service, with a human reviewing the result. It is a preparation step, not a compliance guarantee.

Not intended for unattended redaction, automated decisions, or as the sole safeguard before publishing a document.

How it was trained

Trained on synthetic data generated from the templates and nomenclatures of the repository. Values are drawn from open Swiss administrative sources (see Data sources below); no real document was used.

Epochs3
Learning rate3e-5, linear, warmup 0.1
Batch8 × 2 (gradient accumulation)
Weight decay0.01
Precisionbf16
max_length512
Training seed4711

Read from the run's training_args.bin, not copied from defaults.

⚠️ The seed of the training set is not recorded anywhere. The generator writes it into the header of the dataset it produces, but that file is not published. The path is reproducible; the exact run is not quite.

The generator, the templates and the nomenclatures are in the repository, so a comparable model can be built from scratch.

Data sources

The nomenclatures come from open Swiss government data. All of them require attribution:

  • Surnames, given names — Federal Statistical Office (BFS)
  • Localities with postal codes, streets — Federal Office of Topography (swisstopo)
  • Places of origin — Federal Office of Justice, eCH-0135
  • Company names — Zefix / EHRA via LINDAS, terms: Provide-the-Source

Limitations

  • Trained on synthetic documents. Real correspondence is messier.
  • The 512-token window is handled by the tool, not by the model. Used directly, long documents must be windowed by the caller.
  • Recognition is statistical and incomplete; it misses things and masks too much when in doubt.
  • Swiss-specific. The tag set and the anchors assume Swiss formats and the three official languages plus English. Rumantsch is not supported — neither the patterns nor the training data cover it.

Licence

Model weights: MIT.

Built on the idea of rizzo-pii by Simone Rizzo (MIT). No affiliation with that project.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей