Views
No views yet
<|...|> as an ellipsis placeholder in the middle of omitted content.<|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...1from transformers import pipeline
2
3classifier = pipeline(
4 task="text-classification",
5 model="agentlans/multilingual-e5-small-refusal-classifier"
6)
7
8text = (
9 "<|user|>Mr. Loyd wants to fence his square-shaped land of 150 sqft each side. "
10 "If a pole is laid every certain distance, he needs 30 poles. "
11 "What is the distance between each pole in feet?"
12 "<|assistant|>If Mr. Loyd's land is square-shaped and each side is 150 sqft, then<|...|>"
13 "ce between poles ≈ 20.69 sqft\n\nTherefore, the distance between each pole is approximately 20.69 feet."
14)
15
16print(classifier(text))
17# [{'label': 'Non-refusal', 'score': 0.9906}]| Example | English | French | Spanish | Chinese | Russian | Arabic |
|---|---|---|---|---|---|---|
| 1 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 2 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 3 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 4 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 5 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
| 6 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 7 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 8 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
| 9 | ◯ | 🚫 | ◯ | ◯ | 🚫 | 🚫 |
| 10 | ◯ | ◯ | ◯ | ◯ | ◯ | ◯ |
ADAMW_TORCH_FUSED (betas=(0.9, 0.999), epsilon=1e-8)