Token Classification
Transformers
ONNX
Safetensors
Transformers.js
English
modernbert
prompt-injection
indirect-prompt-injection
span-detection
context-sanitization
ai-security
guardrails
ettin
tamarillo
Eval Results (legacy)
Run this model with HF Jobs
Run Tamarillo/injection-span-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/injection-span-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/injection-span-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/injection-span-guard-tiny-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/injection-span-guard-tiny-en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tamarillo/injection-span-guard-tiny-en")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/injection-span-guard-tiny-en") model = AutoModelForTokenClassification.from_pretrained("Tamarillo/injection-span-guard-tiny-en", device_map="auto") - Transformers.js
How to use Tamarillo/injection-span-guard-tiny-en with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/injection-span-guard-tiny-en'); - Notebooks
- Google Colab
- Kaggle
File size: 3,656 Bytes
6ab45fd d53b2af 6ab45fd d53b2af 6ab45fd d53b2af 6ab45fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | {
"base_model": "jhu-clsp/ettin-encoder-32m",
"distilled_from": "Tamarillo/injection-span-guard-base",
"max_length": 2560,
"epochs": 3.0,
"lr": 8e-05,
"train_examples": 101894,
"val_examples": 3577,
"train_runtime_sec": 2540.0,
"best_val_metrics": {
"val_doc_auc_lme": 0.99805,
"val_doc_auc_max": 0.99794,
"val_indirect_auc": 0.99965,
"val_indirect_span_f1": 0.99308,
"val_trigger_fpr": 0.0,
"selection_score": 0.99758,
"step": 2865,
"weights": "ema"
},
"val_history": [
{
"val_doc_auc_lme": 0.99547,
"val_doc_auc_max": 0.99527,
"val_indirect_auc": 0.99787,
"val_indirect_span_f1": 0.97605,
"val_trigger_fpr": 0.0,
"selection_score": 0.99201,
"step": 955,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99717,
"val_doc_auc_max": 0.99719,
"val_indirect_auc": 0.99965,
"val_indirect_span_f1": 0.9876,
"val_trigger_fpr": 0.0,
"selection_score": 0.99595,
"step": 955,
"weights": "ema"
},
{
"val_doc_auc_lme": 0.99789,
"val_doc_auc_max": 0.99774,
"val_indirect_auc": 0.99935,
"val_indirect_span_f1": 0.99107,
"val_trigger_fpr": 0.0,
"selection_score": 0.99694,
"step": 1910,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99786,
"val_doc_auc_max": 0.99778,
"val_indirect_auc": 0.9996,
"val_indirect_span_f1": 0.99189,
"val_trigger_fpr": 0.0,
"selection_score": 0.99721,
"step": 1910,
"weights": "ema"
},
{
"val_doc_auc_lme": 0.997,
"val_doc_auc_max": 0.9968,
"val_indirect_auc": 0.99781,
"val_indirect_span_f1": 0.98878,
"val_trigger_fpr": 0.0,
"selection_score": 0.99564,
"step": 2865,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99805,
"val_doc_auc_max": 0.99794,
"val_indirect_auc": 0.99965,
"val_indirect_span_f1": 0.99308,
"val_trigger_fpr": 0.0,
"selection_score": 0.99758,
"step": 2865,
"weights": "ema"
},
{
"val_doc_auc_lme": 0.998,
"val_doc_auc_max": 0.9978,
"val_indirect_auc": 0.9992,
"val_indirect_span_f1": 0.9924,
"val_trigger_fpr": 0.0,
"selection_score": 0.99726,
"step": 3820,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99756,
"val_doc_auc_max": 0.99733,
"val_indirect_auc": 0.99833,
"val_indirect_span_f1": 0.99128,
"val_trigger_fpr": 0.0,
"selection_score": 0.99659,
"step": 3820,
"weights": "ema"
},
{
"val_doc_auc_lme": 0.9975,
"val_doc_auc_max": 0.99733,
"val_indirect_auc": 0.99817,
"val_indirect_span_f1": 0.9922,
"val_trigger_fpr": 0.0,
"selection_score": 0.99675,
"step": 4775,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99748,
"val_doc_auc_max": 0.99732,
"val_indirect_auc": 0.99811,
"val_indirect_span_f1": 0.9922,
"val_trigger_fpr": 0.0,
"selection_score": 0.99673,
"step": 4775,
"weights": "ema"
},
{
"val_doc_auc_lme": 0.9975,
"val_doc_auc_max": 0.99733,
"val_indirect_auc": 0.99817,
"val_indirect_span_f1": 0.99221,
"val_trigger_fpr": 0.0,
"selection_score": 0.99675,
"step": 4777,
"weights": "raw"
},
{
"val_doc_auc_lme": 0.99751,
"val_doc_auc_max": 0.99734,
"val_indirect_auc": 0.99813,
"val_indirect_span_f1": 0.9922,
"val_trigger_fpr": 0.0,
"selection_score": 0.99674,
"step": 4777,
"weights": "ema"
}
]
} |