/ Модель

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

Лицензия
Своя лицензия
Базовая модель
ModernBERT-base
Библиотека
transformers
Опубликована
10 авг 2026

bolt-cls-pii

Классификация текстаТекст → label5 профессий

Англоязычный классификатор AI Squared, который отмечает текстовые запросы с вероятными персональными данными для последующей проверки.

11скачиваний за 30 дней1лайквеса обновлены8 сен 2026

Бенчмарки

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

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

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

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

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

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

Bolt CLS PII — англоязычный бинарный классификатор текста от AI Squared для выявления вероятного наличия персональных данных в тексте запросов. Модель предназначена для предварительной фильтрации в конвейере безопасности: она присваивает тексту оценку, по которой можно направить подозрительный запрос на дополнительную проверку. Также её можно применять отдельно, когда достаточно бинарного флага о возможном наличии PII.

Модель построена на ModernBERT-base с архитектурой ModernBertForSequenceClassification: базовые веса заморожены, обучалась только классификационная голова. Максимальная длина входа — 8192 токена. Обучение использовало взвешенную focal loss с повышенным весом положительного класса, чтобы увеличить полноту обнаружения. В README рекомендован порог 0,5238 для самостоятельной классификации и более низкий порог 0,10 для предварительного фильтра, за которым следует проверяющая модель.

Модель определяет наличие PII на уровне всего текста, но не находит конкретные фрагменты и не выполняет извлечение или редактирование персональных данных. Качество на типах данных и в предметных областях, отсутствовавших в оценочном наборе, не гарантируется; порог следует проверить для нового сценария. В карточке Hugging Face указана лицензия other; конкретные условия лицензии в доступных данных не раскрыты.

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

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

Ограничения

Модель классифицирует текст целиком и не выделяет фрагменты с PII, не извлекает и не редактирует персональные данные. Качество на типах данных, не представленных в оценочном наборе, не гарантируется; для новых сценариев рекомендуется проверить порог.

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

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

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

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

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

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

Открыть на Hugging Face

Bolt CLS PII

Bolt CLS PII is a binary text classifier for detecting personally identifiable information (PII) in raw text. It is one of four Bolt CLS classifiers (PII, Content, Jailbreak, Router) used together in the production request-safety pipeline.

Model Overview

Bolt CLS PII is trained specifically to flag whether a piece of raw text is likely to contain personally identifiable information, acting as the first-pass sieve in front of a heavier downstream reviewer model.

Key design goals:

  • Very high recall (catch nearly all PII-bearing prompts) even at the cost of precision
  • Fast, lightweight scoring suitable for gating every request in a production pipeline
  • A calibrated score that downstream systems can threshold for different use cases

Model Details

  • Type: Text classifier (binary, single-label)
  • Architecture: ModernBERT (ModernBertForSequenceClassification)
  • Base model: answerdotai/ModernBERT-base — frozen during training (only the classification head was trained). This was internally verified against the training run's own configuration and evaluation records.
  • Hidden size: 768 · Layers: 22 · Attention heads: 12
  • Max input length: 8,192 tokens
  • Pooling: mean

Training Data

Training data combines three sources:

  • An in-house PII dataset, providing entity-level labeled examples of PII-bearing text.
  • unsloth/alpaca-cleaned, a public general-instructions dataset, used as clean negatives.
  • nvidia/Nemotron-PII, a public PII-spans dataset, providing additional PII-bearing examples with its own span labels.

The combined data is split 90% train / 10% test (seed 42). Exact label counts and dataset composition are not published in this card. The specific PII types represented follow whatever the in-house dataset and Nemotron-PII's own entity/span labels cover.

Training

Trained with AI Squared's internal classifier training pipeline, shared across all four Bolt CLS classifiers. This is a frozen-base run — only the classification head was trained on top of the frozen ModernBERT-base.

  • Objective/loss: weighted focal loss (γ = 2.0 by default) on top of standard cross-entropy, with inverse-class-frequency weighting plus an extra ×2.0 multiplier on the positive (PII) class — biases the model toward catching positives, consistent with the sieve design.
  • Threshold selection: after training, the eval-split positive-class scores are swept to find the F1-optimal decision threshold (ties broken by recall, then precision); that threshold and its metrics are saved to threshold.json and shipped with the model — this is the same file Threshold Guidance below is drawn from.
  • Hardware: Nvidia H200

Threshold Guidance

Two thresholds are relevant to this model:

ThresholdValueWhere it's used
F1-optimal0.5238The threshold that maximizes F1 on the held-out eval set — use this if consuming the raw score standalone.
Production sieve threshold0.10The low threshold the production sieve stage uses to flag prompts for PII. Set deliberately low because a sieve flag is not a hard block — it routes to a downstream reviewer model for the final decision, so false positives are cheap and false negatives are the thing to avoid.

If you're integrating this model outside of the production sieve, default to the F1-optimal threshold (0.5238) unless you have the same "flag → human/model review" downstream step, in which case the lower 0.10 threshold is appropriate.

Evaluation

Reported production target: ~0% FPR at near-100% accuracy at the operating threshold. Held-out eval metrics at the F1-optimal threshold (0.5238):

MetricValue
Accuracy0.99936
F10.99952
Precision0.99926
Recall0.99979

Intended Use

  • Low-threshold pre-filter (sieve) in the production request pipeline, flagging prompts that may contain PII for downstream review by a larger reviewer model.
  • Standalone PII detection where a binary flag on raw text is sufficient.

Out of scope: entity-level PII extraction/redaction (this model classifies, it does not locate or redact specific spans), and any use as a sole/final blocking decision without a secondary reviewer — per the sieve design, it is a first-pass flag, not a final call.

Deployment Notes (Hugging Face Inference Endpoints)

If you're deploying this model on HF Inference Endpoints:

  1. The two frontmatter lines above are required. Without pipeline_tag and library_name set, HF cannot identify this repo's task/architecture, which blocks every specialized engine (vLLM, TEI, TGI, SGLang) from even appearing as selectable options — you'll only see "Default," along with a "no handler.py found" warning. Adding these two lines is what unlocks the full engine list on the deployment screen.
  2. Manually select vLLM as the Inference Engine on the deployment screen — it is not selected by default, and the default recommendation may pick a different engine that doesn't correctly support this architecture's classification head. This has to be set explicitly every time you create a new endpoint; it is not remembered from prior deployments and cannot currently be pinned via any repo file.
  3. No handler.py or requirements.txt is needed once vLLM is selected — vLLM reads config.json directly.

Usage

from transformers import pipeline

classifier = pipeline("text-classification", model="aisquared/bolt-cls-pii")
result = classifier("Your text here")
print(result)

Limitations

  • Classifies at the document/prompt level, not span-level — does not identify which text is PII, only whether PII is likely present.
  • Evaluated against an internal PII eval set; performance on domains/PII types not represented there is not guaranteed.
  • As with any threshold-based classifier, behavior near the threshold boundary should be spot-checked before relying on it in a new context.

License

Bolt CLS PII is released under the AI Squared Community License.

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

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

GPU в ailist

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

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
b61df7f

0 моделей