mirbostani commited on
Commit
b56a59c
1 Parent(s): 6473867

README.md is added

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BERT Base Uncased Finetuned on NewsQA
2
+
3
+ Examples with `noAnswer` and `badQuestion` are not included in the training process.
4
+
5
+ ```shell
6
+ $ cd ~/projects/transformers/examples/legacy/question-answering
7
+ $ mkdir bert_base_uncased_finetuned_newsqa
8
+ $ python run_newsqa.py \
9
+ --model_type bert \
10
+ --model_name_or_path "bert-base-uncased" \
11
+ --do_train \
12
+ --do_eval \
13
+ --do_lower_case \
14
+ --num_train_epochs 2 \
15
+ --per_gpu_train_batch_size 8 \
16
+ --per_gpu_eval_batch_size 32 \
17
+ --max_seq_length 384 \
18
+ --max_grad_norm inf \
19
+ --doc_stride 128 \
20
+ --train_file "~/projects/data/newsqa/combined-newsqa-data-v1.json" \
21
+ --predict_file "~/projects/data/newsqa/combined-newsqa-data-v1.json" \
22
+ --output_dir "./bert_base_uncased_finetuned_newsqa" \
23
+ --save_steps 20000
24
+ ```
25
+
26
+ Results:
27
+
28
+ ```shell
29
+ {'exact': 60.19350380096752, 'f1': 73.29371985128037, 'total': 4341, 'HasAns_exact': 60.19350380096752, 'HasAns_f1': 73.29371985128037, 'HasAns_total': 4341, 'best_exact': 60.19350380096752, 'best_exact_thresh': 0.0, 'best_f1': 73.29371985128037, 'best_f1_thresh': 0.0}
30
+ ```
31
+
32
+ To prepare the database, follow the instructions on the [NewsQA](https://github.com/Maluuba/newsqa) repository.