Text Classification
Transformers
ONNX
Safetensors
Transformers.js
English
modernbert
refusal-detection
over-refusal
llm-safety
red-teaming
garak
guardrails
ai-security
tamarillo
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run Tamarillo/refusal-guard-tiny-en on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Tamarillo/refusal-guard-tiny-en. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Tamarillo/refusal-guard-tiny-en on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Tamarillo/refusal-guard-tiny-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/refusal-guard-tiny-en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Tamarillo/refusal-guard-tiny-en")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/refusal-guard-tiny-en") model = AutoModelForSequenceClassification.from_pretrained("Tamarillo/refusal-guard-tiny-en", device_map="auto") - Transformers.js
How to use Tamarillo/refusal-guard-tiny-en with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'Tamarillo/refusal-guard-tiny-en'); - Notebooks
- Google Colab
- Kaggle
Release Tamarillo/refusal-guard-tiny-en (32M Apache-2.0 garak drop-in, 100%-parity FP32/FP16/Gather-INT8 ONNX, Stage-2 PASS)
217d858 verified Download eval_results.json from Tamarillo/refusal-guard-tiny-en: direct link, hf CLI and curl.
- Browser
- Download file 12.7 kB
-
https://huggingface.co/Tamarillo/refusal-guard-tiny-en/resolve/main/eval_results.json
- Command line
-
hf download hf://Tamarillo/refusal-guard-tiny-en/eval_results.json
-
curl -L -o eval_results.json https://huggingface.co/Tamarillo/refusal-guard-tiny-en/resolve/main/eval_results.json
12.7 kB
| { | |
| "models": { | |
| "tamarillo-refusal-tiny-en": { | |
| "model_path": "/mnt/disks/gcs/runs/tamarillo-lab-v3/outputs/97bfcf9f6854/tiny-en", | |
| "params_m": 32.03, | |
| "native_max_length": 2048, | |
| "id2label": { | |
| "0": "non-refusal", | |
| "1": "refusal" | |
| }, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.7906, | |
| "macro_f1": 0.4396, | |
| "refusal_f1": 0.6781, | |
| "recall": 0.5175, | |
| "precision": 0.9831, | |
| "fpr": 0.1261 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.6195, | |
| "macro_f1": 0.5426, | |
| "refusal_f1": 0.4724, | |
| "recall": 0.3158, | |
| "precision": 0.9375, | |
| "fpr": 0.0364 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.9465, | |
| "macro_f1": 0.8583, | |
| "refusal_f1": 0.8224, | |
| "recall": 0.9395, | |
| "precision": 0.7313, | |
| "fpr": 0.1677 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.4376, | |
| "macro_f1": 0.4019, | |
| "refusal_f1": 0.0, | |
| "recall": 0.0, | |
| "precision": 0.0, | |
| "fpr": 0.0017 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.9531, | |
| "macro_f1": 0.8961, | |
| "refusal_f1": 0.8854, | |
| "recall": 0.7944, | |
| "precision": 1.0, | |
| "fpr": 0.0 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.9821, | |
| "macro_f1": 0.9078, | |
| "refusal_f1": 0.9009, | |
| "recall": 0.8333, | |
| "precision": 0.9804, | |
| "fpr": 0.0167 | |
| } | |
| }, | |
| "gpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 14.78 | |
| }, | |
| "gpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 24.61 | |
| } | |
| }, | |
| "tamarillo-refusal-small": { | |
| "model_path": "/mnt/disks/gcs/runs/tamarillo-lab-v3/outputs/97bfcf9f6854/small", | |
| "params_m": 140.64, | |
| "native_max_length": 2048, | |
| "id2label": { | |
| "0": "non-refusal", | |
| "1": "refusal" | |
| }, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.7285, | |
| "macro_f1": 0.3773, | |
| "refusal_f1": 0.5859, | |
| "recall": 0.4188, | |
| "precision": 0.9751, | |
| "fpr": 0.1513 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.5758, | |
| "macro_f1": 0.5366, | |
| "refusal_f1": 0.4578, | |
| "recall": 0.3, | |
| "precision": 0.9661, | |
| "fpr": 0.0182 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.9427, | |
| "macro_f1": 0.8731, | |
| "refusal_f1": 0.8328, | |
| "recall": 0.8683, | |
| "precision": 0.8, | |
| "fpr": 0.1054 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.9615, | |
| "macro_f1": 0.8648, | |
| "refusal_f1": 0.8301, | |
| "recall": 0.9431, | |
| "precision": 0.7413, | |
| "fpr": 0.1599 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.9966, | |
| "macro_f1": 0.9666, | |
| "refusal_f1": 0.9657, | |
| "recall": 0.9389, | |
| "precision": 0.9941, | |
| "fpr": 0.0056 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.9942, | |
| "macro_f1": 0.9666, | |
| "refusal_f1": 0.9658, | |
| "recall": 0.9417, | |
| "precision": 0.9912, | |
| "fpr": 0.0083 | |
| } | |
| }, | |
| "gpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 31.24 | |
| }, | |
| "gpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 36.56 | |
| } | |
| }, | |
| "garak-refusal-detector": { | |
| "model_path": "garak-llm/garak-refusal-detector", | |
| "params_m": 149.61, | |
| "native_max_length": 2048, | |
| "id2label": { | |
| "0": "refusal", | |
| "1": "non-refusal" | |
| }, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.9403, | |
| "macro_f1": 0.5751, | |
| "refusal_f1": 0.8303, | |
| "recall": 0.7115, | |
| "precision": 0.9967, | |
| "fpr": 0.0336 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.7055, | |
| "macro_f1": 0.5814, | |
| "refusal_f1": 0.5214, | |
| "recall": 0.3526, | |
| "precision": 1.0, | |
| "fpr": 0.0 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.9266, | |
| "macro_f1": 0.7983, | |
| "refusal_f1": 0.7017, | |
| "recall": 0.5587, | |
| "precision": 0.9429, | |
| "fpr": 0.0164 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.8962, | |
| "macro_f1": 0.5998, | |
| "refusal_f1": 0.3599, | |
| "recall": 0.2206, | |
| "precision": 0.9764, | |
| "fpr": 0.0026 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.9419, | |
| "macro_f1": 0.5006, | |
| "refusal_f1": 0.2938, | |
| "recall": 0.1722, | |
| "precision": 1.0, | |
| "fpr": 0.0 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.8637, | |
| "macro_f1": 0.3333, | |
| "refusal_f1": 0.0, | |
| "recall": 0.0, | |
| "precision": 0.0, | |
| "fpr": 0.0 | |
| } | |
| }, | |
| "gpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 29.85 | |
| }, | |
| "gpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 51.72 | |
| } | |
| }, | |
| "protectai-rejection-v1": { | |
| "model_path": "ProtectAI/distilroberta-base-rejection-v1", | |
| "params_m": 82.12, | |
| "native_max_length": 512, | |
| "id2label": { | |
| "0": "NORMAL", | |
| "1": "REJECTION" | |
| }, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.9495, | |
| "macro_f1": 0.8578, | |
| "refusal_f1": 0.9838, | |
| "recall": 0.9935, | |
| "precision": 0.9743, | |
| "fpr": 0.3697 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.6779, | |
| "macro_f1": 0.5974, | |
| "refusal_f1": 0.5652, | |
| "recall": 0.4105, | |
| "precision": 0.907, | |
| "fpr": 0.0727 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.9111, | |
| "macro_f1": 0.8195, | |
| "refusal_f1": 0.7545, | |
| "recall": 0.7384, | |
| "precision": 0.7714, | |
| "fpr": 0.1063 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.8373, | |
| "macro_f1": 0.4023, | |
| "refusal_f1": 0.0, | |
| "recall": 0.0, | |
| "precision": 0.0, | |
| "fpr": 0.0 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.7234, | |
| "macro_f1": 0.5357, | |
| "refusal_f1": 0.3628, | |
| "recall": 0.2278, | |
| "precision": 0.8913, | |
| "fpr": 0.0278 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.5353, | |
| "macro_f1": 0.3333, | |
| "refusal_f1": 0.0, | |
| "recall": 0.0, | |
| "precision": 0.0, | |
| "fpr": 0.0 | |
| } | |
| }, | |
| "gpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 6.66 | |
| }, | |
| "gpu_latency_2048": { | |
| "seq_len": 512, | |
| "p50_ms": 6.53 | |
| } | |
| }, | |
| "vinay-tiny-refusal": { | |
| "model_path": "VINAY-UMRETHE/tiny-refusal-classifier", | |
| "params_m": 1.65, | |
| "native_max_length": 2048, | |
| "id2label": { | |
| "0": "compliant", | |
| "1": "full_refusal", | |
| "2": "partial_refusal", | |
| "3": "capability_limitation", | |
| "4": "clarification" | |
| }, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.5772, | |
| "macro_f1": 0.4778, | |
| "refusal_f1": 0.9556, | |
| "recall": 0.9798, | |
| "precision": 0.9326, | |
| "fpr": 1.0 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.5828, | |
| "macro_f1": 0.3962, | |
| "refusal_f1": 0.7746, | |
| "recall": 0.9947, | |
| "precision": 0.6342, | |
| "fpr": 0.9909 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.5852, | |
| "macro_f1": 0.2493, | |
| "refusal_f1": 0.4916, | |
| "recall": 0.9947, | |
| "precision": 0.3265, | |
| "fpr": 0.9965 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.4195, | |
| "macro_f1": 0.2464, | |
| "refusal_f1": 0.491, | |
| "recall": 0.9947, | |
| "precision": 0.3259, | |
| "fpr": 0.9991 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.4357, | |
| "macro_f1": 0.3333, | |
| "refusal_f1": 0.6667, | |
| "recall": 1.0, | |
| "precision": 0.5, | |
| "fpr": 1.0 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.3371, | |
| "macro_f1": 0.3333, | |
| "refusal_f1": 0.6667, | |
| "recall": 1.0, | |
| "precision": 0.5, | |
| "fpr": 1.0 | |
| } | |
| }, | |
| "gpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 3.6 | |
| }, | |
| "gpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 8.89 | |
| } | |
| }, | |
| "garak-keyword-mitigation": { | |
| "model_path": "garak_keyword_baseline", | |
| "params_m": 0.0, | |
| "native_max_length": 0, | |
| "suites": { | |
| "ood_do_not_answer": { | |
| "n": 1800, | |
| "n_pos": 1681, | |
| "n_neg": 119, | |
| "roc_auc": 0.849, | |
| "macro_f1": 0.7005, | |
| "refusal_f1": 0.9313, | |
| "recall": 0.8828, | |
| "precision": 0.9854, | |
| "fpr": 0.1849 | |
| }, | |
| "ood_jbb_judge": { | |
| "n": 300, | |
| "n_pos": 190, | |
| "n_neg": 110, | |
| "roc_auc": 0.6459, | |
| "macro_f1": 0.569, | |
| "refusal_f1": 0.5259, | |
| "recall": 0.3737, | |
| "precision": 0.8875, | |
| "fpr": 0.0818 | |
| }, | |
| "heldout_wildguard_en": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.8367, | |
| "macro_f1": 0.7925, | |
| "refusal_f1": 0.7548, | |
| "recall": 0.9448, | |
| "precision": 0.6284, | |
| "fpr": 0.2714 | |
| }, | |
| "heldout_wildguard_jp": { | |
| "n": 1719, | |
| "n_pos": 562, | |
| "n_neg": 1157, | |
| "roc_auc": 0.5, | |
| "macro_f1": 0.4023, | |
| "refusal_f1": 0.0, | |
| "recall": 0.0, | |
| "precision": 0.0, | |
| "fpr": 0.0 | |
| }, | |
| "diag_phi4_disclaimer": { | |
| "n": 360, | |
| "n_pos": 180, | |
| "n_neg": 180, | |
| "roc_auc": 0.625, | |
| "macro_f1": 0.6205, | |
| "refusal_f1": 0.6617, | |
| "recall": 0.7333, | |
| "precision": 0.6027, | |
| "fpr": 0.4833 | |
| }, | |
| "diag_phi4_lc2048": { | |
| "n": 240, | |
| "n_pos": 120, | |
| "n_neg": 120, | |
| "roc_auc": 0.65, | |
| "macro_f1": 0.6465, | |
| "refusal_f1": 0.6818, | |
| "recall": 0.75, | |
| "precision": 0.625, | |
| "fpr": 0.45 | |
| } | |
| } | |
| } | |
| } | |
| } |