nie3e commited on
Commit
acc1550
1 Parent(s): 4bd5455

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -1
README.md CHANGED
@@ -3,7 +3,15 @@ tags:
3
  - generated_from_trainer
4
  model-index:
5
  - name: sentiment-polish-gpt2-large
6
- results: []
 
 
 
 
 
 
 
 
7
  license: mit
8
  datasets:
9
  - clarin-pl/polemo2-official
@@ -60,6 +68,8 @@ GPU: 2x RTX 4060Ti 16GB
60
 
61
  Training time: 29:16:50
62
 
 
 
63
  ### Training hyperparameters
64
 
65
  The following hyperparameters were used during training:
@@ -73,6 +83,48 @@ The following hyperparameters were used during training:
73
  - lr_scheduler_type: linear
74
  - num_epochs: 10
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  ### Framework versions
77
 
78
  - Transformers 4.37.2
 
3
  - generated_from_trainer
4
  model-index:
5
  - name: sentiment-polish-gpt2-large
6
+ results:
7
+ - task:
8
+ type: text-classification
9
+ dataset:
10
+ type: allegro/klej-polemo2-out
11
+ name: klej-polemo2-out
12
+ metrics:
13
+ - type: accuracy
14
+ value: 98.58%
15
  license: mit
16
  datasets:
17
  - clarin-pl/polemo2-official
 
68
 
69
  Training time: 29:16:50
70
 
71
+ Using accelerate + DeepSpeed
72
+
73
  ### Training hyperparameters
74
 
75
  The following hyperparameters were used during training:
 
83
  - lr_scheduler_type: linear
84
  - num_epochs: 10
85
 
86
+ ### Evaluation
87
+
88
+ Evaluated on [allegro/klej-polemo2-out](https://huggingface.co/datasets/allegro/klej-polemo2-out) test dataset.
89
+ ```py
90
+ from datasets import load_dataset
91
+ from evaluate import evaluator
92
+
93
+ data = load_dataset("allegro/klej-polemo2-out", split="test").shuffle(seed=42)
94
+ task_evaluator = evaluator("text-classification")
95
+
96
+ # fix labels
97
+ l = {
98
+ "__label__meta_zero": 0,
99
+ "__label__meta_minus_m": 1,
100
+ "__label__meta_plus_m": 2,
101
+ "__label__meta_amb": 3
102
+ }
103
+ def fix_labels(examples):
104
+ examples["target"] = l[examples["target"]]
105
+ return examples
106
+ data = data.map(fix_labels)
107
+
108
+ eval_resutls = task_evaluator.compute(
109
+ model_or_pipeline="nie3e/sentiment-polish-gpt2-large",
110
+ data=data,
111
+ label_mapping={"NEUTRAL": 0, "NEGATIVE": 1, "POSITIVE": 2, "AMBIGUOUS": 3},
112
+ input_column="sentence",
113
+ label_column="target"
114
+ )
115
+
116
+ print(eval_resutls)
117
+ ```
118
+
119
+ ```json
120
+ {
121
+ "accuracy": 0.9858299595141701,
122
+ "total_time_in_seconds": 12.71777104900002,
123
+ "samples_per_second": 38.8432845737416,
124
+ "latency_in_seconds": 0.02574447580769235
125
+ }
126
+ ```
127
+
128
  ### Framework versions
129
 
130
  - Transformers 4.37.2