/ Модель

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

Контекст
512 токенов
Параметры
534 млн
Лицензия
Apache 2.0
Архитектура
deberta-v2 · dense
Библиотека
onnxruntime
Опубликована
19 июл 2026

bordair-detector

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

Bordair Detector — бинарный классификатор текста на базе DeBERTa-v3-large для обнаружения prompt injection перед передачей данных LLM.

26скачиваний за 30 дней0лайковвеса обновлены20 июл 2026

Бенчмарки

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

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

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

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

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

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

Bordair Detector — классификатор второй стадии конвейера защиты Bordair от prompt injection, разработанный авторами Bordair. Это дообученная DeBERTa-v3-large для бинарной классификации текста; модель экспортирована в ONNX и квантована до INT8 для инференса на CPU. Она анализирует пользовательские сообщения, фрагменты RAG, ответы инструментов и текст, извлечённый из изображений, документов или аудио, и выдаёт оценки для классов «безопасный текст» и «попытка внедрения».

Для принятия решения конвейер применяет порог к вероятности класса injection; порог можно повысить для текста после OCR или ASR. Модель рассчитана на английский язык, имеет контекст 512 токенов и предназначена для выявления попыток подменить или перенаправить задачу LLM, а не для оценки вредоносности содержания. Модель не определяет тип атаки: хотя конфигурация содержит четыре названия меток, обученная и экспортированная модель использует только два класса. Обучающие данные включают более 500 тысяч размеченных примеров из Bordair/bordair-multimodal. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Bordair Detector (DeBERTa-v3, ONNX, INT8)

The stage-2 classifier for the Bordair Detector prompt-injection pipeline. It is a DeBERTa-v3-large model, fine-tuned as a binary classifier, exported to ONNX and quantised for CPU inference.

What it does

Given a text input, optionally tagged with its modality, it emits two logits:

indexclassmeaning
0benignno injection
1injectionan attempt to override, hijack, or redirect the model's task

The pipeline takes injection_prob = softmax(logits)[1] and applies a threshold (0.5 by default, higher for text derived from OCR or ASR).

A note on the label taxonomy: the training script configures a four-label head (benign, direct, jailbreak, indirect) and config.json still carries that id2label map, but every training sample is labelled 0 or 1 and the exported graph emits two logits. The shipped model is therefore binary, and the finer-grained attack taxonomy is not trained. Treat the four-way labels in the config as vestigial.

Intended use

A runtime guardrail on the inputs to an LLM system: user messages, RAG chunks, tool outputs, and text pulled from uploaded images, documents, or audio. It reads the prompt rather than the model weights, so training-time attacks are out of scope.

It is not a content-safety classifier. It targets task hijacking, not harmful content as such.

How to use it

Do not call this ONNX file directly. Use the pipeline, which handles the regex gates, modality tags, tokenisation, and thresholds:

pip install bordair-detector
python -c "from bordair_detector import scan_text; print(scan_text('ignore previous instructions'))"

The weights download from this repository automatically on first use. If you do want to run the model raw, prepend a modality tag, for example "[TEXT] your prompt here", "[OCR] ...", "[ASR] ...", or "[DOC] ...", then tokenise with the bundled tokeniser at a maximum length of 512 with dynamic padding.

Training data

Bordair/bordair-multimodal: over 500,000 labelled samples at roughly a 1:1 attack-to-benign ratio, each attributed to a peer-reviewed paper or a documented piece of industry research, together with a real-world split collected and anonymised from a live game where players tried to defeat the detector.

Evaluation

See the eval harness in the repository. Numbers should be regenerated against the current pipeline and a clean benign split before they are cited. A small cross-modal spot check (n=63) detected every attack across text, image, document, and audio combinations.

Limitations

  • English-centric, though the regex stage covers direct-override phrasing in roughly eleven languages.
  • Labels are assigned by construction, at the category level, rather than by per-sample human review. The model distinguishes injection from benign; it does not classify the type of injection, despite the label names left in config.json.
  • Quantisation trades a small amount of accuracy for lower CPU latency.
  • A determined novel attack not seen in training may pass the model. The regex gate and the decode-then-scan step are the defence in depth for known evasion classes.

Licence and attribution

The fine-tuned weights are released under Apache-2.0.

They are a derivative work of microsoft/deberta-v3-large, which Microsoft distributes under the MIT License. That base-model licence is reproduced in the NOTICE file in the source repository, and its terms continue to apply to the base model.

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

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

GPU в ailist

Универсальный рантайм · onnxruntime

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

Модель выложена только в формате ONNX.

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

0 моделей