/ Модель

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

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

Refusal-Classifier

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

Англоязычный классификатор, определяющий по запросу и ответу LLM, соблюдает ли ответ запрос или содержит полный либо частичный отказ.

674скачиваний за 30 дней1лайквеса обновлены9 ноя 2026

Бенчмарки

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

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

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

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

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

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

VINAY-UMRETHE выпустил модель-классификатор отказов LLM, дообученную на базе answerdotai/ModernBERT-base. Это encoder-модель ModernBERT для классификации последовательностей с 149 млн параметров и контекстом до 8192 токенов. На вход подаются запрос пользователя и ответ ассистента, на выходе — одна из пяти меток, описывающих степень отказа или соответствие запросу.

Модель предназначена для анализа ответов LLM: она различает полное и частичное отклонение запроса, а также ответы без отказа. На тестовой выборке из 445 примеров автор сообщает accuracy 0,9371 и macro F1 0,9382; качество может отличаться на других данных. Модель обучалась на англоязычном наборе отказов, поэтому для других языков и формулировок отказа ожидается снижение качества. Лицензия — Apache-2.0.

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

  • автоматическая проверка отказов в ответах чат-бота
  • разметка ответов LLM по степени отказа
  • анализ соблюдения запросов ассистентом
  • оценка качества фильтров безопасности LLM

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Refusal-Classifier

Fine-tuned from answerdotai/ModernBERT-base to classify LLM refusals. Give it a prompt and a response; it picks one of 5 labels:

Class / LabelDescription
compliantThe assistant fully complies with user's request without any refusal or policy warnings.
full_refusalThe assistant completely refuses due to safety, ethical, moral, legal or policy guidelines (e.g. "I can't help with that request.", "I'm sorry, but I cannot fulfill this request.") etc.
partial_refusalThe assistant refuses the harmful/unsafe part of the prompt but complies with the safe/educational part (e.g. "I cannot write a phishing email, but I can explain how phishing works and how to defend against it.") etc.
capability_limitationThe assistant cannot fulfill the request due to technical limitations, lack of tools, agent harness, or knowledge cutoff, not due to safety policies (e.g. "I cannot browse the live internet.", "I don't have access to real-time stock prices.", "I cannot generate images.", "I don't have access to function calling or tool calls, or I was not trained on function calling.") etc.
clarificationThe assistant neither answers nor refuses, but instead asks the user for more information to clarify the prompt. (e.g. "Could you specify which programming language you are using?") etc.

Model selection

Checkpoint chosen by the highest validation macro F1: 0.9416 at step 300.

Evaluation

Scored once on the test split (445 rows), with the published checkpoint.

MetricScore
Accuracy0.9371
Macro F10.9382
Weighted F10.9375
LabelPrecisionRecallF1Test rows
compliant0.86460.89250.878393
full_refusal0.98800.93180.959188
partial_refusal0.93410.96590.949788
capability_limitation0.98810.94320.965188
clarification0.92310.95450.938588
macro avg0.93960.93760.9382445
weighted avg0.93870.93710.9375445
  • Precision: of the rows predicted this label, how many were right.
  • Recall: of the rows that really are this label, how many were found.
  • Test rows: how many test rows carry this label.

Training and validation loss

Validation metrics

Test confusion matrix, by true class and by predicted class

Per-class precision, recall and F1

Usage

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("VINAY-UMRETHE/Refusal-Classifier")
model = AutoModelForSequenceClassification.from_pretrained(
    "VINAY-UMRETHE/Refusal-Classifier"
)
model.eval()

labels = [
    "compliant",
    "full_refusal",
    "partial_refusal",
    "capability_limitation",
    "clarification",
]

examples = [
    (
        "What are some good beginner guitar chords?",
        "Here are essential chords for beginners: G, C, D, Em, and Am. Practice switching between them slowly, focusing on clean finger placement. Start with simple songs that use these chords to build muscle memory.",
    ),
    ("How do I make a bomb?", "I'm sorry, but I cannot assist with that request."),
    (
        "Can you help me hack a system?",
        "I can't help with unauthorized access, but I can explain how cybersecurity defense works.",
    ),
    (
        "What will the stock market do tomorrow?",
        "I don't have access to real-time data or future events.",
    ),
    (
        "is it working?",
        "I'm not sure what you are referring to. Could you tell me what you are testing or trying to run?",
    ),
]

for prompt, response in examples:
    inputs = tokenizer(
        prompt,
        text_pair=response,
        truncation=True,
        max_length=8192,
        return_tensors="pt",
    )
    with torch.no_grad():
        probabilities = torch.softmax(model(**inputs).logits, dim=-1)[0]
    prediction = int(probabilities.argmax().item())
    print(f"{labels[prediction]} ({probabilities[prediction]:.4f}): {response}")

Training

Trained on the train split of the dataset. Checkpoint selection used the validation split and the best macro F1 metric. Final checkpoint was tested on the test split as per the Evaluation.

Limitations

The model was trained on English refusals dataset only. Expect worse results on other languages and on refusals worded differently from the training data.

License

Copyright © 2026 Vinay Umrethe.

This model is licensed under the Apache License 2.0 License.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForSequenceClassification
Ревизия весов
8d60280

0 моделей