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 onnx_benchmark.json from Tamarillo/refusal-guard-tiny-en: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/Tamarillo/refusal-guard-tiny-en/resolve/main/onnx_benchmark.json
- Command line
-
hf download hf://Tamarillo/refusal-guard-tiny-en/onnx_benchmark.json
-
curl -L -o onnx_benchmark.json https://huggingface.co/Tamarillo/refusal-guard-tiny-en/resolve/main/onnx_benchmark.json
2.89 kB
| { | |
| "threads": 4, | |
| "artifacts": { | |
| "fp32": { | |
| "filename": "onnx/model.onnx", | |
| "size_mb": 122.43, | |
| "parity_short": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 0.0, | |
| "mean_abs_prob_diff": 0.0, | |
| "n_samples": 8 | |
| }, | |
| "parity_2048": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 0.0, | |
| "mean_abs_prob_diff": 0.0, | |
| "n_samples": 4 | |
| }, | |
| "passed_gate": true, | |
| "cpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 9.87, | |
| "p95_ms": 10.88, | |
| "n_runs": 25 | |
| }, | |
| "cpu_latency_512": { | |
| "seq_len": 512, | |
| "p50_ms": 77.12, | |
| "p95_ms": 79.26, | |
| "n_runs": 10 | |
| }, | |
| "cpu_latency_1024": { | |
| "seq_len": 1024, | |
| "p50_ms": 238.82, | |
| "p95_ms": 239.59, | |
| "n_runs": 5 | |
| }, | |
| "cpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 783.31, | |
| "p95_ms": 798.32, | |
| "n_runs": 5 | |
| } | |
| }, | |
| "fp16": { | |
| "filename": "onnx/model_fp16.onnx", | |
| "size_mb": 61.32, | |
| "parity_short": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 0.00064, | |
| "mean_abs_prob_diff": 0.00016, | |
| "n_samples": 8 | |
| }, | |
| "parity_2048": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 8e-05, | |
| "mean_abs_prob_diff": 5e-05, | |
| "n_samples": 4 | |
| }, | |
| "passed_gate": true, | |
| "cpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 11.85, | |
| "p95_ms": 12.46, | |
| "n_runs": 25 | |
| }, | |
| "cpu_latency_512": { | |
| "seq_len": 512, | |
| "p50_ms": 90.47, | |
| "p95_ms": 93.17, | |
| "n_runs": 10 | |
| }, | |
| "cpu_latency_1024": { | |
| "seq_len": 1024, | |
| "p50_ms": 299.2, | |
| "p95_ms": 302.89, | |
| "n_runs": 5 | |
| }, | |
| "cpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 1063.34, | |
| "p95_ms": 1070.97, | |
| "n_runs": 5 | |
| } | |
| }, | |
| "int8": { | |
| "filename": "onnx/model_quantized.onnx", | |
| "size_mb": 67.18, | |
| "parity_short": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 0.00899, | |
| "mean_abs_prob_diff": 0.0027, | |
| "n_samples": 8 | |
| }, | |
| "parity_2048": { | |
| "agreement": 1.0, | |
| "max_abs_prob_diff": 0.00162, | |
| "mean_abs_prob_diff": 0.00139, | |
| "n_samples": 4 | |
| }, | |
| "passed_gate": true, | |
| "cpu_latency_64": { | |
| "seq_len": 64, | |
| "p50_ms": 9.6, | |
| "p95_ms": 10.25, | |
| "n_runs": 25 | |
| }, | |
| "cpu_latency_512": { | |
| "seq_len": 512, | |
| "p50_ms": 78.5, | |
| "p95_ms": 80.49, | |
| "n_runs": 10 | |
| }, | |
| "cpu_latency_1024": { | |
| "seq_len": 1024, | |
| "p50_ms": 242.57, | |
| "p95_ms": 245.79, | |
| "n_runs": 5 | |
| }, | |
| "cpu_latency_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 781.28, | |
| "p95_ms": 793.25, | |
| "n_runs": 5 | |
| } | |
| } | |
| } | |
| } |