/ Модель

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

Контекст
512 токенов
Параметры
26,2 млн
Лицензия
Своя лицензия
Архитектура
bert · dense
Опубликована
2 июл 2026

redact

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

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

16 384скачиваний за 30 дней30лайковвеса обновлены25 ноя 2026

Бенчмарки

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

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

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

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

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

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

Redact — разработанная Desert Ant Labs мультиязычная модель для обнаружения и маскирования персональных данных непосредственно на устройстве. Она классифицирует токены в тексте, а отдельный слой шаблонов выявляет структурированные идентификаторы. Найденные значения заменяются метками, чтобы текст можно было передать LLM, а затем восстановить исходные значения в ответе.

Модель построена на BERT и содержит 26,2 млн параметров; в репозитории представлены сборки Core ML и LiteRT/TFLite. README указывает поддержку 27 языков и запуск на Apple-платформах, Android, Linux, Windows, в браузере и Node.js. Контекст модели — 512 токенов; SDK обрабатывает длинный текст перекрывающимися окнами по 256 токенов. Лицензия обозначена как other, поэтому условия следует сверить с карточкой модели перед использованием.

Redact распознаёт имена, адреса, электронную почту, телефоны, платёжные и государственные идентификаторы, IP-адреса и URL. README сообщает о высокой точности и сравнительных результатах на тестовых наборах, но полнота обнаружения зависит от языка и типа сущности: модель точнее на крупных языках ЕС, а мальтийский и ирландский названы наиболее слабыми среди языков ЕС. Организации обнаруживаются, но по умолчанию не маскируются.

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

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

Ограничения

Качество зависит от языка и типа сущности; в README мальтийский и ирландский отмечены как наиболее слабые среди языков ЕС. Организации не маскируются по умолчанию, а обнаружение зависит от порога уверенности и правил шаблонного слоя.

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

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

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

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

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

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

Открыть на Hugging Face

Redact

Filter PII on the device.

Multilingual on-device PII detection and redaction.

PlatformsiOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node
Languages27
Weightsv0.4.2
Demohttps://desertant.com/models/redact/

Strip names, addresses, emails, phone numbers, cards, IBANs and national IDs out of text before it leaves the device, across 27 languages. Redact replaces each one with a placeholder, so you can send the redacted text to an LLM and put the original values back in its reply. A token classifier finds names and addresses, and a pattern layer catches structured IDs. The model is 11.6MB as 4-bit Core ML on Apple platforms, or 24.5MB as int8 LiteRT on Android, Linux, Windows, Node and the web.

"Call Anna Kovács at anna@example.hu, IBAN GB29NWBK60161331926819" → "Call [GIVEN_NAME_1] [SURNAME_1] at [EMAIL_1], IBAN [BANK_ACCOUNT_1]"

Try it

Install

Swift (requirements)

.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "6.0.0")

Then add the Redact product to your target.

Kotlin (requirements)

implementation(platform("ai.desertant:bom:6.0.0"))
implementation("ai.desertant:redact")

JavaScript (requirements)

npm i @desert-ant-labs/redact @litertjs/core   # browser
npm i @desert-ant-labs/redact                  # Node, prebuilt native core

Usage

Swift

import Redact

let redact = Redact()
let result = try await redact.redaction(of: "Email Anna Kovács at anna@example.hu.")

print(result.redactedText)
// Email [GIVEN_NAME_1] [SURNAME_1] at [EMAIL_1].

for item in result.items {
    print(item.label.displayName, item.original, item.placeholder, item.confidence)
}

let reply = try await myLLM.rewrite(result.redactedText)
let restored = result.restore(reply)

Filter by category, or raise the confidence floor:

let options = Options(minimumConfidence: 0.7, labels: [.email, .phone, .creditCard])
let contactOnly = try await redact.redaction(of: text, options: options)

Kotlin

import ai.desertant.redact.Redact

Redact(context).use { redact ->
    val result = redact.redaction("Email Anna Kovács at anna@example.hu.")
    println(result.redactedText)                 // Email [GIVEN_NAME_1] [SURNAME_1] at [EMAIL_1].
    val restored = result.restore(llmReply)
}

JavaScript

import { Redact } from "@desert-ant-labs/redact";     // browser
// import { Redact } from "@desert-ant-labs/redact/native"; // server-side Node

const redact = await Redact.load();
const result = await redact.redaction("Email Anna Kovács at anna@example.hu.");
console.log(result.redactedText);   // Email [GIVEN_NAME_1] [SURNAME_1] at [EMAIL_1].
const restored = result.restore(llmReply);
redact.dispose();

Loading the model

The SDK downloads the weights from Hugging Face on first use and caches them. To prefetch the weights or ship them with your app, see model downloads and caching.

Runtime settings

By default the SDK drops model detections with a confidence below 0.6 (minimumConfidence). Pattern matches for structured data, like emails and card numbers, always apply. The SDK splits long text into 256-token windows that overlap by 64 tokens, so an entity on a window edge still comes back whole.

Labels

Redact detects 20 labels:

GIVEN_NAME, SURNAME, STREET_NAME, BUILDING_NUMBER, SECONDARY_ADDRESS, CITY, STATE, ZIP_CODE, EMAIL, PHONE, CREDIT_CARD, BANK_ACCOUNT, ROUTING_NUMBER, IP_ADDRESS, URL, GOVERNMENT_ID, PASSPORT, DRIVERS_LICENSE, TAX_ID, SSN.

Redact detects ORG (an organization or company name), but doesn't redact it by default, because a company isn't a natural person. With the ORG label, Redact recognizes names like Silverfin, Odoo or Visma Nova as organizations and doesn't mislabel them as a SURNAME. To redact organizations, pass ORG in the SDK's labels option.

Redact also flags IMEI (a device identifier), with a pattern check instead of the model. The check flags a 15-digit number only when the number passes the Luhn checksum and sits within 32 characters of the word "IMEI".

How it compares

We scored every system below with the same scoring code, on the same rows. Each system ran at its own operating point.

SystemRecallPrecisionSizeParams
redact88.899.611.6MB23M
GLiNER-PII91.190.42.3GB570M
Rampart61.497.214.7MB18.5M
OpenAI privacy filter60.293.53GB1.5B

Recall is the share of personal data a system masks fully, so none of it leaks. We macro-average recall over WikiANN, MultiNERD and a format-valid structured-PII set, across 24 EU languages. Precision is the share of masked spans that really were personal data, measured on the structured set. The size column shows the Core ML build that Redact uses on Apple platforms. On Android, Linux, Windows, the browser and Node, Redact uses the LiteRT build, which is 24.5MB.

Every false positive corrupts the text your LLM receives. We test for false positives on 11,528 rows in 27 languages that hold no personal data but look like they might: sentence-initial capitals, ALL-CAPS input, month and weekday names, UI vocabulary, bare numbers and company names. Redact returns 94.1% of those rows untouched.

AWS Comprehend, English only

AWS Comprehend isn't in the table above, because its PII API accepts only English. The API refuses every other language code, so we couldn't run Comprehend on the other 23 languages. Here are both systems on the same English rows:

SystemNames (WikiANN)Names (MultiNERD)StructuredEnglish composite
redact69.594.995.086.5
AWS Comprehend84.398.591.991.6

The table shows recall. Precision is close for both systems, 99.8 against 100.0. Comprehend is ahead of Redact on English names, and Redact is ahead on structured data. Comprehend runs in the cloud and bills per call.

Languages

Redact supports 27 languages: every official EU language, plus 3 more. The 27 languages use the Latin, Greek and Cyrillic scripts.

The 24 EU languages

CodeLanguage
bgBulgarian
hrCroatian
csCzech
daDanish
nlDutch
enEnglish
etEstonian
fiFinnish
frFrench
deGerman
elGreek
huHungarian
gaIrish
itItalian
lvLatvian
ltLithuanian
mtMaltese
plPolish
ptPortuguese
roRomanian
skSlovak
slSlovenian
esSpanish
svSwedish

Beyond the EU

CodeLanguage
nbNorwegian Bokmål
nnNorwegian Nynorsk
isIcelandic

Redact is most accurate on the largest EU languages. Maltese and Irish are the weakest of the 24. The per-language detection numbers are in the benchmark data.

License

Desert Ant Labs Source-Available License. Free for most apps, and a commercial license is required at scale. Full terms are at the link. Licensing: licensing@desertant.com.

Third-party notices for the weights: THIRD_PARTY_NOTICES.md.

Citation

@software{redact_2026,
  title  = {Redact: Multilingual on-device PII detection and redaction},
  author = {Desert Ant Labs},
  year   = {2026},
  url    = {https://huggingface.co/desert-ant-labs/redact},
}

© 2026 Desert Ant Labs · https://desertant.com

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей