Text Classification
Transformers
Safetensors
English
deberta-v2
prompt-injection
prompt-injection-detection
llm-security
llm-safety
ai-safety
deberta
Eval Results (legacy)
text-embeddings-inference
Instructions to use JHC04567/spid-deberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JHC04567/spid-deberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="JHC04567/spid-deberta-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("JHC04567/spid-deberta-base") model = AutoModelForSequenceClassification.from_pretrained("JHC04567/spid-deberta-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -106,12 +106,12 @@ print("BLOCKED" if unsafe_prob >= 0.85 else "PASSED")
|
|
| 106 |
## Evaluation
|
| 107 |
|
| 108 |
Attacks: `benign request + conjunction + hidden injection` (real deepset/Gandalf payloads).
|
| 109 |
-
|
| 110 |
-
Split pipeline vs. same classifier at matched recall (0.94).
|
| 111 |
| Mode | Precision | Recall | F1 |
|
| 112 |
|:-----|----------:|-------:|---:|
|
| 113 |
| Classifier @ matched recall | 0.85 | 0.94 | — |
|
| 114 |
| **Pipeline (split)** | **0.98** | 0.94 | **0.96** |
|
|
|
|
| 115 |
Splitting wins: +0.14 precision at matched recall (PR-AUC 0.97), rescuing +84 of 300 attacks with 0 added false positives.
|
| 116 |
|
| 117 |
*Caveats:* near-best-case (split on SPID's own conjunctions); payloads overlap training data; small benign control (n=150).
|
|
|
|
| 106 |
## Evaluation
|
| 107 |
|
| 108 |
Attacks: `benign request + conjunction + hidden injection` (real deepset/Gandalf payloads).
|
| 109 |
+
Split pipeline vs. same classifier at matched recall(0.94).
|
|
|
|
| 110 |
| Mode | Precision | Recall | F1 |
|
| 111 |
|:-----|----------:|-------:|---:|
|
| 112 |
| Classifier @ matched recall | 0.85 | 0.94 | — |
|
| 113 |
| **Pipeline (split)** | **0.98** | 0.94 | **0.96** |
|
| 114 |
+
|
| 115 |
Splitting wins: +0.14 precision at matched recall (PR-AUC 0.97), rescuing +84 of 300 attacks with 0 added false positives.
|
| 116 |
|
| 117 |
*Caveats:* near-best-case (split on SPID's own conjunctions); payloads overlap training data; small benign control (n=150).
|