bert finetuned model for intent detection
Browse files- README.md +109 -3
- config.json +57 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,109 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google-bert/bert-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: bert_intent
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# bert_intent
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on an unknown dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.0169
|
21 |
+
- Accuracy: 0.9982
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
More information needed
|
26 |
+
|
27 |
+
## Intended uses & limitations
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Training and evaluation data
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
|
37 |
+
### Training hyperparameters
|
38 |
+
|
39 |
+
The following hyperparameters were used during training:
|
40 |
+
- learning_rate: 1e-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: 50
|
47 |
+
|
48 |
+
### Training results
|
49 |
+
|
50 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
51 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
52 |
+
| 0.2615 | 1.0 | 692 | 0.0516 | 0.9809 |
|
53 |
+
| 0.0191 | 2.0 | 1384 | 0.0231 | 0.9947 |
|
54 |
+
| 0.0083 | 3.0 | 2076 | 0.0140 | 0.9982 |
|
55 |
+
| 0.0051 | 4.0 | 2768 | 0.0101 | 0.9975 |
|
56 |
+
| 0.0028 | 5.0 | 3460 | 0.0075 | 0.9979 |
|
57 |
+
| 0.0013 | 6.0 | 4152 | 0.0064 | 0.9979 |
|
58 |
+
| 0.0008 | 7.0 | 4844 | 0.0073 | 0.9979 |
|
59 |
+
| 0.0004 | 8.0 | 5536 | 0.0069 | 0.9979 |
|
60 |
+
| 0.0003 | 9.0 | 6228 | 0.0072 | 0.9979 |
|
61 |
+
| 0.0002 | 10.0 | 6920 | 0.0075 | 0.9979 |
|
62 |
+
| 0.0002 | 11.0 | 7612 | 0.0077 | 0.9979 |
|
63 |
+
| 0.0001 | 12.0 | 8304 | 0.0080 | 0.9979 |
|
64 |
+
| 0.0001 | 13.0 | 8996 | 0.0083 | 0.9979 |
|
65 |
+
| 0.0001 | 14.0 | 9688 | 0.0087 | 0.9979 |
|
66 |
+
| 0.0 | 15.0 | 10380 | 0.0093 | 0.9979 |
|
67 |
+
| 0.0 | 16.0 | 11072 | 0.0097 | 0.9982 |
|
68 |
+
| 0.0 | 17.0 | 11764 | 0.0096 | 0.9979 |
|
69 |
+
| 0.0 | 18.0 | 12456 | 0.0106 | 0.9979 |
|
70 |
+
| 0.0 | 19.0 | 13148 | 0.0108 | 0.9979 |
|
71 |
+
| 0.0 | 20.0 | 13840 | 0.0110 | 0.9979 |
|
72 |
+
| 0.0 | 21.0 | 14532 | 0.0111 | 0.9979 |
|
73 |
+
| 0.0 | 22.0 | 15224 | 0.0116 | 0.9979 |
|
74 |
+
| 0.0 | 23.0 | 15916 | 0.0116 | 0.9979 |
|
75 |
+
| 0.0 | 24.0 | 16608 | 0.0125 | 0.9982 |
|
76 |
+
| 0.0 | 25.0 | 17300 | 0.0130 | 0.9982 |
|
77 |
+
| 0.0 | 26.0 | 17992 | 0.0124 | 0.9979 |
|
78 |
+
| 0.0 | 27.0 | 18684 | 0.0129 | 0.9979 |
|
79 |
+
| 0.0 | 28.0 | 19376 | 0.0138 | 0.9982 |
|
80 |
+
| 0.0 | 29.0 | 20068 | 0.0140 | 0.9982 |
|
81 |
+
| 0.0 | 30.0 | 20760 | 0.0145 | 0.9982 |
|
82 |
+
| 0.0 | 31.0 | 21452 | 0.0144 | 0.9982 |
|
83 |
+
| 0.0 | 32.0 | 22144 | 0.0146 | 0.9982 |
|
84 |
+
| 0.0 | 33.0 | 22836 | 0.0152 | 0.9982 |
|
85 |
+
| 0.0 | 34.0 | 23528 | 0.0151 | 0.9982 |
|
86 |
+
| 0.0 | 35.0 | 24220 | 0.0151 | 0.9982 |
|
87 |
+
| 0.0 | 36.0 | 24912 | 0.0153 | 0.9982 |
|
88 |
+
| 0.0 | 37.0 | 25604 | 0.0155 | 0.9982 |
|
89 |
+
| 0.0 | 38.0 | 26296 | 0.0158 | 0.9982 |
|
90 |
+
| 0.0 | 39.0 | 26988 | 0.0159 | 0.9982 |
|
91 |
+
| 0.0 | 40.0 | 27680 | 0.0163 | 0.9982 |
|
92 |
+
| 0.0 | 41.0 | 28372 | 0.0168 | 0.9982 |
|
93 |
+
| 0.0 | 42.0 | 29064 | 0.0167 | 0.9982 |
|
94 |
+
| 0.0 | 43.0 | 29756 | 0.0167 | 0.9982 |
|
95 |
+
| 0.0 | 44.0 | 30448 | 0.0168 | 0.9982 |
|
96 |
+
| 0.0 | 45.0 | 31140 | 0.0168 | 0.9982 |
|
97 |
+
| 0.0 | 46.0 | 31832 | 0.0168 | 0.9982 |
|
98 |
+
| 0.0 | 47.0 | 32524 | 0.0168 | 0.9982 |
|
99 |
+
| 0.0 | 48.0 | 33216 | 0.0168 | 0.9982 |
|
100 |
+
| 0.0 | 49.0 | 33908 | 0.0169 | 0.9982 |
|
101 |
+
| 0.0 | 50.0 | 34600 | 0.0169 | 0.9982 |
|
102 |
+
|
103 |
+
|
104 |
+
### Framework versions
|
105 |
+
|
106 |
+
- Transformers 4.41.2
|
107 |
+
- Pytorch 2.3.1
|
108 |
+
- Datasets 2.19.2
|
109 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google-bert/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": "storage-system-details",
|
14 |
+
"1": "tenant-notifications",
|
15 |
+
"2": "storage-system-volume",
|
16 |
+
"3": "storage-system-notification",
|
17 |
+
"4": "Tenant-List",
|
18 |
+
"5": "tenant-alerts",
|
19 |
+
"6": "storage-list",
|
20 |
+
"7": "storage-system-metric",
|
21 |
+
"8": "storage-system-alert",
|
22 |
+
"9": "chatbot-capabilities",
|
23 |
+
"10": "unknown",
|
24 |
+
"11": "greetings",
|
25 |
+
"12": "thanking"
|
26 |
+
},
|
27 |
+
"initializer_range": 0.02,
|
28 |
+
"intermediate_size": 3072,
|
29 |
+
"label2id": {
|
30 |
+
"Tenant-List": 4,
|
31 |
+
"chatbot-capabilities": 9,
|
32 |
+
"greetings": 11,
|
33 |
+
"storage-list": 6,
|
34 |
+
"storage-system-alert": 8,
|
35 |
+
"storage-system-details": 0,
|
36 |
+
"storage-system-metric": 7,
|
37 |
+
"storage-system-notification": 3,
|
38 |
+
"storage-system-volume": 2,
|
39 |
+
"tenant-alerts": 5,
|
40 |
+
"tenant-notifications": 1,
|
41 |
+
"thanking": 12,
|
42 |
+
"unknown": 10
|
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.41.2",
|
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:944efb2c5f66f8bbc0282522f089f390a1a71f17772101cc20e537cc7ea6f709
|
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": true,
|
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:967858ef3b30321a441863808d225cba0200a775cf3db7d0d4d352e073565a1f
|
3 |
+
size 5048
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|