upload model
Browse files- .gitignore +1 -0
- README.md +87 -0
- all_results.json +14 -0
- config.json +35 -0
- eval_results.json +9 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
- train_results.json +8 -0
- trainer_state.json +49 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint*/
|
README.md
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
datasets:
|
5 |
+
- imdb
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: baseline
|
10 |
+
results:
|
11 |
+
- task:
|
12 |
+
name: Text Classification
|
13 |
+
type: text-classification
|
14 |
+
dataset:
|
15 |
+
name: imdb
|
16 |
+
type: imdb
|
17 |
+
config: plain_text
|
18 |
+
split: test
|
19 |
+
args: plain_text
|
20 |
+
metrics:
|
21 |
+
- name: Accuracy
|
22 |
+
type: accuracy
|
23 |
+
value: 0.92088
|
24 |
+
---
|
25 |
+
|
26 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
27 |
+
should probably proofread and complete it, then remove this comment. -->
|
28 |
+
|
29 |
+
# baseline
|
30 |
+
|
31 |
+
This model is a fine-tuned version of [textattack/bert-base-uncased-imdb](https://huggingface.co/textattack/bert-base-uncased-imdb) on the imdb dataset.
|
32 |
+
It achieves the following results on the evaluation set:
|
33 |
+
- Loss: 0.5238
|
34 |
+
- Accuracy: 0.9209
|
35 |
+
|
36 |
+
## Model description
|
37 |
+
|
38 |
+
More information needed
|
39 |
+
|
40 |
+
## Intended uses & limitations
|
41 |
+
|
42 |
+
More information needed
|
43 |
+
|
44 |
+
## Training and evaluation data
|
45 |
+
|
46 |
+
More information needed
|
47 |
+
|
48 |
+
## Training procedure
|
49 |
+
|
50 |
+
### Training hyperparameters
|
51 |
+
|
52 |
+
The following hyperparameters were used during training:
|
53 |
+
- learning_rate: 5e-05
|
54 |
+
- train_batch_size: 32
|
55 |
+
- eval_batch_size: 32
|
56 |
+
- seed: 42
|
57 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
58 |
+
- lr_scheduler_type: linear
|
59 |
+
- num_epochs: 3.0
|
60 |
+
- mixed_precision_training: Native AMP
|
61 |
+
|
62 |
+
### Training script
|
63 |
+
|
64 |
+
```bash
|
65 |
+
python run_glue.py \
|
66 |
+
--model_name_or_path textattack/bert-base-uncased-imdb \
|
67 |
+
--dataset_name imdb \
|
68 |
+
--do_train \
|
69 |
+
--do_eval \
|
70 |
+
--max_seq_length 384 \
|
71 |
+
--pad_to_max_length False \
|
72 |
+
--per_device_train_batch_size 32 \
|
73 |
+
--per_device_eval_batch_size 32 \
|
74 |
+
--fp16 \
|
75 |
+
--learning_rate 5e-5 \
|
76 |
+
--optim adamw_torch \
|
77 |
+
--num_train_epochs 3 \
|
78 |
+
--overwrite_output_dir \
|
79 |
+
--output_dir /tmp/bert-base-uncased-imdb
|
80 |
+
```
|
81 |
+
|
82 |
+
### Framework versions
|
83 |
+
|
84 |
+
- Transformers 4.27.4
|
85 |
+
- Pytorch 1.13.1
|
86 |
+
- Datasets 2.11.0
|
87 |
+
- Tokenizers 0.13.3
|
all_results.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.92088,
|
4 |
+
"eval_loss": 0.5238260626792908,
|
5 |
+
"eval_runtime": 66.6946,
|
6 |
+
"eval_samples": 25000,
|
7 |
+
"eval_samples_per_second": 374.843,
|
8 |
+
"eval_steps_per_second": 11.725,
|
9 |
+
"train_loss": 0.057570336623163375,
|
10 |
+
"train_runtime": 650.909,
|
11 |
+
"train_samples": 25000,
|
12 |
+
"train_samples_per_second": 115.223,
|
13 |
+
"train_steps_per_second": 3.604
|
14 |
+
}
|
config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "textattack/bert-base-uncased-imdb",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": 0,
|
14 |
+
"1": 1
|
15 |
+
},
|
16 |
+
"initializer_range": 0.02,
|
17 |
+
"intermediate_size": 3072,
|
18 |
+
"label2id": {
|
19 |
+
"0": 0,
|
20 |
+
"1": 1
|
21 |
+
},
|
22 |
+
"layer_norm_eps": 1e-12,
|
23 |
+
"max_position_embeddings": 512,
|
24 |
+
"model_type": "bert",
|
25 |
+
"num_attention_heads": 12,
|
26 |
+
"num_hidden_layers": 12,
|
27 |
+
"pad_token_id": 0,
|
28 |
+
"position_embedding_type": "absolute",
|
29 |
+
"problem_type": "single_label_classification",
|
30 |
+
"torch_dtype": "float32",
|
31 |
+
"transformers_version": "4.27.4",
|
32 |
+
"type_vocab_size": 2,
|
33 |
+
"use_cache": true,
|
34 |
+
"vocab_size": 30522
|
35 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.92088,
|
4 |
+
"eval_loss": 0.5238260626792908,
|
5 |
+
"eval_runtime": 66.6946,
|
6 |
+
"eval_samples": 25000,
|
7 |
+
"eval_samples_per_second": 374.843,
|
8 |
+
"eval_steps_per_second": 11.725
|
9 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad19993f9b2c0193715910d6717c55af0e6af95160b34e997f63240e71a0bac5
|
3 |
+
size 438007925
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"do_basic_tokenize": true,
|
4 |
+
"do_lower_case": true,
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"model_max_length": 512,
|
7 |
+
"never_split": null,
|
8 |
+
"pad_token": "[PAD]",
|
9 |
+
"sep_token": "[SEP]",
|
10 |
+
"special_tokens_map_file": "/home/yujiepan/.cache/huggingface/hub/models--textattack--bert-base-uncased-imdb/snapshots/c70b9f391af2067f7eff69a03940218bba9b8d39/special_tokens_map.json",
|
11 |
+
"strip_accents": null,
|
12 |
+
"tokenize_chinese_chars": true,
|
13 |
+
"tokenizer_class": "BertTokenizer",
|
14 |
+
"unk_token": "[UNK]"
|
15 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"train_loss": 0.057570336623163375,
|
4 |
+
"train_runtime": 650.909,
|
5 |
+
"train_samples": 25000,
|
6 |
+
"train_samples_per_second": 115.223,
|
7 |
+
"train_steps_per_second": 3.604
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 3.0,
|
5 |
+
"global_step": 2346,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.64,
|
12 |
+
"learning_rate": 3.94075021312873e-05,
|
13 |
+
"loss": 0.1202,
|
14 |
+
"step": 500
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 1.28,
|
18 |
+
"learning_rate": 2.8751065643648767e-05,
|
19 |
+
"loss": 0.0785,
|
20 |
+
"step": 1000
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 1.92,
|
24 |
+
"learning_rate": 1.8094629156010232e-05,
|
25 |
+
"loss": 0.0481,
|
26 |
+
"step": 1500
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 2.56,
|
30 |
+
"learning_rate": 7.438192668371696e-06,
|
31 |
+
"loss": 0.0162,
|
32 |
+
"step": 2000
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 3.0,
|
36 |
+
"step": 2346,
|
37 |
+
"total_flos": 1.4799996864e+16,
|
38 |
+
"train_loss": 0.057570336623163375,
|
39 |
+
"train_runtime": 650.909,
|
40 |
+
"train_samples_per_second": 115.223,
|
41 |
+
"train_steps_per_second": 3.604
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"max_steps": 2346,
|
45 |
+
"num_train_epochs": 3,
|
46 |
+
"total_flos": 1.4799996864e+16,
|
47 |
+
"trial_name": null,
|
48 |
+
"trial_params": null
|
49 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ffaf73f3c1f4339de1c60e430185af7b3691e0961621089b06a41c7f71c07c4
|
3 |
+
size 3771
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|