ptran74 commited on
Commit
7d6ea93
1 Parent(s): a087bef

update model card README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -93
README.md CHANGED
@@ -11,97 +11,28 @@ model-index:
11
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
  should probably proofread and complete it, then remove this comment. -->
13
 
14
- # Important Note:
15
- `load_best_model_at_end` is not working properly. I created the `combined` metric (55% F1 score + 45% exact match score) to rank the best result but it still does not work. Here is the setting in the `TrainingArguments`:
16
- ```
17
- load_best_model_at_end=True,
18
- metric_for_best_model='combined',
19
- greater_is_better=True,
20
- ```
21
-
22
  # DSPFirst-Finetuning-5
23
 
24
- This model is a fine-tuned version of [ahotrod/electra_large_discriminator_squad2_512](https://huggingface.co/ahotrod/electra_large_discriminator_squad2_512) on a generated Questions and Answers dataset from the DSPFirst textbook based on the SQuAD 2.0 format.<br />
25
  It achieves the following results on the evaluation set:
26
- - Loss: 0.9496
27
- - Exact: 64.0557
28
- - F1: 70.2957
29
- - Combined: 67.4877
30
 
31
  ## Model description
32
 
33
  More information needed
34
 
35
- ## More accurate metrics:
36
-
37
- ### Before fine-tuning:
38
-
39
- ```
40
- 'HasAns_exact': 53.09537088678193,
41
- 'HasAns_f1': 58.61604504258551,
42
- 'HasAns_total': 1793,
43
- 'NoAns_exact': 86.11111111111111,
44
- 'NoAns_f1': 86.11111111111111,
45
- 'NoAns_total': 288,
46
- 'best_exact': 57.66458433445459,
47
- 'best_exact_thresh': 0.0,
48
- 'best_f1': 62.42122477720136,
49
- 'best_f1_thresh': 0.0,
50
- 'exact': 57.66458433445459,
51
- 'f1': 62.42122477720133,
52
- 'total': 2081
53
- ```
54
-
55
- ### After fine-tuning:
56
-
57
- ```
58
- 'HasAns_exact': 64.138315672058,
59
- 'HasAns_f1': 71.25733612355444,
60
- 'HasAns_total': 1793,
61
- 'NoAns_exact': 63.19444444444444,
62
- 'NoAns_f1': 63.19444444444444,
63
- 'NoAns_total': 288,
64
- 'best_exact': 63.95963479096588,
65
- 'best_exact_thresh': 0.0,
66
- 'best_f1': 70.09341838997268,
67
- 'best_f1_thresh': 0.0,
68
- 'exact': 64.00768861124459,
69
- 'f1': 70.14147221025135,
70
- 'total': 2081
71
- ```
72
-
73
- # Dataset
74
- A visualization of the dataset can be found [here](https://github.gatech.edu/pages/VIP-ITS/textbook_SQuAD_explore/explore/textbookv1.0/textbook/).<br />
75
- The split between train and test is 65% and 35% respectively.
76
- ```
77
- DatasetDict({
78
- train: Dataset({
79
- features: ['id', 'title', 'context', 'question', 'answers'],
80
- num_rows: 3863
81
- })
82
- test: Dataset({
83
- features: ['id', 'title', 'context', 'question', 'answers'],
84
- num_rows: 2081
85
- })
86
- })
87
- ```
88
-
89
  ## Intended uses & limitations
90
 
91
- This model is fine-tuned to answer questions from the DSPFirst textbook. I'm not really sure what I am doing so you should review before using it.<br />
92
- Also, you should improve the Dataset either by using a **better generated questions and answers model** (currently using https://github.com/patil-suraj/question_generation) or perform **data augmentation** to increase dataset size.
93
 
94
  ## Training and evaluation data
95
 
96
- - `batch_size` of 6 results in 14.82 GB VRAM
97
- - Utilizes `gradient_accumulation_steps` to get total batch size to 514 (batch size should be at least 256)
98
- - 4.52 GB RAM
99
- - 30% of the total questions is dedicated for evaluating.
100
 
101
  ## Training procedure
102
- - The model was trained from [Google Colab](https://colab.research.google.com/drive/1dJXNstk2NSenwzdtl9xA8AqjP4LL-Ks_?usp=sharing)
103
- - Utilizes Tesla P100 16GB, took 6.3 hours to train
104
- - `load_best_model_at_end` is enabled in TrainingArguments
105
 
106
  ### Training hyperparameters
107
 
@@ -114,28 +45,20 @@ The following hyperparameters were used during training:
114
  - total_train_batch_size: 516
115
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
116
  - lr_scheduler_type: linear
117
- - num_epochs: 10
118
-
119
- ### Model hyperparameters
120
-
121
- - hidden_dropout_prob: 0.36
122
- - attention_probs_dropout_prob = 0.36
123
 
124
  ### Training results
125
 
126
  | Training Loss | Epoch | Step | Validation Loss | Exact | F1 | Combined |
127
  |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:--------:|
128
- | 1.9415 | 0.86 | 20 | 1.1685 | 60.2595 | 68.1892 | 64.6208 |
129
- | 1.5838 | 1.73 | 40 | 1.0808 | 64.2960 | 71.5666 | 68.2948 |
130
- | 1.8123 | 2.6 | 60 | 1.1840 | 64.6324 | 72.3829 | 68.8952 |
131
- | 1.2597 | 3.47 | 80 | 0.9535 | 64.1038 | 70.9803 | 67.8858 |
132
- | 1.1145 | 4.34 | 100 | 0.8810 | 64.9688 | 71.3201 | 68.4620 |
133
- | 0.9903 | 5.22 | 120 | 0.9460 | 66.0259 | 72.5939 | 69.6383 |
134
- | 0.9398 | 6.09 | 140 | 0.8476 | 63.1908 | 69.1036 | 66.4428 |
135
- | 0.9181 | 6.95 | 160 | 0.9036 | 65.4974 | 71.8701 | 69.0024 |
136
- | 0.9562 | 7.82 | 180 | 0.9073 | 65.1129 | 71.1841 | 68.4521 |
137
- | 1.0098 | 8.69 | 200 | 0.9470 | 64.5843 | 70.8046 | 68.0055 |
138
- | 1.0186 | 9.56 | 220 | 0.9496 | 64.0557 | 70.2957 | 67.4877 |
139
 
140
 
141
  ### Framework versions
 
11
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
  should probably proofread and complete it, then remove this comment. -->
13
 
 
 
 
 
 
 
 
 
14
  # DSPFirst-Finetuning-5
15
 
16
+ This model is a fine-tuned version of [ahotrod/electra_large_discriminator_squad2_512](https://huggingface.co/ahotrod/electra_large_discriminator_squad2_512) on an unknown dataset.
17
  It achieves the following results on the evaluation set:
18
+ - Loss: 0.8529
19
+ - Exact: 66.3117
20
+ - F1: 73.4039
21
+ - Combined: 70.2124
22
 
23
  ## Model description
24
 
25
  More information needed
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ## Intended uses & limitations
28
 
29
+ More information needed
 
30
 
31
  ## Training and evaluation data
32
 
33
+ More information needed
 
 
 
34
 
35
  ## Training procedure
 
 
 
36
 
37
  ### Training hyperparameters
38
 
 
45
  - total_train_batch_size: 516
46
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
47
  - lr_scheduler_type: linear
48
+ - num_epochs: 7
 
 
 
 
 
49
 
50
  ### Training results
51
 
52
  | Training Loss | Epoch | Step | Validation Loss | Exact | F1 | Combined |
53
  |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:--------:|
54
+ | 2.3222 | 0.81 | 20 | 1.0363 | 60.3139 | 68.8586 | 65.0135 |
55
+ | 1.6149 | 1.65 | 40 | 0.9702 | 64.7422 | 72.5555 | 69.0395 |
56
+ | 1.2375 | 2.49 | 60 | 1.0007 | 64.6861 | 72.6306 | 69.0556 |
57
+ | 1.0417 | 3.32 | 80 | 0.9963 | 66.0874 | 73.8634 | 70.3642 |
58
+ | 0.9401 | 4.16 | 100 | 0.8803 | 67.0964 | 74.4842 | 71.1597 |
59
+ | 0.8799 | 4.97 | 120 | 0.8652 | 66.7040 | 74.1267 | 70.7865 |
60
+ | 0.8712 | 5.81 | 140 | 0.8921 | 66.3677 | 73.7213 | 70.4122 |
61
+ | 0.8311 | 6.65 | 160 | 0.8529 | 66.3117 | 73.4039 | 70.2124 |
 
 
 
62
 
63
 
64
  ### Framework versions