rajpurkar/squad
Viewer • Updated • 98.2k • 261k • 1.12k
How to use Giobbva/bert-squad-qa-full-finetuning with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="Giobbva/bert-squad-qa-full-finetuning") # Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("Giobbva/bert-squad-qa-full-finetuning")
model = AutoModelForQuestionAnswering.from_pretrained("Giobbva/bert-squad-qa-full-finetuning", device_map="auto")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).
BertForQuestionAnswering weights, config and tokenizer (best epoch by validation loss).
fp16=True, seed 42from 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.")
Base model
google-bert/bert-base-uncased