Text Classification
Transformers
ONNX
Safetensors
English
modernbert
prompt-injection
indirect-prompt-injection
agent-security
ai-safety
guardrail
mcp
rag-security
flintglass
text-embeddings-inference
Instructions to use flintglass/PrismGuard-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismGuard-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="flintglass/PrismGuard-Small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("flintglass/PrismGuard-Small") model = AutoModelForSequenceClassification.from_pretrained("flintglass/PrismGuard-Small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Release Flintglass PrismGuard-Small v1 (ModernBERT-base 149M, 8K ctx, 3-class, PyTorch + ONNX FP32/INT8)
829f61f verified Download training_summary.json from flintglass/PrismGuard-Small: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/flintglass/PrismGuard-Small/resolve/main/training_summary.json
- Command line
-
hf download hf://flintglass/PrismGuard-Small/training_summary.json
-
curl -L -o training_summary.json https://huggingface.co/flintglass/PrismGuard-Small/resolve/main/training_summary.json
2.14 kB
| { | |
| "base_model": "answerdotai/ModernBERT-base", | |
| "args": { | |
| "base_model": "answerdotai/ModernBERT-base", | |
| "corpus_dir": "/outputs/db8d7e87-f203-486d-9db5-dbf208f87b1e/corpus_v3/corpus_hf", | |
| "out_dir": "/outputs/c0c602a6-1217-4bbe-aaca-ed9ab2d3d2f1/PrismGuard-Small", | |
| "max_length": 8192, | |
| "epochs": 5, | |
| "lr": 6e-05, | |
| "weight_decay": 0.01, | |
| "max_tokens": 16384, | |
| "grad_accum": 2, | |
| "hard_neg_weight": 1.8, | |
| "label_smoothing": 0.02, | |
| "seed": 42, | |
| "grad_checkpointing": false, | |
| "uniform_class_weights": true | |
| }, | |
| "history": [ | |
| { | |
| "epoch": 1, | |
| "train_loss": 1.2557, | |
| "val": { | |
| "macro_f1": 0.8452, | |
| "binary_f1": 0.8364, | |
| "binary_auroc": 0.9504, | |
| "fpr": 0.1622, | |
| "nll": 0.3253 | |
| }, | |
| "composite": 0.8209 | |
| }, | |
| { | |
| "epoch": 2, | |
| "train_loss": 0.7445, | |
| "val": { | |
| "macro_f1": 0.8962, | |
| "binary_f1": 0.8933, | |
| "binary_auroc": 0.9768, | |
| "fpr": 0.0241, | |
| "nll": 0.2249 | |
| }, | |
| "composite": 0.8926 | |
| }, | |
| { | |
| "epoch": 3, | |
| "train_loss": 0.4904, | |
| "val": { | |
| "macro_f1": 0.9384, | |
| "binary_f1": 0.9354, | |
| "binary_auroc": 0.9864, | |
| "fpr": 0.0357, | |
| "nll": 0.1595 | |
| }, | |
| "composite": 0.933 | |
| }, | |
| { | |
| "epoch": 4, | |
| "train_loss": 0.3746, | |
| "val": { | |
| "macro_f1": 0.9409, | |
| "binary_f1": 0.9401, | |
| "binary_auroc": 0.9872, | |
| "fpr": 0.029, | |
| "nll": 0.1551 | |
| }, | |
| "composite": 0.9365 | |
| }, | |
| { | |
| "epoch": 5, | |
| "train_loss": 0.3498, | |
| "val": { | |
| "macro_f1": 0.9408, | |
| "binary_f1": 0.9407, | |
| "binary_auroc": 0.9873, | |
| "fpr": 0.027, | |
| "nll": 0.1542 | |
| }, | |
| "composite": 0.9367 | |
| } | |
| ], | |
| "best_composite": 0.9367, | |
| "calibration_T": 0.94572, | |
| "calibration_baked": true, | |
| "cal_before": { | |
| "macro_f1": 0.9264, | |
| "binary_f1": 0.9258, | |
| "binary_auroc": 0.9862, | |
| "fpr": 0.0338, | |
| "nll": 0.1692 | |
| }, | |
| "cal_after": { | |
| "macro_f1": 0.9258, | |
| "binary_f1": 0.9266, | |
| "binary_auroc": 0.9861, | |
| "fpr": 0.0338, | |
| "nll": 0.1688 | |
| } | |
| } |