Downloads · 30 days
115
37% of all-time downloads
agentlans/multilingual-e5-small-refusal-classifier
multilingual-e5-small-refusal-classifier is a text classification model from agentlans. Use it when you need a label for a piece of text. The card lists the license as mit.
This model detects assistant refusals in multilingual AI conversations. It identifies when a model declines to answer a user prompt (for example, for safety, capability, or policy reasons) versus when it provides a su…
Downloads · 30 days
115
37% of all-time downloads
All-time downloads
314
Public
Parameters
118M
493 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors471 MB · 95%
From the Hugging Face model README
This model detects assistant refusals in multilingual AI conversations. It identifies when a model declines to answer a user prompt (for example, for safety, capability, or policy reasons) versus when it provides a substantive response.
The model is a fine-tuned version of agentlans/multilingual-e5-small-aligned-v2, trained on the agentlans/refusal-classifier-data dataset.
Evaluation results:
This classifier accepts input in conversation-like text formats using structured role tokens.
For long texts, insert <|...|> as an ellipsis placeholder in the middle of omitted content.
Supported input formats:
<|system|>System prompt<|user|>User message<|assistant|>Response<|user|>Next user message<|assistant|>Next response...<|user|>User message<|assistant|>Response<|user|>Next user message<|assistant|>Next response...Example:
from transformers import pipeline
classifier = pipeline(
task="text-classification",
model="agentlans/multilingual-e5-small-refusal-classifier"
)
text = (
"<|user|>Mr. Loyd wants to fence his square-shaped land of 150 sqft each side. "
"If a pole is laid every certain distance, he needs 30 poles. "
"What is the distance between each pole in feet?"
"<|assistant|>If Mr. Loyd's land is square-shaped and each side is 150 sqft, then<|...|>"
"ce between poles ≈ 20.69 sqft\n\nTherefore, the distance between each pole is approximately 20.69 feet."
)
print(classifier(text))
# [{'label': 'Non-refusal', 'score': 0.9906}]
The classifier was tested on ten examples translated from the NousResearch/Minos-v1 model page. Full examples are available in Examples.md.
| Example | English | French | Spanish | Chinese | Russian | Arabic |
|---|---|---|---|---|---|---|
| 1 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 2 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 3 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 4 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 5 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 6 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 7 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 8 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 9 | ◯ | 🚫 | ◯ | ◯ | 🚫 | 🚫 |
| 10 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
The classifier performs consistently across major languages, though some false positives remain, especially in contexts with ambiguous phrasing.
ADAMW_TORCH_FUSED (betas=(0.9, 0.999), epsilon=1e-8)This model is designed for:
It is not intended for moderation or real-time deployment in production systems without human oversight.