susumu2357 commited on
Commit
533d4c1
1 Parent(s): 0801903

first commit

Browse files
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - sv
4
+ thumbnail:
5
+ tags:
6
+ - squad
7
+ - translation
8
+ license: apache-2.0
9
+ datasets:
10
+ -
11
+ metrics:
12
+ - squad_v2
13
+ ---
14
+
15
+ # Swedish BERT Fine-tuned on SQuAD v2
16
+
17
+ This model is a fine-tuning checkpoint of Swedish BERT on SQuAD v2.
18
+
19
+ ## Training data
20
+
21
+ Fine-tuning was done based on the pre-trained model [KB/bert-base-swedish-cased](https://huggingface.co/KB/bert-base-swedish-cased).
22
+
23
+ Training and dev datasets are our
24
+ [Swedish translation of SQuAD v2](https://github.com/susumu2357/SQuAD_v2_sv).
25
+
26
+ [Here](https://huggingface.co/datasets/susumu2357/squad_v2_sv) is the HuggingFace Datasets.
27
+
28
+
29
+ ## Hyperparameters
30
+ ```
31
+ batch_size = 16
32
+ n_epochs = 2
33
+ max_seq_len = 386
34
+ learning_rate = 3e-5
35
+ warmup_steps = 2900 # warmup_proportion = 0.2
36
+ doc_stride=128
37
+ max_query_length=64
38
+ ```
39
+
40
+ ## Eval results
41
+ ```
42
+ 'exact': 66.72642524202223
43
+ 'f1': 70.11149581003404
44
+ 'total': 11156
45
+ 'HasAns_exact': 55.574745730186144
46
+ 'HasAns_f1': 62.821693965983044
47
+ 'HasAns_total': 5211
48
+ 'NoAns_exact': 76.50126156433979
49
+ 'NoAns_f1': 76.50126156433979
50
+ 'NoAns_total': 5945
51
+ ```
52
+
53
+ ## Limitations and bias
54
+
55
+ This model may contain biases due to mistranslations of the SQuAD dataset.
56
+
57
+ ## BibTeX entry and citation info
58
+
59
+ ```bibtex
60
+ @misc{svSQuADbert,
61
+ author = {Susumu Okazawa},
62
+ title = {Swedish BERT Fine-tuned on Swedish SQuAD 2.0},
63
+ year = {2021},
64
+ howpublished = {\url{}},
65
+ }
66
+ ```
config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/drive/My Drive/NLP project/BERT_epoch2_warmup",
3
+ "architectures": [
4
+ "BertForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "output_past": true,
19
+ "pad_token_id": 0,
20
+ "type_vocab_size": 2,
21
+ "vocab_size": 50325
22
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e307929e12fa22596cf0c3cb9e7b2bf5f993ad3d87a09315fd0a53cdaaade887
3
+ size 496493853
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca1f1b278623984160da108a2a63aaf8e0652c864b0840898d3e4792092bbfad
3
+ size 499040016
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "special_tokens_map_file": "/root/.cache/torch/transformers/b7d6038768d76bb445ef775c850600834c30d86ade9a018032440242f7c1fd31.275045728fbf41c11d3dae08b8742c054377e18d92cc7b72b6351152a99b64e4", "tokenizer_file": null, "name_or_path": "/content/drive/My Drive/NLP project/BERT_epoch1_warmup/checkpoint-3000"}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff