Downloads · 30 days
72
11% of all-time downloads
mirbostani/bert-base-uncased-finetuned-triviaqa
bert-base-uncased-finetuned-triviaqa is a question answering model from mirbostani. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as apache-2.0.
The BERT (Base) model is finetuned on the TriviaQA dataset using a modified version of the runsquad.py legacy script in Transformers. The script is provided in this repository.
Downloads · 30 days
72
11% of all-time downloads
All-time downloads
680
Public
Repo size
871 MB
Likes
0
Public
Click a slice to open those files.
.bin436 MB · 100%
From the Hugging Face model README
The BERT (Base) model is finetuned on the TriviaQA dataset using a modified version of the run_squad.py legacy script in Transformers. The script is provided in this repository.
$ cd ~/projects/transformers/examples/legacy/question-answering
$ mkdir bert_base_uncased_finetuned_triviaqa
python run_triviaqa.py \
--model_type bert \
--model_name_or_path "bert-base-uncased" \
--do_train \
--do_eval \
--do_lower_case \
--num_train_epochs 2 \
--per_gpu_train_batch_size 8 \
--per_gpu_eval_batch_size 32 \
--max_seq_length 384 \
--max_grad_norm inf\
--doc_stride 128 \
--train_file "~/projects/data/triviaqa/squad-triviaqa-wikipedia-train.json" \
--predict_file "~/projects//data/triviaqa/squad-triviaqa-wikipedia-dev.json" \
--output_dir "./bert_base_uncased_finetuned_triviaqa" \
--save_steps 50000
Results:
{'exact': 55.57530864197531, 'f1': 61.37345358329793, 'total': 10125, 'HasAns_exact': 55.57530864197531, 'HasAns_f1': 61.37345358329793, 'HasAns_total': 10125, 'best_exact': 55.57530864197531, 'best_exact_thresh': 0.0, 'best_f1': 61.37345358329793, 'best_f1_thresh': 0.0}