AmineSa commited on
Commit
8d8bdea
1 Parent(s): ca63ebd

AraBert-finetuned-text-classification

Browse files
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: aubmindlab/bert-base-arabertv2
3
+ tags:
4
+ - generated_from_trainer
5
+ metrics:
6
+ - accuracy
7
+ - recall
8
+ model-index:
9
+ - name: AraBert-finetuned-text-classification
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
+ # AraBert-finetuned-text-classification
17
+
18
+ This model is a fine-tuned version of [aubmindlab/bert-base-arabertv2](https://huggingface.co/aubmindlab/bert-base-arabertv2) on the None dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.1147
21
+ - Macro F1: 0.9623
22
+ - Accuracy: 0.9623
23
+ - Recall: 0.9622
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - learning_rate: 4e-05
43
+ - train_batch_size: 32
44
+ - eval_batch_size: 32
45
+ - seed: 42
46
+ - gradient_accumulation_steps: 4
47
+ - total_train_batch_size: 128
48
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
49
+ - lr_scheduler_type: linear
50
+ - num_epochs: 10
51
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Accuracy | Validation Loss | Macro F1 | Recall |
55
+ |:-------------:|:-----:|:----:|:--------:|:---------------:|:--------:|:------:|
56
+ | No log | 0.99 | 56 | 0.9430 | 0.1530 | 0.9427 | 0.9425 |
57
+ | No log | 1.99 | 112 | 0.9579 | 0.1230 | 0.9577 | 0.9577 |
58
+ | No log | 3.0 | 169 | 0.9607 | 0.1287 | 0.9605 | 0.9608 |
59
+ | No log | 3.99 | 225 | 0.9618 | 0.1296 | 0.9616 | 0.9618 |
60
+ | No log | 5.0 | 282 | 0.9623 | 0.1147 | 0.9623 | 0.9622 |
61
+ | No log | 5.99 | 338 | 0.9612 | 0.1500 | 0.9611 | 0.9612 |
62
+ | No log | 7.0 | 395 | 0.9601 | 0.1953 | 0.9599 | 0.9602 |
63
+ | No log | 7.99 | 451 | 0.9640 | 0.1713 | 0.9639 | 0.9640 |
64
+ | 0.0526 | 9.0 | 508 | 0.9646 | 0.1748 | 0.9644 | 0.9645 |
65
+ | 0.0526 | 9.92 | 560 | 0.9646 | 0.1768 | 0.9644 | 0.9645 |
66
+
67
+
68
+ ### Framework versions
69
+
70
+ - Transformers 4.38.2
71
+ - Pytorch 2.1.0+cu121
72
+ - Datasets 2.18.0
73
+ - Tokenizers 0.15.2
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "aubmindlab/bert-base-arabertv2",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "\u0633\u064a\u0627\u0633\u0629",
13
+ "1": "\u0627\u0642\u062a\u0635\u0627\u062f",
14
+ "2": "\u0635\u062d\u0629"
15
+ },
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "LABEL_0": 0,
20
+ "LABEL_1": 1,
21
+ "LABEL_2": 2
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "max_position_embeddings": 512,
25
+ "model_type": "bert",
26
+ "num_attention_heads": 12,
27
+ "num_hidden_layers": 12,
28
+ "pad_token_id": 0,
29
+ "position_embedding_type": "absolute",
30
+ "problem_type": "single_label_classification",
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.38.2",
33
+ "type_vocab_size": 2,
34
+ "use_cache": true,
35
+ "vocab_size": 64000
36
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:456a160052cb408e7d5edf28653012868242b1e6f4b8389c64a49ab530229704
3
+ size 540806148
runs/Mar12_12-21-20_b3d30659946c/events.out.tfevents.1710246089.b3d30659946c.660.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:279d761357c44d3b934adc521b311d868cd294c842f54dabc6e401755830c483
3
+ size 4824
runs/Mar12_12-22-22_b3d30659946c/events.out.tfevents.1710246146.b3d30659946c.660.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c9f35bb4d302eda3fc77e0a1389634aebfef5fee64633ebf60cf174c8b2f4ab
3
+ size 4873
runs/Mar12_12-22-53_b3d30659946c/events.out.tfevents.1710246176.b3d30659946c.660.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e07be193a65a71f1beb557899ebf73229fedfcb4f2c8a51acc33dfa07109c6
3
+ size 4873
runs/Mar12_12-23-35_b3d30659946c/events.out.tfevents.1710246219.b3d30659946c.660.3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4033839b8fd5223bc8211027b545ee0f8c222fdf86a3c5745ffaeffab329c075
3
+ size 14499
runs/Mar12_12-23-35_b3d30659946c/events.out.tfevents.1710249676.b3d30659946c.660.4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4b061b5a815afd71bace6b681cbfeb65eb673e046d6e7970b773176d633693b
3
+ size 5269
runs/Mar12_12-23-35_b3d30659946c/events.out.tfevents.1710249701.b3d30659946c.660.5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66d04383f1826ec7c6db81b19732bf035c0a62625aa43333266523ae547a0aaf
3
+ size 5269
runs/Mar12_12-23-35_b3d30659946c/events.out.tfevents.1710249746.b3d30659946c.660.6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc757da40429308a6b6c6dd020dd512b16a2fe81364c37f9dbd7177e768fcc4d
3
+ size 513
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "+ا",
5
+ "lstrip": false,
6
+ "normalized": true,
7
+ "rstrip": false,
8
+ "single_word": true,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "+ك",
13
+ "lstrip": false,
14
+ "normalized": true,
15
+ "rstrip": false,
16
+ "single_word": true,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "ب+",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": true,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "+هم",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": true,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "+ات",
37
+ "lstrip": false,
38
+ "normalized": true,
39
+ "rstrip": false,
40
+ "single_word": true,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "+ي",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": true,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "ل+",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": true,
57
+ "special": true
58
+ },
59
+ "7": {
60
+ "content": "+هما",
61
+ "lstrip": false,
62
+ "normalized": true,
63
+ "rstrip": false,
64
+ "single_word": true,
65
+ "special": true
66
+ },
67
+ "8": {
68
+ "content": "+نا",
69
+ "lstrip": false,
70
+ "normalized": true,
71
+ "rstrip": false,
72
+ "single_word": true,
73
+ "special": true
74
+ },
75
+ "9": {
76
+ "content": "+ن",
77
+ "lstrip": false,
78
+ "normalized": true,
79
+ "rstrip": false,
80
+ "single_word": true,
81
+ "special": true
82
+ },
83
+ "10": {
84
+ "content": "+ها",
85
+ "lstrip": false,
86
+ "normalized": true,
87
+ "rstrip": false,
88
+ "single_word": true,
89
+ "special": true
90
+ },
91
+ "11": {
92
+ "content": "+كما",
93
+ "lstrip": false,
94
+ "normalized": true,
95
+ "rstrip": false,
96
+ "single_word": true,
97
+ "special": true
98
+ },
99
+ "12": {
100
+ "content": "+ة",
101
+ "lstrip": false,
102
+ "normalized": true,
103
+ "rstrip": false,
104
+ "single_word": true,
105
+ "special": true
106
+ },
107
+ "13": {
108
+ "content": "ف+",
109
+ "lstrip": false,
110
+ "normalized": true,
111
+ "rstrip": false,
112
+ "single_word": true,
113
+ "special": true
114
+ },
115
+ "14": {
116
+ "content": "+كم",
117
+ "lstrip": false,
118
+ "normalized": true,
119
+ "rstrip": false,
120
+ "single_word": true,
121
+ "special": true
122
+ },
123
+ "15": {
124
+ "content": "+كن",
125
+ "lstrip": false,
126
+ "normalized": true,
127
+ "rstrip": false,
128
+ "single_word": true,
129
+ "special": true
130
+ },
131
+ "16": {
132
+ "content": "+ت",
133
+ "lstrip": false,
134
+ "normalized": true,
135
+ "rstrip": false,
136
+ "single_word": true,
137
+ "special": true
138
+ },
139
+ "17": {
140
+ "content": "[بريد]",
141
+ "lstrip": false,
142
+ "normalized": true,
143
+ "rstrip": false,
144
+ "single_word": true,
145
+ "special": true
146
+ },
147
+ "18": {
148
+ "content": "[مستخدم]",
149
+ "lstrip": false,
150
+ "normalized": true,
151
+ "rstrip": false,
152
+ "single_word": true,
153
+ "special": true
154
+ },
155
+ "19": {
156
+ "content": "لل+",
157
+ "lstrip": false,
158
+ "normalized": true,
159
+ "rstrip": false,
160
+ "single_word": true,
161
+ "special": true
162
+ },
163
+ "20": {
164
+ "content": "ال+",
165
+ "lstrip": false,
166
+ "normalized": true,
167
+ "rstrip": false,
168
+ "single_word": true,
169
+ "special": true
170
+ },
171
+ "21": {
172
+ "content": "[رابط]",
173
+ "lstrip": false,
174
+ "normalized": true,
175
+ "rstrip": false,
176
+ "single_word": true,
177
+ "special": true
178
+ },
179
+ "22": {
180
+ "content": "س+",
181
+ "lstrip": false,
182
+ "normalized": true,
183
+ "rstrip": false,
184
+ "single_word": true,
185
+ "special": true
186
+ },
187
+ "23": {
188
+ "content": "+ان",
189
+ "lstrip": false,
190
+ "normalized": true,
191
+ "rstrip": false,
192
+ "single_word": true,
193
+ "special": true
194
+ },
195
+ "24": {
196
+ "content": "+وا",
197
+ "lstrip": false,
198
+ "normalized": true,
199
+ "rstrip": false,
200
+ "single_word": true,
201
+ "special": true
202
+ },
203
+ "25": {
204
+ "content": "+ه",
205
+ "lstrip": false,
206
+ "normalized": true,
207
+ "rstrip": false,
208
+ "single_word": true,
209
+ "special": true
210
+ },
211
+ "26": {
212
+ "content": "+ون",
213
+ "lstrip": false,
214
+ "normalized": true,
215
+ "rstrip": false,
216
+ "single_word": true,
217
+ "special": true
218
+ },
219
+ "27": {
220
+ "content": "+هن",
221
+ "lstrip": false,
222
+ "normalized": true,
223
+ "rstrip": false,
224
+ "single_word": true,
225
+ "special": true
226
+ },
227
+ "28": {
228
+ "content": "+ين",
229
+ "lstrip": false,
230
+ "normalized": true,
231
+ "rstrip": false,
232
+ "single_word": true,
233
+ "special": true
234
+ },
235
+ "29": {
236
+ "content": "��+",
237
+ "lstrip": false,
238
+ "normalized": true,
239
+ "rstrip": false,
240
+ "single_word": true,
241
+ "special": true
242
+ },
243
+ "30": {
244
+ "content": "ك+",
245
+ "lstrip": false,
246
+ "normalized": true,
247
+ "rstrip": false,
248
+ "single_word": true,
249
+ "special": true
250
+ },
251
+ "31": {
252
+ "content": "[PAD]",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "32": {
260
+ "content": "[UNK]",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "33": {
268
+ "content": "[CLS]",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "34": {
276
+ "content": "[SEP]",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "35": {
284
+ "content": "[MASK]",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ }
291
+ },
292
+ "clean_up_tokenization_spaces": true,
293
+ "cls_token": "[CLS]",
294
+ "do_basic_tokenize": true,
295
+ "do_lower_case": false,
296
+ "mask_token": "[MASK]",
297
+ "max_len": 512,
298
+ "model_max_length": 512,
299
+ "never_split": [
300
+ "+ك",
301
+ "+كما",
302
+ "ك+",
303
+ "+وا",
304
+ "+ين",
305
+ "و+",
306
+ "+كن",
307
+ "+ان",
308
+ "+هم",
309
+ "+ة",
310
+ "[بريد]",
311
+ "لل+",
312
+ "+ي",
313
+ "+ت",
314
+ "+ن",
315
+ "س+",
316
+ "ل+",
317
+ "[مستخدم]",
318
+ "+كم",
319
+ "+ا",
320
+ "ب+",
321
+ "ف+",
322
+ "+نا",
323
+ "+ها",
324
+ "+ون",
325
+ "+هما",
326
+ "ال+",
327
+ "+ه",
328
+ "+هن",
329
+ "+ات",
330
+ "[رابط]"
331
+ ],
332
+ "pad_token": "[PAD]",
333
+ "sep_token": "[SEP]",
334
+ "strip_accents": null,
335
+ "tokenize_chinese_chars": true,
336
+ "tokenizer_class": "BertTokenizer",
337
+ "unk_token": "[UNK]"
338
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17cfa63ecf7aad69aab67547831d779f753a4423421dc10bca5aa00af74b5b93
3
+ size 4920
vocab.txt ADDED
The diff for this file is too large to render. See raw diff