jahb57/gpt2-yelp
Browse files- README.md +77 -0
- config.json +55 -0
- pytorch_model.bin +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: gpt2
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- yelp_review_full
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: test_trainer
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Text Classification
|
15 |
+
type: text-classification
|
16 |
+
dataset:
|
17 |
+
name: yelp_review_full
|
18 |
+
type: yelp_review_full
|
19 |
+
config: yelp_review_full
|
20 |
+
split: test
|
21 |
+
args: yelp_review_full
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.584
|
26 |
+
---
|
27 |
+
|
28 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
29 |
+
should probably proofread and complete it, then remove this comment. -->
|
30 |
+
|
31 |
+
# test_trainer
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the yelp_review_full dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 1.0617
|
36 |
+
- Accuracy: 0.584
|
37 |
+
|
38 |
+
## Model description
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Intended uses & limitations
|
43 |
+
|
44 |
+
More information needed
|
45 |
+
|
46 |
+
## Training and evaluation data
|
47 |
+
|
48 |
+
More information needed
|
49 |
+
|
50 |
+
## Training procedure
|
51 |
+
|
52 |
+
### Training hyperparameters
|
53 |
+
|
54 |
+
The following hyperparameters were used during training:
|
55 |
+
- learning_rate: 5e-05
|
56 |
+
- train_batch_size: 4
|
57 |
+
- eval_batch_size: 4
|
58 |
+
- seed: 42
|
59 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
60 |
+
- lr_scheduler_type: linear
|
61 |
+
- num_epochs: 3.0
|
62 |
+
|
63 |
+
### Training results
|
64 |
+
|
65 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
66 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
67 |
+
| No log | 1.0 | 250 | 1.1204 | 0.515 |
|
68 |
+
| 1.2411 | 2.0 | 500 | 1.0231 | 0.57 |
|
69 |
+
| 1.2411 | 3.0 | 750 | 1.0617 | 0.584 |
|
70 |
+
|
71 |
+
|
72 |
+
### Framework versions
|
73 |
+
|
74 |
+
- Transformers 4.34.1
|
75 |
+
- Pytorch 2.1.0+cu118
|
76 |
+
- Datasets 2.14.6
|
77 |
+
- Tokenizers 0.14.1
|
config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "gpt2",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2ForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 50256,
|
9 |
+
"embd_pdrop": 0.1,
|
10 |
+
"eos_token_id": 50256,
|
11 |
+
"id2label": {
|
12 |
+
"0": "LABEL_0",
|
13 |
+
"1": "LABEL_1",
|
14 |
+
"2": "LABEL_2",
|
15 |
+
"3": "LABEL_3",
|
16 |
+
"4": "LABEL_4"
|
17 |
+
},
|
18 |
+
"initializer_range": 0.02,
|
19 |
+
"label2id": {
|
20 |
+
"LABEL_0": 0,
|
21 |
+
"LABEL_1": 1,
|
22 |
+
"LABEL_2": 2,
|
23 |
+
"LABEL_3": 3,
|
24 |
+
"LABEL_4": 4
|
25 |
+
},
|
26 |
+
"layer_norm_epsilon": 1e-05,
|
27 |
+
"model_type": "gpt2",
|
28 |
+
"n_ctx": 1024,
|
29 |
+
"n_embd": 768,
|
30 |
+
"n_head": 12,
|
31 |
+
"n_inner": null,
|
32 |
+
"n_layer": 12,
|
33 |
+
"n_positions": 1024,
|
34 |
+
"pad_token_id": 50256,
|
35 |
+
"problem_type": "single_label_classification",
|
36 |
+
"reorder_and_upcast_attn": false,
|
37 |
+
"resid_pdrop": 0.1,
|
38 |
+
"scale_attn_by_inverse_layer_idx": false,
|
39 |
+
"scale_attn_weights": true,
|
40 |
+
"summary_activation": null,
|
41 |
+
"summary_first_dropout": 0.1,
|
42 |
+
"summary_proj_to_labels": true,
|
43 |
+
"summary_type": "cls_index",
|
44 |
+
"summary_use_proj": true,
|
45 |
+
"task_specific_params": {
|
46 |
+
"text-generation": {
|
47 |
+
"do_sample": true,
|
48 |
+
"max_length": 50
|
49 |
+
}
|
50 |
+
},
|
51 |
+
"torch_dtype": "float32",
|
52 |
+
"transformers_version": "4.34.1",
|
53 |
+
"use_cache": true,
|
54 |
+
"vocab_size": 50257
|
55 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:776457dc7d806156770658e8457dcbd08a48384e69945a6e100acf3d84995449
|
3 |
+
size 497823262
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1217acbe75fdd119d4d8e84ed31d613c7fff2a8100b42149e418f47472072518
|
3 |
+
size 4536
|