darrayes commited on
Commit
e956720
·
verified ·
1 Parent(s): 672e1be

Jailbreak-detector

Browse files
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: answerdotai/ModernBERT-base
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - f1
9
+ model-index:
10
+ - name: ModernBERT-domain-classifier
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
+ # ModernBERT-domain-classifier
18
+
19
+ This model is a fine-tuned version of [answerdotai/ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.0016
22
+ - F1: 1.0
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: 32
43
+ - eval_batch_size: 16
44
+ - seed: 42
45
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
+ - lr_scheduler_type: linear
47
+ - num_epochs: 5
48
+
49
+ ### Training results
50
+
51
+ | Training Loss | Epoch | Step | Validation Loss | F1 |
52
+ |:-------------:|:-----:|:----:|:---------------:|:------:|
53
+ | No log | 1.0 | 33 | 0.0246 | 0.9848 |
54
+ | No log | 2.0 | 66 | 0.0042 | 1.0 |
55
+ | No log | 3.0 | 99 | 0.0019 | 1.0 |
56
+ | 0.0755 | 4.0 | 132 | 0.0017 | 1.0 |
57
+ | 0.0755 | 5.0 | 165 | 0.0016 | 1.0 |
58
+
59
+
60
+ ### Framework versions
61
+
62
+ - Transformers 4.48.0.dev0
63
+ - Pytorch 2.5.0+cu124
64
+ - Datasets 3.1.0
65
+ - Tokenizers 0.21.0
config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "answerdotai/ModernBERT-base",
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
+ "sep_token_id": 50282,
50
+ "sparse_pred_ignore_index": -100,
51
+ "sparse_prediction": false,
52
+ "torch_dtype": "float32",
53
+ "transformers_version": "4.48.0.dev0",
54
+ "vocab_size": 50368
55
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cac40339a845d63037aeb1a15976080e23df623a6177365ddc61d4bf9ff474f8
3
+ size 598439784
runs/Jan17_10-41-36_98d8bdddd67c/events.out.tfevents.1737110496.98d8bdddd67c.2363.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07876322088e326a77e73fe2f066c7fd9dcd7ca84418346e64815500dcda5ae9
3
+ size 5833
runs/Jan17_10-47-06_98d8bdddd67c/events.out.tfevents.1737110826.98d8bdddd67c.2363.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9b150eb87a6e39a8a746c870badf5a0381435ca23f877eff0adbe02077f2bde
3
+ size 5833
runs/Jan17_11-18-03_98d8bdddd67c/events.out.tfevents.1737112684.98d8bdddd67c.2363.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5f532116e18f19cdb05d0df0af3eb9195b210734c6f8cd3858831f40b313885
3
+ size 7957
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5494f88bcf3c28a5d9eb8b99f6fc15bf91ccaa944a2f37fa96cffe5569ccc3ac
3
+ size 5432