File size: 1,786 Bytes
6d3c044
 
0aa2b19
6d3c044
 
0aa2b19
 
 
6d3c044
 
 
 
 
 
 
 
 
 
 
 
 
 
0aa2b19
 
 
6d3c044
 
 
 
 
 
 
0aa2b19
6d3c044
0aa2b19
 
6d3c044
 
 
b3d8341
 
 
6d3c044
 
 
 
 
 
 
 
 
 
0aa2b19
 
 
 
 
6d3c044
 
0aa2b19
 
 
 
6d3c044
 
 
0aa2b19
 
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
60
61
62
63
64
65
66
67
68
---
datasets:
- seamew/ChnSentiCorp
metrics:
- accuracy
- precision
- f1
- recall
model-index:
- name: gpt2-imdb-sentiment-classifier
  results:
  - task:
      name: Text Classification
      type: text-classification
    dataset:
      name: imdb
      type: imdb
      args: plain_text
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9394
language:
- zh
pipeline_tag: text-classification
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# gpt2-imdb-sentiment-classifier

This model is a fine-tuned version of [hfl/rbt6](https://huggingface.co/hfl/rbt6) on the ChnSentiCorp dataset.
It achieves the following results on the evaluation set:
- Loss: 0.294600	
- Accuracy: 0.933884

## Intended uses & limitations

This is comparable to [distilbert-imdb](https://huggingface.co/lvwerra/distilbert-imdb) and trained with exactly the same [script](https://huggingface.co/lvwerra/distilbert-imdb/blob/main/distilbert-imdb-training.ipynb)

It achieves slightly lower loss (0.1703 vs 0.1903) and slightly higher accuracy (0.9394 vs 0.928)

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 4
- eval_batch_size: 4
- weight_decay=1e-2
- num_train_epochs=3
### Training results

Epoch	Training Loss	Validation Loss	Accuracy	F1	Precision	Recall
1	0.359700	0.306089	0.924242	0.926230	0.918699	0.933884
2	0.200600	0.295512	0.942761	0.943615	0.946755	0.940496
3	0.105600	0.294600	0.941919	0.942452	0.951178	0.933884

### Framework versions

- Pytorch 2.0.0
- Python 3.9.12