Update README.md
Browse files
README.md
CHANGED
@@ -3,6 +3,10 @@ library_name: transformers
|
|
3 |
license: mit
|
4 |
base_model: microsoft/mdeberta-v3-base
|
5 |
tags:
|
|
|
|
|
|
|
|
|
6 |
- generated_from_trainer
|
7 |
metrics:
|
8 |
- accuracy
|
@@ -14,70 +18,24 @@ model-index:
|
|
14 |
results: []
|
15 |
---
|
16 |
|
17 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
18 |
-
should probably proofread and complete it, then remove this comment. -->
|
19 |
-
|
20 |
# mdeberta-v3-base-prompt-injection
|
21 |
|
22 |
-
This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on
|
23 |
-
It achieves the following results on the evaluation set:
|
24 |
-
- Loss: 0.2258
|
25 |
-
- Accuracy: 0.9661
|
26 |
-
- Precision: 0.9924
|
27 |
-
- Recall: 0.9129
|
28 |
-
- F1: 0.9510
|
29 |
-
|
30 |
-
## Model description
|
31 |
-
|
32 |
-
More information needed
|
33 |
-
|
34 |
-
## Intended uses & limitations
|
35 |
-
|
36 |
-
More information needed
|
37 |
-
|
38 |
-
## Training and evaluation data
|
39 |
-
|
40 |
-
More information needed
|
41 |
-
|
42 |
-
## Training procedure
|
43 |
-
|
44 |
-
### Training hyperparameters
|
45 |
|
46 |
-
|
47 |
-
- learning_rate: 3e-05
|
48 |
-
- train_batch_size: 9
|
49 |
-
- eval_batch_size: 9
|
50 |
-
- seed: 42
|
51 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
52 |
-
- lr_scheduler_type: linear
|
53 |
-
- lr_scheduler_warmup_ratio: 0.1
|
54 |
-
- num_epochs: 9
|
55 |
|
56 |
-
|
|
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
| 0.1586 | 1.6667 | 600 | 0.2516 | 0.9511 | 0.9697 | 0.8920 | 0.9292 |
|
63 |
-
| 0.1685 | 2.2222 | 800 | 0.2001 | 0.9561 | 0.9468 | 0.9303 | 0.9385 |
|
64 |
-
| 0.1275 | 2.7778 | 1000 | 0.1993 | 0.9548 | 0.9772 | 0.8955 | 0.9345 |
|
65 |
-
| 0.0755 | 3.3333 | 1200 | 0.2840 | 0.9473 | 0.9960 | 0.8571 | 0.9213 |
|
66 |
-
| 0.0944 | 3.8889 | 1400 | 0.2488 | 0.9473 | 0.9960 | 0.8571 | 0.9213 |
|
67 |
-
| 0.092 | 4.4444 | 1600 | 0.2071 | 0.9636 | 0.9886 | 0.9094 | 0.9474 |
|
68 |
-
| 0.067 | 5.0 | 1800 | 0.2779 | 0.9586 | 0.9669 | 0.9164 | 0.9410 |
|
69 |
-
| 0.0572 | 5.5556 | 2000 | 0.1707 | 0.9649 | 0.9924 | 0.9094 | 0.9491 |
|
70 |
-
| 0.052 | 6.1111 | 2200 | 0.2173 | 0.9573 | 0.9961 | 0.8850 | 0.9373 |
|
71 |
-
| 0.0487 | 6.6667 | 2400 | 0.1827 | 0.9699 | 0.9852 | 0.9303 | 0.9570 |
|
72 |
-
| 0.038 | 7.2222 | 2600 | 0.1954 | 0.9686 | 0.9888 | 0.9233 | 0.9550 |
|
73 |
-
| 0.0361 | 7.7778 | 2800 | 0.1816 | 0.9686 | 0.9816 | 0.9303 | 0.9553 |
|
74 |
-
| 0.0417 | 8.3333 | 3000 | 0.2194 | 0.9661 | 0.9924 | 0.9129 | 0.9510 |
|
75 |
-
| 0.0278 | 8.8889 | 3200 | 0.2258 | 0.9661 | 0.9924 | 0.9129 | 0.9510 |
|
76 |
|
|
|
|
|
77 |
|
78 |
-
|
|
|
79 |
|
80 |
-
|
81 |
-
- Pytorch 2.6.0+cu124
|
82 |
-
- Datasets 3.5.0
|
83 |
-
- Tokenizers 0.21.1
|
|
|
3 |
license: mit
|
4 |
base_model: microsoft/mdeberta-v3-base
|
5 |
tags:
|
6 |
+
- prompt-injection
|
7 |
+
- injection
|
8 |
+
- security
|
9 |
+
- llm-security
|
10 |
- generated_from_trainer
|
11 |
metrics:
|
12 |
- accuracy
|
|
|
18 |
results: []
|
19 |
---
|
20 |
|
|
|
|
|
|
|
21 |
# mdeberta-v3-base-prompt-injection
|
22 |
|
23 |
+
This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on a combination of [jackhhao/jailbreak-classification](https://huggingface.co/datasets/jackhhao/jailbreak-classification), [deepset/prompt-injections](https://huggingface.co/datasets/deepset/prompt-injections/viewer/default/test?views%5B%5D=test), a custom datasets containing known attacks, and injections nested in legitimate content like websites and articles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
```Python
|
28 |
+
from transformers import pipeline
|
29 |
|
30 |
+
classifier = pipeline(
|
31 |
+
"text-classification",
|
32 |
+
model="proventra/mdeberta-v3-base-prompt-injection"
|
33 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
print(classifier("Your text to scan"))
|
36 |
+
```
|
37 |
|
38 |
+
## Use in Proventra Core
|
39 |
+
[proventra-core](https://github.com/proventra/proventra-core) python library
|
40 |
|
41 |
+
check out [Proventra](https://www.proventra-ai.com)
|
|
|
|
|
|