avrecum commited on
Commit
0db8674
·
verified ·
1 Parent(s): 6186113

avrecum/bert-base-uncased-finetuned-refusal-classifier-2024-12-01-03-07-59

Browse files
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: bert-base-uncased
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - f1
9
+ - accuracy
10
+ model-index:
11
+ - name: refusal-classifier
12
+ results: []
13
+ ---
14
+
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
+
18
+ # refusal-classifier
19
+
20
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.7340
23
+ - F1: 0.9243
24
+ - Roc Auc: 0.9956
25
+ - Accuracy: 0.9246
26
+
27
+ ## Model description
28
+
29
+ More information needed
30
+
31
+ ## Intended uses & limitations
32
+
33
+ More information needed
34
+
35
+ ## Training and evaluation data
36
+
37
+ More information needed
38
+
39
+ ## Training procedure
40
+
41
+ ### Training hyperparameters
42
+
43
+ The following hyperparameters were used during training:
44
+ - learning_rate: 1e-05
45
+ - train_batch_size: 384
46
+ - eval_batch_size: 384
47
+ - seed: 42
48
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
49
+ - lr_scheduler_type: linear
50
+ - lr_scheduler_warmup_steps: 500
51
+ - num_epochs: 3
52
+ - label_smoothing_factor: 0.1
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | F1 | Roc Auc | Accuracy |
57
+ |:-------------:|:------:|:----:|:---------------:|:------:|:-------:|:--------:|
58
+ | No log | 0.3817 | 100 | 2.4345 | 0.1373 | 0.7411 | 0.1877 |
59
+ | No log | 0.7634 | 200 | 1.9614 | 0.5462 | 0.9299 | 0.5769 |
60
+ | No log | 1.1450 | 300 | 1.2999 | 0.7631 | 0.9739 | 0.77 |
61
+ | No log | 1.5267 | 400 | 0.9551 | 0.8506 | 0.9870 | 0.8515 |
62
+ | 1.716 | 1.9084 | 500 | 0.8384 | 0.8785 | 0.9923 | 0.8785 |
63
+ | 1.716 | 2.2901 | 600 | 0.7623 | 0.9156 | 0.9948 | 0.9162 |
64
+ | 1.716 | 2.6718 | 700 | 0.7340 | 0.9243 | 0.9956 | 0.9246 |
65
+
66
+
67
+ ### Framework versions
68
+
69
+ - Transformers 4.46.3
70
+ - Pytorch 2.1.0+cu118
71
+ - Datasets 3.1.0
72
+ - Tokenizers 0.20.3
config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "[Should Not Do] Legal Compliance/Illegal",
14
+ "1": "[Should Not Do] Information Hazards",
15
+ "2": "[Should Not Do] Intellectual Property Rights",
16
+ "3": "[Should Not Do] Privacy",
17
+ "4": "[Should Not Do] NSFW Content",
18
+ "5": "[Cannot Do] Modalities",
19
+ "6": "[Cannot Do] Skills",
20
+ "7": "[Cannot Do] Missing Information \u2013 Knowledge Cutoff",
21
+ "8": "[Cannot Do] Missing Information \u2013 Unknown Unknown Information",
22
+ "9": "[Cannot Do] Training Data Limits",
23
+ "10": "[Cannot Do] Missing Information \u2013 Missing Context",
24
+ "11": "[Cannot Do] Missing Identity",
25
+ "12": "[Cannot Do] Invalid Premise"
26
+ },
27
+ "initializer_range": 0.02,
28
+ "intermediate_size": 3072,
29
+ "label2id": {
30
+ "[Cannot Do] Invalid Premise": 12,
31
+ "[Cannot Do] Missing Identity": 11,
32
+ "[Cannot Do] Missing Information \u2013 Knowledge Cutoff": 7,
33
+ "[Cannot Do] Missing Information \u2013 Missing Context": 10,
34
+ "[Cannot Do] Missing Information \u2013 Unknown Unknown Information": 8,
35
+ "[Cannot Do] Modalities": 5,
36
+ "[Cannot Do] Skills": 6,
37
+ "[Cannot Do] Training Data Limits": 9,
38
+ "[Should Not Do] Information Hazards": 1,
39
+ "[Should Not Do] Intellectual Property Rights": 2,
40
+ "[Should Not Do] Legal Compliance/Illegal": 0,
41
+ "[Should Not Do] NSFW Content": 4,
42
+ "[Should Not Do] Privacy": 3
43
+ },
44
+ "layer_norm_eps": 1e-12,
45
+ "max_position_embeddings": 512,
46
+ "model_type": "bert",
47
+ "num_attention_heads": 12,
48
+ "num_hidden_layers": 12,
49
+ "pad_token_id": 0,
50
+ "position_embedding_type": "absolute",
51
+ "problem_type": "single_label_classification",
52
+ "torch_dtype": "float32",
53
+ "transformers_version": "4.46.3",
54
+ "type_vocab_size": 2,
55
+ "use_cache": true,
56
+ "vocab_size": 30522
57
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adac66880ce987efe150e25a52718926a5b33d39e407b75b4c7dfbe26801d056
3
+ size 437992484
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "mask_token": "[MASK]",
48
+ "model_max_length": 512,
49
+ "pad_token": "[PAD]",
50
+ "sep_token": "[SEP]",
51
+ "strip_accents": null,
52
+ "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "BertTokenizer",
54
+ "unk_token": "[UNK]"
55
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08f3e5c6ed6a47b2ec31a33e269027e460eb04602a1912286c2a5c8e32bd0ce3
3
+ size 5240
vocab.txt ADDED
The diff for this file is too large to render. See raw diff