bert-squad-qa-full-finetuning
bert-base-uncased fully fine-tuned (BertForQuestionAnswering, all layers trained) for extractive
question answering on 15,000 examples of SQuAD v1.1.
The feature-based baseline (frozen BERT + Logistic Regression) is published separately at Giobbva/bert-squad-qa-feature-based.
| Model | Exact Match | F1 |
|---|---|---|
| Frozen BERT + Logistic Regression (bert-squad-qa-feature-based) | 14.35 | 24.57 |
| This model (full fine-tuning) | 69.04 | 79.53 |
Evaluated on the full SQuAD v1.1 validation set (10,570 questions).
Files in this repository
BertForQuestionAnswering weights, config and tokenizer (best epoch by validation loss).
Training
- AdamW, encoder lr 2e-05, QA head lr 0.001, weight decay 0.01, linear schedule with 10% warm-up
- 2 epochs, batch size 16, max length 384, stride 128,
fp16=True, seed 42
Usage
from transformers import pipeline
qa = pipeline("question-answering", model="Giobbva/bert-squad-qa-full-finetuning")
qa(question="Where is the Eiffel Tower?", context="The Eiffel Tower is in Paris.")