File size: 1,745 Bytes
d6174f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a8e2c96
d6174f8
 
 
 
 
 
 
 
a8e2c96
d6174f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
de528b3
d6174f8
 
 
 
 
a8e2c96
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
language:
- en
license: apache-2.0
datasets:
- glue
metrics:
- accuracy
model-index:
- name: gpt2-finetuned-sst2
  results:
  - task:
      name: Text Classification
      type: text-classification
    dataset:
      name: GLUE SST-2
      type: glue
      args: SST-2
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9254
---


# gpt2-finetuned-sst2

<!-- Provide a quick summary of what the model is/does. -->

This model is GPT-2 fine-tuned on GLUE SST-2 dataset. It acheives the following results on the validation set
- Accuracy: 0.9254


## Model Details
GPT-2 is a transformers model pretrained on a very large corpus of English data in a self-supervised fashion. 
This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts.
More precisely, it was trained to guess the next word in sentences. However, it acheives very good results on Text Classification tasks. 

## Training procedure


### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-5
- train_batch_size: 32
- eval_batch_size: 32
- seed: 123
- optimizer: epsilon=1e-08
- num_epochs: 4

### Training results


|Epoch | Training Loss | Training Accuracy | Validation Loss | Validation Accuracy |
|:----:|:-------------:|:-----------------:|:---------------:|:-------------------:|
|   1  |     0.32641   | 0.85419           |     0.26545     |       0.90137       |
|   2  |     0.15731   | 0.94151           |     0.23625     |       **0.92546**        | 
|   3  |     0.08982   | 0.9712           |     0.33954     |       0.91514    |