Text Classification
Transformers
ONNX
Safetensors
English
bert
prompt-injection
security
llm-security
edge-inference
fastly
tract-onnx
text-embeddings-inference
Instructions to use marklkelly/bert-tiny-injection-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marklkelly/bert-tiny-injection-detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="marklkelly/bert-tiny-injection-detector")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("marklkelly/bert-tiny-injection-detector") model = AutoModelForSequenceClassification.from_pretrained("marklkelly/bert-tiny-injection-detector", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "dataset": { | |
| "split": "validation", | |
| "examples": 20027, | |
| "positive_rate": 0.4944 | |
| }, | |
| "overall": { | |
| "pr_auc": 0.993, | |
| "auc_roc": 0.99, | |
| "at_T_block": { | |
| "threshold": 0.9403395056724548, | |
| "precision": 0.9894, | |
| "recall": 0.9563, | |
| "f1": 0.9726, | |
| "fpr": 0.01 | |
| }, | |
| "at_T_review": { | |
| "threshold": 0.8692067861557007, | |
| "precision": 0.9797, | |
| "recall": 0.9687, | |
| "f1": 0.9742, | |
| "fpr": 0.0197 | |
| } | |
| }, | |
| "estimated_at_2pct_prevalence": { | |
| "prior": 0.02, | |
| "at_T_block": { | |
| "estimated_ppv": 0.6618, | |
| "estimated_f1": 0.7822 | |
| }, | |
| "at_T_review": { | |
| "estimated_ppv": 0.5015, | |
| "estimated_f1": 0.6608 | |
| } | |
| } | |
| } |