cgoosen commited on
Commit
4cb5985
1 Parent(s): 74e99c7

cgoosen/Prompt-Guard-finetuned-ctf-86M

Browse files
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  license: mit
3
- base_model: microsoft/mdeberta-v3-base
4
  tags:
5
  - generated_from_trainer
6
  metrics:
@@ -15,10 +15,10 @@ should probably proofread and complete it, then remove this comment. -->
15
 
16
  # Prompt-Guard-finetuned-ctf-86M
17
 
18
- This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on the None dataset.
19
  It achieves the following results on the evaluation set:
20
- - Loss: 0.1377
21
- - Accuracy: 0.9376
22
 
23
  ## Model description
24
 
@@ -38,27 +38,23 @@ More information needed
38
 
39
  The following hyperparameters were used during training:
40
  - learning_rate: 2e-05
41
- - train_batch_size: 16
42
- - eval_batch_size: 16
43
  - seed: 42
44
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
  - lr_scheduler_type: linear
46
- - num_epochs: 10
47
 
48
  ### Training results
49
 
50
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
51
- |:-------------:|:-----:|:----:|:---------------:|:--------:|
52
- | 0.2424 | 1.0 | 293 | 0.1377 | 0.9376 |
53
- | 0.1436 | 2.0 | 586 | 0.1565 | 0.9487 |
54
- | 0.108 | 3.0 | 879 | 0.2244 | 0.9462 |
55
- | 0.0806 | 4.0 | 1172 | 0.2356 | 0.9462 |
56
- | 0.0548 | 5.0 | 1465 | 0.2658 | 0.9470 |
57
- | 0.0473 | 6.0 | 1758 | 0.2437 | 0.9521 |
58
- | 0.0339 | 7.0 | 2051 | 0.2838 | 0.9470 |
59
- | 0.0199 | 8.0 | 2344 | 0.2974 | 0.9530 |
60
- | 0.0193 | 9.0 | 2637 | 0.3392 | 0.9487 |
61
- | 0.0176 | 10.0 | 2930 | 0.3296 | 0.9513 |
62
 
63
 
64
  ### Framework versions
 
1
  ---
2
  license: mit
3
+ base_model: microsoft/deberta-v3-base
4
  tags:
5
  - generated_from_trainer
6
  metrics:
 
15
 
16
  # Prompt-Guard-finetuned-ctf-86M
17
 
18
+ This model is a fine-tuned version of [microsoft/deberta-v3-base](https://huggingface.co/microsoft/deberta-v3-base) on the None dataset.
19
  It achieves the following results on the evaluation set:
20
+ - Loss: 0.0226
21
+ - Accuracy: 0.9964
22
 
23
  ## Model description
24
 
 
38
 
39
  The following hyperparameters were used during training:
40
  - learning_rate: 2e-05
41
+ - train_batch_size: 8
42
+ - eval_batch_size: 8
43
  - seed: 42
44
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
  - lr_scheduler_type: linear
46
+ - num_epochs: 6
47
 
48
  ### Training results
49
 
50
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
51
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|
52
+ | 0.0291 | 1.0 | 2346 | 0.0315 | 0.9953 |
53
+ | 0.0222 | 2.0 | 4692 | 0.0318 | 0.9953 |
54
+ | 0.0081 | 3.0 | 7038 | 0.0226 | 0.9964 |
55
+ | 0.0032 | 4.0 | 9384 | 0.0329 | 0.9966 |
56
+ | 0.0031 | 5.0 | 11730 | 0.0352 | 0.9957 |
57
+ | 0.0039 | 6.0 | 14076 | 0.0242 | 0.9974 |
 
 
 
 
58
 
59
 
60
  ### Framework versions
added_tokens.json CHANGED
@@ -1,3 +1,3 @@
1
  {
2
- "[MASK]": 250101
3
  }
 
1
  {
2
+ "[MASK]": 128000
3
  }
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "microsoft/mdeberta-v3-base",
3
  "architectures": [
4
  "DebertaV2ForSequenceClassification"
5
  ],
@@ -8,14 +8,16 @@
8
  "hidden_dropout_prob": 0.1,
9
  "hidden_size": 768,
10
  "id2label": {
11
- "0": "POSITIVE",
12
- "1": "NEGATIVE"
 
13
  },
14
  "initializer_range": 0.02,
15
  "intermediate_size": 3072,
16
  "label2id": {
17
- "NEGATIVE": 1,
18
- "POSITIVE": 0
 
19
  },
20
  "layer_norm_eps": 1e-07,
21
  "max_position_embeddings": 512,
@@ -39,5 +41,5 @@
39
  "torch_dtype": "float32",
40
  "transformers_version": "4.40.2",
41
  "type_vocab_size": 0,
42
- "vocab_size": 251000
43
  }
 
1
  {
2
+ "_name_or_path": "microsoft/deberta-v3-base",
3
  "architectures": [
4
  "DebertaV2ForSequenceClassification"
5
  ],
 
8
  "hidden_dropout_prob": 0.1,
9
  "hidden_size": 768,
10
  "id2label": {
11
+ "0": "benign",
12
+ "1": "injection",
13
+ "2": "jailbreak"
14
  },
15
  "initializer_range": 0.02,
16
  "intermediate_size": 3072,
17
  "label2id": {
18
+ "benign": 0,
19
+ "injection": 1,
20
+ "jailbreak": 2
21
  },
22
  "layer_norm_eps": 1e-07,
23
  "max_position_embeddings": 512,
 
41
  "torch_dtype": "float32",
42
  "transformers_version": "4.40.2",
43
  "type_vocab_size": 0,
44
+ "vocab_size": 128100
45
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:08fee00422e08c2fbe00beb31889ad4be003b073ebeef090112432c155502cf0
3
- size 1115268200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:078563f4d4da764b13e136573021c0dfe14dbb3c168665d23a895b08e442c6cd
3
+ size 737722356
spm.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:13c8d666d62a7bc4ac8f040aab68e942c861f93303156cc28f5c7e885d86d6e3
3
- size 4305025
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
3
+ size 2464616
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5e26ec8cd2234df8edcc6e8c207b66b3162360f9fdc46ee4526a440d0d9d0bb9
3
- size 16331374
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5124ef2ead1a10a717703bc436de7f353da76d6340e4587719b42b1693707964
3
+ size 8656624
tokenizer_config.json CHANGED
@@ -32,7 +32,7 @@
32
  "single_word": false,
33
  "special": true
34
  },
35
- "250101": {
36
  "content": "[MASK]",
37
  "lstrip": false,
38
  "normalized": false,
 
32
  "single_word": false,
33
  "special": true
34
  },
35
+ "128000": {
36
  "content": "[MASK]",
37
  "lstrip": false,
38
  "normalized": false,
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:adea9aef635495a08f557a4ac41e5232bf934163c31053be61c99a68480b4fc7
3
  size 5048
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38f9ca1e0d7904a29e057a2ece9bba73972fd0b1667a3bb847c67cde6d2061d2
3
  size 5048