ai-research-lab/bert-question-classifier
Browse files- README.md +14 -18
- config.json +146 -50
- model.safetensors +2 -2
- training_args.bin +1 -1
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
license: apache-2.0
|
4 |
-
base_model: google-bert/bert-
|
5 |
tags:
|
6 |
- generated_from_trainer
|
7 |
metrics:
|
@@ -19,13 +19,13 @@ should probably proofread and complete it, then remove this comment. -->
|
|
19 |
|
20 |
# bert-question-classifier
|
21 |
|
22 |
-
This model is a fine-tuned version of [google-bert/bert-
|
23 |
It achieves the following results on the evaluation set:
|
24 |
-
- Loss:
|
25 |
-
- Accuracy: 0.
|
26 |
-
- Recall: 0.
|
27 |
-
- Precision: 0.
|
28 |
-
- F1: 0.
|
29 |
|
30 |
## Model description
|
31 |
|
@@ -44,28 +44,24 @@ More information needed
|
|
44 |
### Training hyperparameters
|
45 |
|
46 |
The following hyperparameters were used during training:
|
47 |
-
- learning_rate:
|
48 |
-
- train_batch_size:
|
49 |
-
- eval_batch_size:
|
50 |
- seed: 42
|
51 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
52 |
- lr_scheduler_type: linear
|
53 |
-
- num_epochs:
|
54 |
|
55 |
### Training results
|
56 |
|
57 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Recall | Precision | F1 |
|
58 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
59 |
-
| No log | 1.0 |
|
60 |
-
| No log | 2.0 | 390 | 0.9270 | 0.9683 | 0.9186 | 0.9091 | 0.9138 |
|
61 |
-
| 1.2215 | 3.0 | 585 | 0.9714 | 0.9676 | 0.9155 | 0.9081 | 0.9118 |
|
62 |
-
| 1.2215 | 4.0 | 780 | 1.0289 | 0.9678 | 0.9167 | 0.9082 | 0.9124 |
|
63 |
-
| 1.2215 | 5.0 | 975 | 1.0482 | 0.9685 | 0.9174 | 0.9111 | 0.9142 |
|
64 |
|
65 |
|
66 |
### Framework versions
|
67 |
|
68 |
-
- Transformers 4.
|
69 |
-
- Pytorch 2.5.1
|
70 |
- Datasets 3.2.0
|
71 |
- Tokenizers 0.21.0
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
license: apache-2.0
|
4 |
+
base_model: google-bert/bert-base-uncased
|
5 |
tags:
|
6 |
- generated_from_trainer
|
7 |
metrics:
|
|
|
19 |
|
20 |
# bert-question-classifier
|
21 |
|
22 |
+
This model is a fine-tuned version of [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on the None dataset.
|
23 |
It achieves the following results on the evaluation set:
|
24 |
+
- Loss: 2.7007
|
25 |
+
- Accuracy: 0.9562
|
26 |
+
- Recall: 0.7745
|
27 |
+
- Precision: 0.7606
|
28 |
+
- F1: 0.7675
|
29 |
|
30 |
## Model description
|
31 |
|
|
|
44 |
### Training hyperparameters
|
45 |
|
46 |
The following hyperparameters were used during training:
|
47 |
+
- learning_rate: 2e-05
|
48 |
+
- train_batch_size: 8
|
49 |
+
- eval_batch_size: 8
|
50 |
- seed: 42
|
51 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
52 |
- lr_scheduler_type: linear
|
53 |
+
- num_epochs: 1
|
54 |
|
55 |
### Training results
|
56 |
|
57 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Recall | Precision | F1 |
|
58 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
59 |
+
| No log | 1.0 | 390 | 2.7007 | 0.9562 | 0.7745 | 0.7606 | 0.7675 |
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
### Framework versions
|
63 |
|
64 |
+
- Transformers 4.48.1
|
65 |
+
- Pytorch 2.5.1
|
66 |
- Datasets 3.2.0
|
67 |
- Tokenizers 0.21.0
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "google-bert/bert-
|
3 |
"architectures": [
|
4 |
"BertForSequenceClassification"
|
5 |
],
|
@@ -8,54 +8,86 @@
|
|
8 |
"gradient_checkpointing": false,
|
9 |
"hidden_act": "gelu",
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
-
"hidden_size":
|
12 |
"id2label": {
|
13 |
"0": "d",
|
14 |
"1": "y",
|
15 |
"2": "c",
|
16 |
"3": "o",
|
17 |
-
"4": "
|
18 |
-
"5": "
|
19 |
-
"6": "
|
20 |
-
"7": "
|
21 |
-
"8": "
|
22 |
-
"9": "
|
23 |
-
"10": "
|
24 |
-
"11": "
|
25 |
-
"12": "
|
26 |
-
"13": "
|
27 |
-
"14": "
|
28 |
-
"15": "
|
29 |
-
"16": "
|
30 |
-
"17": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
},
|
32 |
"initializer_range": 0.02,
|
33 |
-
"intermediate_size":
|
34 |
"label2id": {
|
35 |
-
"
|
|
|
36 |
"c": 2,
|
37 |
-
"career":
|
|
|
|
|
38 |
"d": 0,
|
39 |
-
"
|
40 |
-
"
|
41 |
-
"
|
42 |
-
"
|
43 |
-
"
|
44 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
"o": 3,
|
46 |
-
"
|
47 |
-
"
|
48 |
-
"
|
49 |
-
"
|
50 |
-
"
|
51 |
-
"
|
|
|
|
|
|
|
|
|
|
|
52 |
"y": 1
|
53 |
},
|
54 |
"layer_norm_eps": 1e-12,
|
55 |
"max_position_embeddings": 512,
|
56 |
"model_type": "bert",
|
57 |
-
"num_attention_heads":
|
58 |
-
"num_hidden_layers":
|
59 |
"pad_token_id": 0,
|
60 |
"position_embedding_type": "absolute",
|
61 |
"task_specific_params": {
|
@@ -88,52 +120,116 @@
|
|
88 |
"column": "category",
|
89 |
"labels": [
|
90 |
[
|
91 |
-
"
|
92 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
],
|
94 |
[
|
95 |
"family",
|
96 |
"Family"
|
97 |
],
|
98 |
[
|
99 |
-
"
|
100 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
],
|
102 |
[
|
103 |
"love",
|
104 |
"Love"
|
105 |
],
|
106 |
[
|
107 |
-
"
|
108 |
-
"
|
109 |
],
|
110 |
[
|
111 |
-
"
|
112 |
-
"
|
113 |
],
|
114 |
[
|
115 |
-
"
|
116 |
-
"
|
117 |
],
|
118 |
[
|
119 |
-
"
|
120 |
-
"
|
|
|
|
|
|
|
|
|
121 |
],
|
122 |
[
|
123 |
"hard times",
|
124 |
"Hard Times"
|
125 |
],
|
126 |
[
|
127 |
-
"
|
128 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
],
|
130 |
[
|
131 |
"spirituality",
|
132 |
"Spirituality"
|
133 |
],
|
134 |
[
|
135 |
-
"
|
136 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
]
|
138 |
],
|
139 |
"loss_weight": 1,
|
@@ -172,7 +268,7 @@
|
|
172 |
}
|
173 |
},
|
174 |
"torch_dtype": "float32",
|
175 |
-
"transformers_version": "4.
|
176 |
"type_vocab_size": 2,
|
177 |
"use_cache": true,
|
178 |
"vocab_size": 30522
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "google-bert/bert-base-uncased",
|
3 |
"architectures": [
|
4 |
"BertForSequenceClassification"
|
5 |
],
|
|
|
8 |
"gradient_checkpointing": false,
|
9 |
"hidden_act": "gelu",
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
"id2label": {
|
13 |
"0": "d",
|
14 |
"1": "y",
|
15 |
"2": "c",
|
16 |
"3": "o",
|
17 |
+
"4": "self",
|
18 |
+
"5": "health",
|
19 |
+
"6": "accumulated wealth",
|
20 |
+
"7": "family",
|
21 |
+
"8": "social media",
|
22 |
+
"9": "short travel",
|
23 |
+
"10": "sports",
|
24 |
+
"11": "property",
|
25 |
+
"12": "primary education",
|
26 |
+
"13": "love",
|
27 |
+
"14": "romance",
|
28 |
+
"15": "children",
|
29 |
+
"16": "higher education",
|
30 |
+
"17": "job",
|
31 |
+
"18": "diseases",
|
32 |
+
"19": "hard times",
|
33 |
+
"20": "competitive exam",
|
34 |
+
"21": "marriage",
|
35 |
+
"22": "business",
|
36 |
+
"23": "life span",
|
37 |
+
"24": "unearned wealth",
|
38 |
+
"25": "spirituality",
|
39 |
+
"26": "highest education",
|
40 |
+
"27": "long travel",
|
41 |
+
"28": "career",
|
42 |
+
"29": "income",
|
43 |
+
"30": "foreign",
|
44 |
+
"31": "expense",
|
45 |
+
"32": "time_based",
|
46 |
+
"33": "positive_perception"
|
47 |
},
|
48 |
"initializer_range": 0.02,
|
49 |
+
"intermediate_size": 3072,
|
50 |
"label2id": {
|
51 |
+
"accumulated wealth": 6,
|
52 |
+
"business": 22,
|
53 |
"c": 2,
|
54 |
+
"career": 28,
|
55 |
+
"children": 15,
|
56 |
+
"competitive exam": 20,
|
57 |
"d": 0,
|
58 |
+
"diseases": 18,
|
59 |
+
"expense": 31,
|
60 |
+
"family": 7,
|
61 |
+
"foreign": 30,
|
62 |
+
"hard times": 19,
|
63 |
+
"health": 5,
|
64 |
+
"higher education": 16,
|
65 |
+
"highest education": 26,
|
66 |
+
"income": 29,
|
67 |
+
"job": 17,
|
68 |
+
"life span": 23,
|
69 |
+
"long travel": 27,
|
70 |
+
"love": 13,
|
71 |
+
"marriage": 21,
|
72 |
"o": 3,
|
73 |
+
"positive_perception": 33,
|
74 |
+
"primary education": 12,
|
75 |
+
"property": 11,
|
76 |
+
"romance": 14,
|
77 |
+
"self": 4,
|
78 |
+
"short travel": 9,
|
79 |
+
"social media": 8,
|
80 |
+
"spirituality": 25,
|
81 |
+
"sports": 10,
|
82 |
+
"time_based": 32,
|
83 |
+
"unearned wealth": 24,
|
84 |
"y": 1
|
85 |
},
|
86 |
"layer_norm_eps": 1e-12,
|
87 |
"max_position_embeddings": 512,
|
88 |
"model_type": "bert",
|
89 |
+
"num_attention_heads": 12,
|
90 |
+
"num_hidden_layers": 12,
|
91 |
"pad_token_id": 0,
|
92 |
"position_embedding_type": "absolute",
|
93 |
"task_specific_params": {
|
|
|
120 |
"column": "category",
|
121 |
"labels": [
|
122 |
[
|
123 |
+
"self",
|
124 |
+
"Self"
|
125 |
+
],
|
126 |
+
[
|
127 |
+
"health",
|
128 |
+
"Health"
|
129 |
+
],
|
130 |
+
[
|
131 |
+
"accumulated wealth",
|
132 |
+
"Accumulated Wealth"
|
133 |
],
|
134 |
[
|
135 |
"family",
|
136 |
"Family"
|
137 |
],
|
138 |
[
|
139 |
+
"social media",
|
140 |
+
"Social media"
|
141 |
+
],
|
142 |
+
[
|
143 |
+
"short travel",
|
144 |
+
"Short Travel"
|
145 |
+
],
|
146 |
+
[
|
147 |
+
"sports",
|
148 |
+
"Sports"
|
149 |
+
],
|
150 |
+
[
|
151 |
+
"property",
|
152 |
+
"Property"
|
153 |
+
],
|
154 |
+
[
|
155 |
+
"primary education",
|
156 |
+
"Primary Education"
|
157 |
],
|
158 |
[
|
159 |
"love",
|
160 |
"Love"
|
161 |
],
|
162 |
[
|
163 |
+
"romance",
|
164 |
+
"Romance"
|
165 |
],
|
166 |
[
|
167 |
+
"children",
|
168 |
+
"Children"
|
169 |
],
|
170 |
[
|
171 |
+
"higher education",
|
172 |
+
"Higher Education"
|
173 |
],
|
174 |
[
|
175 |
+
"job",
|
176 |
+
"Job"
|
177 |
+
],
|
178 |
+
[
|
179 |
+
"diseases",
|
180 |
+
"Diseases"
|
181 |
],
|
182 |
[
|
183 |
"hard times",
|
184 |
"Hard Times"
|
185 |
],
|
186 |
[
|
187 |
+
"competitive exam",
|
188 |
+
"Competitive Exam"
|
189 |
+
],
|
190 |
+
[
|
191 |
+
"marriage",
|
192 |
+
"Marriage"
|
193 |
+
],
|
194 |
+
[
|
195 |
+
"business",
|
196 |
+
"Business"
|
197 |
+
],
|
198 |
+
[
|
199 |
+
"life span",
|
200 |
+
"Life Span"
|
201 |
+
],
|
202 |
+
[
|
203 |
+
"unearned wealth",
|
204 |
+
"Unearned Wealth"
|
205 |
],
|
206 |
[
|
207 |
"spirituality",
|
208 |
"Spirituality"
|
209 |
],
|
210 |
[
|
211 |
+
"highest education",
|
212 |
+
"Highest Education"
|
213 |
+
],
|
214 |
+
[
|
215 |
+
"long travel",
|
216 |
+
"Long Travel"
|
217 |
+
],
|
218 |
+
[
|
219 |
+
"career",
|
220 |
+
"Career"
|
221 |
+
],
|
222 |
+
[
|
223 |
+
"income",
|
224 |
+
"Income"
|
225 |
+
],
|
226 |
+
[
|
227 |
+
"foreign",
|
228 |
+
"Foreign"
|
229 |
+
],
|
230 |
+
[
|
231 |
+
"expense",
|
232 |
+
"Expense"
|
233 |
]
|
234 |
],
|
235 |
"loss_weight": 1,
|
|
|
268 |
}
|
269 |
},
|
270 |
"torch_dtype": "float32",
|
271 |
+
"transformers_version": "4.48.1",
|
272 |
"type_vocab_size": 2,
|
273 |
"use_cache": true,
|
274 |
"vocab_size": 30522
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c77fda2b4c65c07eff0953a86be82328642faa5879226e815f216ed2a530d1cd
|
3 |
+
size 438057080
|
training_args.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 5368
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe326bedc7e4fe353d3f6f21804bc9d7be5961535ec6135868793cdc746e5fb8
|
3 |
size 5368
|