baptiste-pasquier commited on
Commit
aee3262
1 Parent(s): 9514fa9
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - fr
4
+ license: mit
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - allocine
9
+ widget:
10
+ - text: "Un film magnifique avec un duo d'acteurs excellent."
11
+ - text: "Grosse déception pour ce thriller qui peine à convaincre."
12
+ metrics:
13
+ - accuracy
14
+ - f1
15
+ - precision
16
+ - recall
17
+ model-index:
18
+ - name: camembert-allocine
19
+ results:
20
+ - task:
21
+ name: Text Classification
22
+ type: text-classification
23
+ dataset:
24
+ name: allocine
25
+ type: allocine
26
+ config: allocine
27
+ split: validation
28
+ args: allocine
29
+ metrics:
30
+ - name: Accuracy
31
+ type: accuracy
32
+ value: 0.97535
33
+ - name: F1
34
+ type: f1
35
+ value: 0.9749045558666326
36
+ - name: Precision
37
+ type: precision
38
+ value: 0.9722814498933902
39
+ - name: Recall
40
+ type: recall
41
+ value: 0.9775418538178848
42
+ ---
43
+
44
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
45
+ should probably proofread and complete it, then remove this comment. -->
46
+
47
+ # camembert-allocine
48
+
49
+ This model is a fine-tuned version of [camembert-base](https://huggingface.co/camembert-base) on the allocine dataset.
50
+ It achieves the following results on the evaluation set:
51
+ - Loss: 0.0928
52
+ - Accuracy: 0.9754
53
+ - F1: 0.9749
54
+ - Precision: 0.9723
55
+ - Recall: 0.9775
56
+
57
+ ## Model description
58
+
59
+ More information needed
60
+
61
+ ## Intended uses & limitations
62
+
63
+ More information needed
64
+
65
+ ## Training and evaluation data
66
+
67
+ More information needed
68
+
69
+ ## Training procedure
70
+
71
+ ### Training hyperparameters
72
+
73
+ The following hyperparameters were used during training:
74
+ - learning_rate: 5e-05
75
+ - train_batch_size: 16
76
+ - eval_batch_size: 16
77
+ - seed: 42
78
+ - gradient_accumulation_steps: 4
79
+ - total_train_batch_size: 64
80
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
81
+ - lr_scheduler_type: linear
82
+ - lr_scheduler_warmup_steps: 500
83
+ - num_epochs: 3
84
+
85
+ ### Training results
86
+
87
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
88
+ | :-----------: | :---: | :---: | :-------------: | :------: | :----: | :-------: | :----: |
89
+ | 0.1276 | 0.2 | 500 | 0.1187 | 0.9623 | 0.9622 | 0.9462 | 0.9787 |
90
+ | 0.1013 | 0.4 | 1000 | 0.0917 | 0.9683 | 0.9675 | 0.9725 | 0.9625 |
91
+ | 0.1254 | 0.6 | 1500 | 0.0889 | 0.9701 | 0.9698 | 0.9597 | 0.9801 |
92
+ | 0.1004 | 0.8 | 2000 | 0.0792 | 0.9716 | 0.9709 | 0.9727 | 0.9691 |
93
+ | 0.1149 | 1.0 | 2500 | 0.0762 | 0.9727 | 0.9723 | 0.9673 | 0.9773 |
94
+ | 0.0574 | 1.2 | 3000 | 0.0849 | 0.9733 | 0.9729 | 0.9679 | 0.9780 |
95
+ | 0.0394 | 1.4 | 3500 | 0.1026 | 0.9718 | 0.9715 | 0.9595 | 0.9839 |
96
+ | 0.0401 | 1.6 | 4000 | 0.1065 | 0.9698 | 0.9697 | 0.9528 | 0.9872 |
97
+ | 0.0458 | 1.8 | 4500 | 0.0834 | 0.9744 | 0.9739 | 0.9715 | 0.9764 |
98
+ | 0.0554 | 2.0 | 5000 | 0.0873 | 0.9719 | 0.9717 | 0.9594 | 0.9844 |
99
+ | 0.0516 | 2.2 | 5500 | 0.0928 | 0.9754 | 0.9749 | 0.9723 | 0.9775 |
100
+ | 0.0355 | 2.4 | 6000 | 0.1017 | 0.9744 | 0.9741 | 0.9642 | 0.9842 |
101
+ | 0.0227 | 2.6 | 6500 | 0.0983 | 0.9748 | 0.9743 | 0.9729 | 0.9757 |
102
+ | 0.0359 | 2.8 | 7000 | 0.0990 | 0.9747 | 0.9743 | 0.9665 | 0.9823 |
103
+ | 0.0384 | 3.0 | 7500 | 0.1001 | 0.9746 | 0.9742 | 0.9662 | 0.9824 |
104
+
105
+
106
+ ### Framework versions
107
+
108
+ - Transformers 4.26.1
109
+ - Pytorch 1.13.1+cu117
110
+ - Datasets 2.10.1
111
+ - Tokenizers 0.13.2
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "camembert-base",
3
+ "architectures": [
4
+ "CamembertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 5,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 6,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "NEGATIVE",
15
+ "1": "POSITIVE"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "NEGATIVE": 0,
21
+ "POSITIVE": 1
22
+ },
23
+ "layer_norm_eps": 1e-05,
24
+ "max_position_embeddings": 514,
25
+ "model_type": "camembert",
26
+ "num_attention_heads": 12,
27
+ "num_hidden_layers": 12,
28
+ "output_past": true,
29
+ "pad_token_id": 1,
30
+ "position_embedding_type": "absolute",
31
+ "problem_type": "single_label_classification",
32
+ "torch_dtype": "float32",
33
+ "transformers_version": "4.26.1",
34
+ "type_vocab_size": 1,
35
+ "use_cache": true,
36
+ "vocab_size": 32005
37
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fb56261d3f2b4685da2b6fa1c0ba1a6b899cefae578120d5d229f5c4023dc4f
3
+ size 442567349
results/all_results.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.97535,
4
+ "eval_f1": 0.9749045558666326,
5
+ "eval_loss": 0.09278112649917603,
6
+ "eval_precision": 0.9722814498933902,
7
+ "eval_recall": 0.9775418538178848,
8
+ "eval_runtime": 144.2966,
9
+ "eval_samples": 20000,
10
+ "eval_samples_per_second": 138.603,
11
+ "eval_steps_per_second": 8.663,
12
+ "test_accuracy": 0.975,
13
+ "test_f1": 0.9739583333333334,
14
+ "test_loss": 0.0953332856297493,
15
+ "test_precision": 0.9731473771856786,
16
+ "test_recall": 0.9747706422018348,
17
+ "test_runtime": 144.7582,
18
+ "test_samples": 20000,
19
+ "test_samples_per_second": 138.161,
20
+ "test_steps_per_second": 8.635,
21
+ "total_flos": 9.043732950372576e+16,
22
+ "train_loss": 0.07549678431898356,
23
+ "train_runtime": 12137.3214,
24
+ "train_samples": 160000,
25
+ "train_samples_per_second": 39.547,
26
+ "train_steps_per_second": 0.618
27
+ }
results/eval_results.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.97535,
4
+ "eval_f1": 0.9749045558666326,
5
+ "eval_loss": 0.09278112649917603,
6
+ "eval_precision": 0.9722814498933902,
7
+ "eval_recall": 0.9775418538178848,
8
+ "eval_runtime": 144.2966,
9
+ "eval_samples": 20000,
10
+ "eval_samples_per_second": 138.603,
11
+ "eval_steps_per_second": 8.663
12
+ }
results/test_results.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_accuracy": 0.975,
3
+ "test_f1": 0.9739583333333334,
4
+ "test_loss": 0.0953332856297493,
5
+ "test_precision": 0.9731473771856786,
6
+ "test_recall": 0.9747706422018348,
7
+ "test_runtime": 144.7582,
8
+ "test_samples": 20000,
9
+ "test_samples_per_second": 138.161,
10
+ "test_steps_per_second": 8.635
11
+ }
results/train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "total_flos": 9.043732950372576e+16,
4
+ "train_loss": 0.07549678431898356,
5
+ "train_runtime": 12137.3214,
6
+ "train_samples": 160000,
7
+ "train_samples_per_second": 39.547,
8
+ "train_steps_per_second": 0.618
9
+ }
results/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
runs/Mar14_21-24-53_job-21a4d5b5-668d-4516-81af-efb9d86b663b/1678829106.2500846/events.out.tfevents.1678829106.job-21a4d5b5-668d-4516-81af-efb9d86b663b.39288.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d62e1c603dfec33f323083dab0cba1109f4bb0b5e3d347c63a8d5687ee415a33
3
+ size 5726
runs/Mar14_21-24-53_job-21a4d5b5-668d-4516-81af-efb9d86b663b/events.out.tfevents.1678829106.job-21a4d5b5-668d-4516-81af-efb9d86b663b.39288.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:475939791ec8570faab8177283400283e9633a8e7462b981d58e82e00948fbfa
3
+ size 129321
runs/Mar14_21-24-53_job-21a4d5b5-668d-4516-81af-efb9d86b663b/events.out.tfevents.1678841388.job-21a4d5b5-668d-4516-81af-efb9d86b663b.39288.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:523aa9e5c940567568a81960a9315fb84dc075defb7442cbd30b32e2cdc94c29
3
+ size 512
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
3
+ size 810912
special_tokens_map.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</s>",
9
+ "mask_token": {
10
+ "content": "<mask>",
11
+ "lstrip": true,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<pad>",
17
+ "sep_token": "</s>",
18
+ "unk_token": "<unk>"
19
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1cb0f66a04e3316e7c5eb0b4aaecd89b900167bad7c103d4cf256dc53f40a00
3
+ size 442783552
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</s>",
9
+ "mask_token": {
10
+ "__type": "AddedToken",
11
+ "content": "<mask>",
12
+ "lstrip": true,
13
+ "normalized": true,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ "model_max_length": 512,
18
+ "name_or_path": "camembert-base",
19
+ "pad_token": "<pad>",
20
+ "sep_token": "</s>",
21
+ "special_tokens_map_file": null,
22
+ "tokenizer_class": "CamembertTokenizer",
23
+ "unk_token": "<unk>"
24
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:159ca7271c5eb2c3c8bd4de654c07c9b8b179aaf1ef106cd87e9712a62a8e0cc
3
+ size 3515