jonathanagustin
commited on
Commit
•
5d36f54
1
Parent(s):
2f25187
Model save
Browse files- README.md +68 -0
- config.json +26 -0
- metrics.json +15 -0
- model_card.md +32 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +62 -0
- trainer_state.json +176 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
datasets:
|
5 |
+
- squad_v2
|
6 |
+
model-index:
|
7 |
+
- name: bert-finetuned-uncased-squad_v2
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
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 |
+
# bert-finetuned-uncased-squad_v2
|
15 |
+
|
16 |
+
This model was trained from scratch on the squad_v2 dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- Loss: 1.2041
|
19 |
+
|
20 |
+
## Model description
|
21 |
+
|
22 |
+
More information needed
|
23 |
+
|
24 |
+
## Intended uses & limitations
|
25 |
+
|
26 |
+
More information needed
|
27 |
+
|
28 |
+
## Training and evaluation data
|
29 |
+
|
30 |
+
More information needed
|
31 |
+
|
32 |
+
## Training procedure
|
33 |
+
|
34 |
+
### Training hyperparameters
|
35 |
+
|
36 |
+
The following hyperparameters were used during training:
|
37 |
+
- learning_rate: 2e-05
|
38 |
+
- train_batch_size: 128
|
39 |
+
- eval_batch_size: 128
|
40 |
+
- seed: 42
|
41 |
+
- gradient_accumulation_steps: 4
|
42 |
+
- total_train_batch_size: 512
|
43 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
44 |
+
- lr_scheduler_type: linear
|
45 |
+
- num_epochs: 1
|
46 |
+
|
47 |
+
### Training results
|
48 |
+
|
49 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
50 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
51 |
+
| 3.2307 | 0.2 | 100 | 1.8959 |
|
52 |
+
| 1.9581 | 0.39 | 200 | 1.4856 |
|
53 |
+
| 1.6358 | 0.59 | 300 | 1.3948 |
|
54 |
+
| 1.4964 | 0.78 | 400 | 1.2934 |
|
55 |
+
| 1.4169 | 0.98 | 500 | 1.2605 |
|
56 |
+
| 1.327 | 1.18 | 600 | 1.2218 |
|
57 |
+
| 1.2763 | 1.37 | 700 | 1.2539 |
|
58 |
+
| 1.2755 | 1.57 | 800 | 1.2090 |
|
59 |
+
| 1.251 | 1.76 | 900 | 1.2041 |
|
60 |
+
| 1.229 | 1.96 | 1000 | 1.2159 |
|
61 |
+
|
62 |
+
|
63 |
+
### Framework versions
|
64 |
+
|
65 |
+
- Transformers 4.34.1
|
66 |
+
- Pytorch 2.1.0+cu118
|
67 |
+
- Datasets 2.14.5
|
68 |
+
- Tokenizers 0.14.1
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/content/drive/My Drive/Colab Notebooks/aai520-project/checkpoints/bert-finetuned-uncased/checkpoint-1000",
|
3 |
+
"architectures": [
|
4 |
+
"BertForQuestionAnswering"
|
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 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.34.1",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
metrics.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"exact": 27.878379516550154,
|
3 |
+
"f1": 32.12991628283337,
|
4 |
+
"total": 11873,
|
5 |
+
"HasAns_exact": 50.40485829959514,
|
6 |
+
"HasAns_f1": 58.920124160944766,
|
7 |
+
"HasAns_total": 5928,
|
8 |
+
"NoAns_exact": 5.416316232127839,
|
9 |
+
"NoAns_f1": 5.416316232127839,
|
10 |
+
"NoAns_total": 5945,
|
11 |
+
"best_exact": 50.11370336056599,
|
12 |
+
"best_exact_thresh": 0.0,
|
13 |
+
"best_f1": 50.11370336056599,
|
14 |
+
"best_f1_thresh": 0.0
|
15 |
+
}
|
model_card.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- question-answering
|
7 |
+
- fine-tuned
|
8 |
+
datasets:
|
9 |
+
- squad_v2
|
10 |
+
metrics:
|
11 |
+
- squad
|
12 |
+
---
|
13 |
+
|
14 |
+
## bert-finetuned-uncased
|
15 |
+
|
16 |
+
This model is a fine-tuned version of bert-base-uncased for Question Answering on the SQuAD v2 dataset.
|
17 |
+
|
18 |
+
## Evaluation Results
|
19 |
+
- Exact Match: 27.878379516550154
|
20 |
+
- F1 Score: 32.12991628283337
|
21 |
+
- Total: 11873
|
22 |
+
- Has Answer Exact: 50.40485829959514
|
23 |
+
- Has Answer F1: 58.920124160944766
|
24 |
+
- Has Answer Total: 5928
|
25 |
+
- No Answer Exact: 5.416316232127839
|
26 |
+
- No Answer F1: 5.416316232127839
|
27 |
+
- No Answer Total: 5945
|
28 |
+
- Best Exact: 50.11370336056599
|
29 |
+
- Best Exact Threshold: 0.0
|
30 |
+
- Best F1: 50.11370336056599
|
31 |
+
- Best F1 Threshold: 0.0
|
32 |
+
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80d39e66e7f52d16c9cc4f24176793bc3d6bc7495f18af703341e3c4506ef40b
|
3 |
+
size 435640934
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"max_length": 512,
|
49 |
+
"model_max_length": 512,
|
50 |
+
"pad_to_multiple_of": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"pad_token_type_id": 0,
|
53 |
+
"padding_side": "right",
|
54 |
+
"sep_token": "[SEP]",
|
55 |
+
"stride": 128,
|
56 |
+
"strip_accents": null,
|
57 |
+
"tokenize_chinese_chars": true,
|
58 |
+
"tokenizer_class": "BertTokenizer",
|
59 |
+
"truncation_side": "right",
|
60 |
+
"truncation_strategy": "only_second",
|
61 |
+
"unk_token": "[UNK]"
|
62 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 1.2041057348251343,
|
3 |
+
"best_model_checkpoint": "/content/drive/My Drive/Colab Notebooks/aai520-project/checkpoints/bert-finetuned-uncased/checkpoint-900",
|
4 |
+
"epoch": 1.9607843137254903,
|
5 |
+
"eval_steps": 100,
|
6 |
+
"global_step": 1000,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.2,
|
13 |
+
"learning_rate": 1.807843137254902e-05,
|
14 |
+
"loss": 3.2307,
|
15 |
+
"step": 100
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.2,
|
19 |
+
"eval_loss": 1.8958784341812134,
|
20 |
+
"eval_runtime": 17.3462,
|
21 |
+
"eval_samples_per_second": 690.006,
|
22 |
+
"eval_steps_per_second": 10.838,
|
23 |
+
"step": 100
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.39,
|
27 |
+
"learning_rate": 1.6117647058823533e-05,
|
28 |
+
"loss": 1.9581,
|
29 |
+
"step": 200
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"epoch": 0.39,
|
33 |
+
"eval_loss": 1.485579490661621,
|
34 |
+
"eval_runtime": 17.3451,
|
35 |
+
"eval_samples_per_second": 690.051,
|
36 |
+
"eval_steps_per_second": 10.839,
|
37 |
+
"step": 200
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.59,
|
41 |
+
"learning_rate": 1.415686274509804e-05,
|
42 |
+
"loss": 1.6358,
|
43 |
+
"step": 300
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"epoch": 0.59,
|
47 |
+
"eval_loss": 1.3947598934173584,
|
48 |
+
"eval_runtime": 17.3855,
|
49 |
+
"eval_samples_per_second": 688.449,
|
50 |
+
"eval_steps_per_second": 10.814,
|
51 |
+
"step": 300
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.78,
|
55 |
+
"learning_rate": 1.2196078431372552e-05,
|
56 |
+
"loss": 1.4964,
|
57 |
+
"step": 400
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 0.78,
|
61 |
+
"eval_loss": 1.293440818786621,
|
62 |
+
"eval_runtime": 17.3267,
|
63 |
+
"eval_samples_per_second": 690.782,
|
64 |
+
"eval_steps_per_second": 10.85,
|
65 |
+
"step": 400
|
66 |
+
},
|
67 |
+
{
|
68 |
+
"epoch": 0.98,
|
69 |
+
"learning_rate": 1.023529411764706e-05,
|
70 |
+
"loss": 1.4169,
|
71 |
+
"step": 500
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"epoch": 0.98,
|
75 |
+
"eval_loss": 1.2604990005493164,
|
76 |
+
"eval_runtime": 17.3401,
|
77 |
+
"eval_samples_per_second": 690.251,
|
78 |
+
"eval_steps_per_second": 10.842,
|
79 |
+
"step": 500
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"epoch": 1.18,
|
83 |
+
"learning_rate": 8.274509803921569e-06,
|
84 |
+
"loss": 1.327,
|
85 |
+
"step": 600
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"epoch": 1.18,
|
89 |
+
"eval_loss": 1.2218035459518433,
|
90 |
+
"eval_runtime": 17.3253,
|
91 |
+
"eval_samples_per_second": 690.84,
|
92 |
+
"eval_steps_per_second": 10.851,
|
93 |
+
"step": 600
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 1.37,
|
97 |
+
"learning_rate": 6.313725490196079e-06,
|
98 |
+
"loss": 1.2763,
|
99 |
+
"step": 700
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 1.37,
|
103 |
+
"eval_loss": 1.2539091110229492,
|
104 |
+
"eval_runtime": 17.3618,
|
105 |
+
"eval_samples_per_second": 689.388,
|
106 |
+
"eval_steps_per_second": 10.828,
|
107 |
+
"step": 700
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 1.57,
|
111 |
+
"learning_rate": 4.352941176470588e-06,
|
112 |
+
"loss": 1.2755,
|
113 |
+
"step": 800
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"epoch": 1.57,
|
117 |
+
"eval_loss": 1.2090030908584595,
|
118 |
+
"eval_runtime": 17.401,
|
119 |
+
"eval_samples_per_second": 687.833,
|
120 |
+
"eval_steps_per_second": 10.804,
|
121 |
+
"step": 800
|
122 |
+
},
|
123 |
+
{
|
124 |
+
"epoch": 1.76,
|
125 |
+
"learning_rate": 2.392156862745098e-06,
|
126 |
+
"loss": 1.251,
|
127 |
+
"step": 900
|
128 |
+
},
|
129 |
+
{
|
130 |
+
"epoch": 1.76,
|
131 |
+
"eval_loss": 1.2041057348251343,
|
132 |
+
"eval_runtime": 17.3449,
|
133 |
+
"eval_samples_per_second": 690.06,
|
134 |
+
"eval_steps_per_second": 10.839,
|
135 |
+
"step": 900
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 1.96,
|
139 |
+
"learning_rate": 4.3137254901960787e-07,
|
140 |
+
"loss": 1.229,
|
141 |
+
"step": 1000
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"epoch": 1.96,
|
145 |
+
"eval_loss": 1.215934157371521,
|
146 |
+
"eval_runtime": 17.3882,
|
147 |
+
"eval_samples_per_second": 688.342,
|
148 |
+
"eval_steps_per_second": 10.812,
|
149 |
+
"step": 1000
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 1.96,
|
153 |
+
"step": 1000,
|
154 |
+
"total_flos": 6.687707580928205e+16,
|
155 |
+
"train_loss": 0.0,
|
156 |
+
"train_runtime": 0.5139,
|
157 |
+
"train_samples_per_second": 507861.208,
|
158 |
+
"train_steps_per_second": 992.35
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 1.96,
|
162 |
+
"eval_loss": 1.204106092453003,
|
163 |
+
"eval_runtime": 17.1369,
|
164 |
+
"eval_samples_per_second": 698.436,
|
165 |
+
"eval_steps_per_second": 5.485,
|
166 |
+
"step": 1000
|
167 |
+
}
|
168 |
+
],
|
169 |
+
"logging_steps": 100,
|
170 |
+
"max_steps": 510,
|
171 |
+
"num_train_epochs": 2,
|
172 |
+
"save_steps": 100,
|
173 |
+
"total_flos": 6.687707580928205e+16,
|
174 |
+
"trial_name": null,
|
175 |
+
"trial_params": null
|
176 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc2823916d105196ea5b63035242c7ca45540892fafe0e7e958e6e13f95a3e48
|
3 |
+
size 4664
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|