BERT Base Uncased Finetuned on TriviaQA
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}
- Downloads last month
- 42
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.