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
Download merlin_config.json from kontext-security/Merlin: direct link, hf CLI and curl.
- Browser
- Download file 888 Bytes
-
https://huggingface.co/kontext-security/Merlin/resolve/main/merlin_config.json
- Command line
-
hf download hf://kontext-security/Merlin/merlin_config.json
-
curl -L -o merlin_config.json https://huggingface.co/kontext-security/Merlin/resolve/main/merlin_config.json
888 Bytes
| { | |
| "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" | |
| } | |
| } | |