Text Classification
Transformers
Safetensors
English
modernbert
prompt-injection
jailbreak-detection
guardrails
safety
classification
Eval Results (legacy)
text-embeddings-inference
Instructions to use smcleod/guardrails-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smcleod/guardrails-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="smcleod/guardrails-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("smcleod/guardrails-v1") model = AutoModelForSequenceClassification.from_pretrained("smcleod/guardrails-v1") - Notebooks
- Google Colab
- Kaggle
| { | |
| "threshold": 0.986328125, | |
| "precision": 0.9907100199071002, | |
| "recall": 0.9533844189016603, | |
| "f1": 0.9716889033517735, | |
| "fpr": 0.002292451285410185, | |
| "tpr": 0.9533844189016603, | |
| "accuracy": 0.9886615404665711, | |
| "mode": "cost", | |
| "criterion": "cost_fp=5.0,cost_fn=1.0", | |
| "n": 7673, | |
| "data_source": "val" | |
| } |