Text Classification
Transformers
Safetensors
deberta-v2
agents
agent-safety
tool-use
prompt-injection
deberta-v3
text-embeddings-inference
Instructions to use kontext-security/Merlin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kontext-security/Merlin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="kontext-security/Merlin")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("kontext-security/Merlin") model = AutoModelForSequenceClassification.from_pretrained("kontext-security/Merlin", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 888 Bytes
21b6f2c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | {
"schema_version": 1,
"model_name": "Merlin",
"task": "contextual_tool_invocation_safety",
"labels": {
"0": "safe",
"1": "unsafe"
},
"default_threshold": 0.5,
"calibration": {
"method": "sigmoid_on_unsafe_logit_margin",
"coefficient": 1.427213430140093,
"intercept": 2.953687013257505
},
"preprocessing": {
"max_length": 512,
"history": "thought_free_canonical_json",
"current_action": "tool_name_and_arguments",
"field_budgets": {
"request": 96,
"history": 144,
"action": 128,
"schema": 128
},
"field_markers": {
"request": "[USER_REQUEST]",
"history": "[INTERACTION_HISTORY]",
"action": "[CURRENT_ACTION]",
"schema": "[TOOL_DESCRIPTIONS]"
}
},
"base_model": {
"id": "microsoft/deberta-v3-xsmall",
"revision": "4b419818330868dff6a60ad3e6b1c730f8b8c0c6"
}
}
|