ashield-ai commited on
Commit
c26c7aa
·
verified ·
1 Parent(s): cf4ef23

End of training

Browse files
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: ashield-ai/prompt-classification-bert
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - f1
9
+ model-index:
10
+ - name: jailbreak-prompt-classification
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # jailbreak-prompt-classification
18
+
19
+ This model is a fine-tuned version of [ashield-ai/prompt-classification-bert](https://huggingface.co/ashield-ai/prompt-classification-bert) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.0135
22
+ - F1: 0.9985
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - learning_rate: 5e-05
42
+ - train_batch_size: 16
43
+ - eval_batch_size: 8
44
+ - seed: 42
45
+ - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
+ - lr_scheduler_type: linear
47
+ - lr_scheduler_warmup_steps: 100
48
+ - num_epochs: 5
49
+ - mixed_precision_training: Native AMP
50
+
51
+ ### Training results
52
+
53
+ | Training Loss | Epoch | Step | Validation Loss | F1 |
54
+ |:-------------:|:-----:|:-----:|:---------------:|:------:|
55
+ | 0.0163 | 1.0 | 2613 | 0.0074 | 0.9989 |
56
+ | 0.0113 | 2.0 | 5226 | 0.0108 | 0.9987 |
57
+ | 0.0047 | 3.0 | 7839 | 0.0147 | 0.9978 |
58
+ | 0.0039 | 4.0 | 10452 | 0.0127 | 0.9983 |
59
+ | 0.0016 | 5.0 | 13065 | 0.0135 | 0.9985 |
60
+
61
+
62
+ ### Framework versions
63
+
64
+ - Transformers 4.48.0
65
+ - Pytorch 2.5.1+cu121
66
+ - Datasets 3.2.0
67
+ - Tokenizers 0.21.0
config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "ashield-ai/prompt-classification-bert",
3
+ "architectures": [
4
+ "ModernBertForSequenceClassification"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 50281,
9
+ "classifier_activation": "gelu",
10
+ "classifier_bias": false,
11
+ "classifier_dropout": 0.0,
12
+ "classifier_pooling": "mean",
13
+ "cls_token_id": 50281,
14
+ "decoder_bias": true,
15
+ "deterministic_flash_attn": false,
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50282,
18
+ "global_attn_every_n_layers": 3,
19
+ "global_rope_theta": 160000.0,
20
+ "gradient_checkpointing": false,
21
+ "hidden_activation": "gelu",
22
+ "hidden_size": 768,
23
+ "id2label": {
24
+ "0": "benign",
25
+ "1": "jailbreak"
26
+ },
27
+ "initializer_cutoff_factor": 2.0,
28
+ "initializer_range": 0.02,
29
+ "intermediate_size": 1152,
30
+ "label2id": {
31
+ "benign": 0,
32
+ "jailbreak": 1
33
+ },
34
+ "layer_norm_eps": 1e-05,
35
+ "local_attention": 128,
36
+ "local_rope_theta": 10000.0,
37
+ "max_position_embeddings": 8192,
38
+ "mlp_bias": false,
39
+ "mlp_dropout": 0.0,
40
+ "model_type": "modernbert",
41
+ "norm_bias": false,
42
+ "norm_eps": 1e-05,
43
+ "num_attention_heads": 12,
44
+ "num_hidden_layers": 22,
45
+ "pad_token_id": 50283,
46
+ "position_embedding_type": "absolute",
47
+ "problem_type": "single_label_classification",
48
+ "reference_compile": true,
49
+ "repad_logits_with_grad": false,
50
+ "sep_token_id": 50282,
51
+ "sparse_pred_ignore_index": -100,
52
+ "sparse_prediction": false,
53
+ "torch_dtype": "float32",
54
+ "transformers_version": "4.48.0",
55
+ "use_flash_attention": false,
56
+ "vocab_size": 50368
57
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7141a831c66b3cd11bf8f6bb1b3d7ae320a3a8ea549142c14ddacade5d69db88
3
+ size 598439784
runs/Jan18_04-46-45_9db53060210b/events.out.tfevents.1737175609.9db53060210b.3856.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77dc5c9cd6d9ebbdb42ebd63a1af14ed1d4119d056d8b38a8e5491ea8c158ec8
3
+ size 5966
runs/Jan18_04-47-33_9db53060210b/events.out.tfevents.1737175655.9db53060210b.3856.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bee024403df403f31b541285bddf52e3f7fa1f485a8accfd5022d518df286ae
3
+ size 13391
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf6a8ff6a52f7c3af45bb8a10acdd828c0220b14a547d2c66b79d859e6d1583c
3
+ size 5432