YufeiWeng commited on
Commit
67052b7
·
verified ·
1 Parent(s): 236e130

Model save

Browse files
README.md CHANGED
@@ -1,12 +1,10 @@
1
  ---
2
  license: apache-2.0
3
- base_model: microsoft/beit-base-patch16-224-pt22k-ft22k
4
  tags:
5
- - image-classification
6
- - vision
7
  - generated_from_trainer
8
  metrics:
9
- - f1
10
  model-index:
11
  - name: donut-base-beans
12
  results: []
@@ -17,10 +15,10 @@ should probably proofread and complete it, then remove this comment. -->
17
 
18
  # donut-base-beans
19
 
20
- This model is a fine-tuned version of [microsoft/beit-base-patch16-224-pt22k-ft22k](https://huggingface.co/microsoft/beit-base-patch16-224-pt22k-ft22k) on an unknown dataset.
21
  It achieves the following results on the evaluation set:
22
- - Loss: 0.0517
23
- - F1: 0.0
24
 
25
  ## Model description
26
 
@@ -45,17 +43,22 @@ The following hyperparameters were used during training:
45
  - seed: 1337
46
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
47
  - lr_scheduler_type: linear
48
- - num_epochs: 5.0
49
 
50
  ### Training results
51
 
52
- | Training Loss | Epoch | Step | Validation Loss | F1 |
53
- |:-------------:|:-----:|:-----:|:---------------:|:---:|
54
- | 0.0672 | 1.0 | 13466 | 0.0696 | 0.0 |
55
- | 0.0612 | 2.0 | 26932 | 0.0588 | 0.0 |
56
- | 0.0496 | 3.0 | 40398 | 0.0556 | 0.0 |
57
- | 0.0443 | 4.0 | 53864 | 0.0535 | 0.0 |
58
- | 0.0683 | 5.0 | 67330 | 0.0517 | 0.0 |
 
 
 
 
 
59
 
60
 
61
  ### Framework versions
 
1
  ---
2
  license: apache-2.0
3
+ base_model: google/vit-base-patch16-224-in21k
4
  tags:
 
 
5
  - generated_from_trainer
6
  metrics:
7
+ - accuracy
8
  model-index:
9
  - name: donut-base-beans
10
  results: []
 
15
 
16
  # donut-base-beans
17
 
18
+ This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
19
  It achieves the following results on the evaluation set:
20
+ - Accuracy: 0.4973
21
+ - Loss: 0.0548
22
 
23
  ## Model description
24
 
 
43
  - seed: 1337
44
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
  - lr_scheduler_type: linear
46
+ - num_epochs: 10.0
47
 
48
  ### Training results
49
 
50
+ | Training Loss | Epoch | Step | Accuracy | Validation Loss |
51
+ |:-------------:|:-----:|:-----:|:--------:|:---------------:|
52
+ | 0.0769 | 1.0 | 6733 | 0.4973 | 0.0657 |
53
+ | 0.0729 | 2.0 | 13466 | 0.4973 | 0.0613 |
54
+ | 0.0564 | 3.0 | 20199 | 0.4973 | 0.0621 |
55
+ | 0.0534 | 4.0 | 26932 | 0.4973 | 0.0572 |
56
+ | 0.0511 | 5.0 | 33665 | 0.4973 | 0.0562 |
57
+ | 0.0659 | 6.0 | 40398 | 0.4973 | 0.0577 |
58
+ | 0.0623 | 7.0 | 47131 | 0.4973 | 0.0567 |
59
+ | 0.0575 | 8.0 | 53864 | 0.4973 | 0.0555 |
60
+ | 0.048 | 9.0 | 60597 | 0.4973 | 0.0548 |
61
+ | 0.0389 | 10.0 | 67330 | 0.4973 | 0.0548 |
62
 
63
 
64
  ### Framework versions
all_results.json CHANGED
@@ -1,13 +1,14 @@
1
  {
2
- "epoch": 5.0,
 
3
  "eval_f1": 0.0,
4
- "eval_loss": 0.05167969688773155,
5
- "eval_runtime": 293.8942,
6
- "eval_samples_per_second": 129.363,
7
- "eval_steps_per_second": 8.088,
8
- "total_flos": 8.34383324330106e+19,
9
- "train_loss": 0.0714715420367653,
10
- "train_runtime": 35752.3153,
11
- "train_samples_per_second": 30.13,
12
- "train_steps_per_second": 1.883
13
  }
 
1
  {
2
+ "epoch": 10.0,
3
+ "eval_accuracy": 0.49727767695099817,
4
  "eval_f1": 0.0,
5
+ "eval_loss": 0.05480470508337021,
6
+ "eval_runtime": 903.7138,
7
+ "eval_samples_per_second": 42.07,
8
+ "eval_steps_per_second": 2.63,
9
+ "total_flos": 1.6694802102985576e+20,
10
+ "train_loss": 0.0,
11
+ "train_runtime": 0.0887,
12
+ "train_samples_per_second": 24287861.998,
13
+ "train_steps_per_second": 759048.532
14
  }
command.txt CHANGED
@@ -1,7 +1,7 @@
1
  python run_image_classification.py \
2
  --train_dir /trunk/shared/eebo_data/images_cropped/ \
3
  --validation_dir /trunk/shared/eebo_data/images_cropped/ \
4
- --output_dir ./microsoft_beit-base-patch16-224-pt22k-ft22k/ \
5
  --remove_unused_columns False \
6
  --label_column_name labels \
7
  --do_train \
@@ -10,8 +10,8 @@ python run_image_classification.py \
10
  --push_to_hub_model_id donut-base-beans \
11
  --learning_rate 3e-5 \
12
  --num_train_epochs 10 \
13
- --per_device_train_batch_size 8 \
14
- --per_device_eval_batch_size 8 \
15
  --logging_strategy steps \
16
  --logging_steps 10 \
17
  --eval_strategy epoch \
@@ -22,5 +22,4 @@ python run_image_classification.py \
22
  --ignore_mismatched_sizes \
23
  --image_column_name image_url \
24
  --label_column_name label \
25
- --model_name_or_path microsoft/beit-base-patch16-224-pt22k-ft22k \
26
- --resume_from_checkpoint /trunk2/yufei/summer24/transformers/examples/pytorch/image-classification/microsoft_beit-base-patch16-224-pt22k-ft22k/checkpoint-33670
 
1
  python run_image_classification.py \
2
  --train_dir /trunk/shared/eebo_data/images_cropped/ \
3
  --validation_dir /trunk/shared/eebo_data/images_cropped/ \
4
+ --output_dir ./default_model/ \
5
  --remove_unused_columns False \
6
  --label_column_name labels \
7
  --do_train \
 
10
  --push_to_hub_model_id donut-base-beans \
11
  --learning_rate 3e-5 \
12
  --num_train_epochs 10 \
13
+ --per_device_train_batch_size 64 \
14
+ --per_device_eval_batch_size 64 \
15
  --logging_strategy steps \
16
  --logging_steps 10 \
17
  --eval_strategy epoch \
 
22
  --ignore_mismatched_sizes \
23
  --image_column_name image_url \
24
  --label_column_name label \
25
+ --resume_from_checkpoint /trunk2/yufei/summer24/transformers/examples/pytorch/image-classification/default_model/checkpoint-67330
 
config.json CHANGED
@@ -1,15 +1,10 @@
1
  {
2
- "_name_or_path": "microsoft/beit-base-patch16-224-pt22k-ft22k",
3
- "add_fpn": false,
4
  "architectures": [
5
- "BeitForImageClassification"
6
  ],
7
  "attention_probs_dropout_prob": 0.0,
8
- "auxiliary_channels": 256,
9
- "auxiliary_concat_input": false,
10
- "auxiliary_loss_weight": 0.4,
11
- "auxiliary_num_convs": 1,
12
- "drop_path_rate": 0.1,
13
  "finetuning_task": "image-classification",
14
  "hidden_act": "gelu",
15
  "hidden_dropout_prob": 0.0,
@@ -24,49 +19,12 @@
24
  "Value(dtype='int64', id=None)": "0"
25
  },
26
  "layer_norm_eps": 1e-12,
27
- "layer_scale_init_value": 0.1,
28
- "model_type": "beit",
29
  "num_attention_heads": 12,
30
  "num_channels": 3,
31
  "num_hidden_layers": 12,
32
- "out_features": [
33
- "stage12"
34
- ],
35
- "out_indices": [
36
- 12
37
- ],
38
  "patch_size": 16,
39
- "pool_scales": [
40
- 1,
41
- 2,
42
- 3,
43
- 6
44
- ],
45
- "problem_type": "regression",
46
- "reshape_hidden_states": true,
47
- "semantic_loss_ignore_index": 255,
48
- "stage_names": [
49
- "stem",
50
- "stage1",
51
- "stage2",
52
- "stage3",
53
- "stage4",
54
- "stage5",
55
- "stage6",
56
- "stage7",
57
- "stage8",
58
- "stage9",
59
- "stage10",
60
- "stage11",
61
- "stage12"
62
- ],
63
  "torch_dtype": "float32",
64
- "transformers_version": "4.43.0.dev0",
65
- "use_absolute_position_embeddings": false,
66
- "use_auxiliary_head": true,
67
- "use_mask_token": false,
68
- "use_mean_pooling": true,
69
- "use_relative_position_bias": true,
70
- "use_shared_relative_position_bias": false,
71
- "vocab_size": 8192
72
  }
 
1
  {
2
+ "_name_or_path": "google/vit-base-patch16-224-in21k",
 
3
  "architectures": [
4
+ "ViTForImageClassification"
5
  ],
6
  "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
 
 
 
 
8
  "finetuning_task": "image-classification",
9
  "hidden_act": "gelu",
10
  "hidden_dropout_prob": 0.0,
 
19
  "Value(dtype='int64', id=None)": "0"
20
  },
21
  "layer_norm_eps": 1e-12,
22
+ "model_type": "vit",
 
23
  "num_attention_heads": 12,
24
  "num_channels": 3,
25
  "num_hidden_layers": 12,
 
 
 
 
 
 
26
  "patch_size": 16,
27
+ "qkv_bias": true,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  "torch_dtype": "float32",
29
+ "transformers_version": "4.43.0.dev0"
 
 
 
 
 
 
 
30
  }
eval_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 5.0,
3
  "eval_f1": 0.0,
4
- "eval_loss": 0.05167969688773155,
5
- "eval_runtime": 293.8942,
6
- "eval_samples_per_second": 129.363,
7
- "eval_steps_per_second": 8.088
8
  }
 
1
  {
2
+ "epoch": 10.0,
3
  "eval_f1": 0.0,
4
+ "eval_loss": 0.05480470508337021,
5
+ "eval_runtime": 903.7138,
6
+ "eval_samples_per_second": 42.07,
7
+ "eval_steps_per_second": 2.63
8
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:87a3e53f87c26251c9485be8d2e6b4896fb3ca5fbc1fe742353ffe4c57e091e8
3
- size 343077252
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2561cfd7419a353fba1d1368529d633d6fb11d901bddcfe413ee3478cec81425
3
+ size 343220892
preprocessor_config.json CHANGED
@@ -1,11 +1,5 @@
1
  {
2
- "crop_size": {
3
- "height": 224,
4
- "width": 224
5
- },
6
- "do_center_crop": false,
7
  "do_normalize": true,
8
- "do_reduce_labels": false,
9
  "do_rescale": true,
10
  "do_resize": true,
11
  "image_mean": [
@@ -13,7 +7,7 @@
13
  0.5,
14
  0.5
15
  ],
16
- "image_processor_type": "BeitImageProcessor",
17
  "image_std": [
18
  0.5,
19
  0.5,
 
1
  {
 
 
 
 
 
2
  "do_normalize": true,
 
3
  "do_rescale": true,
4
  "do_resize": true,
5
  "image_mean": [
 
7
  0.5,
8
  0.5
9
  ],
10
+ "image_processor_type": "ViTImageProcessor",
11
  "image_std": [
12
  0.5,
13
  0.5,
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 5.0,
3
- "total_flos": 8.34383324330106e+19,
4
- "train_loss": 0.0714715420367653,
5
- "train_runtime": 35752.3153,
6
- "train_samples_per_second": 30.13,
7
- "train_steps_per_second": 1.883
8
  }
 
1
  {
2
+ "epoch": 10.0,
3
+ "total_flos": 1.6694802102985576e+20,
4
+ "train_loss": 0.0,
5
+ "train_runtime": 0.0887,
6
+ "train_samples_per_second": 24287861.998,
7
+ "train_steps_per_second": 759048.532
8
  }
trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b437f98ee482d0b8115a8072d28d365612b268b96157a462218455ae7ca2971b
3
  size 5304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d8a6f533c72550417f1e253380ae12ad72153532482192012f764515f190bbf
3
  size 5304