Token Classification
Transformers
ONNX
Safetensors
Transformers.js
English
modernbert
prompt-injection
indirect-prompt-injection
prompt-localization
sanitization
ai-security
guardrails
tamarillo
prompt-injection-detection
jailbreak-detection
llm-security
litellm
nemo-guardrails
open-webui
Instructions to use Tamarillo/injection-span-guard-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/injection-span-guard-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tamarillo/injection-span-guard-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/injection-span-guard-base") model = AutoModelForTokenClassification.from_pretrained("Tamarillo/injection-span-guard-base", device_map="auto") - Transformers.js
How to use Tamarillo/injection-span-guard-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/injection-span-guard-base'); - Notebooks
- Google Colab
- Kaggle
File size: 562 Bytes
5057df5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | {
"base_model": "jhu-clsp/mmBERT-base",
"max_length": 3584,
"epochs": 2.5,
"lr": 2.5e-05,
"doc_loss_weight": 1.0,
"train_examples": 103213,
"val_examples": 3339,
"train_runtime_sec": 5063.4,
"best_val_metrics": {
"eval_loss": 0.17272089421749115,
"eval_token_f1": 0.98884,
"eval_doc_f1": 0.98847,
"eval_doc_auc": 0.99895,
"eval_doc_fpr": 0.01123,
"eval_selection_score": 0.99237,
"eval_runtime": 9.7546,
"eval_samples_per_second": 342.3,
"eval_steps_per_second": 10.764,
"epoch": 2.5000775073631996
}
} |