QA-SQuAD-BERT
A BERT-based model fine-tuned on SQuAD v1.1 for extractive QA
Model Description
This model is based on bert-base-uncased and was fine-tuned on the SQuAD v1.1 dataset for extractive question answering. It takes a question and a context passage as input and predicts the span of text in the passage that most likely answers the question.
The model was trained using the Hugging Face 🤗 Transformers library.
Intended Uses & Limitations
Intended Uses
- Extractive question answering on Wikipedia-style passages.
- As a downstream component in information retrieval pipelines.
- Educational purposes or experimentation with fine-tuning on QA tasks.
Limitations
- The model may not generalize well to out-of-domain datasets.
- It does not handle unanswerable questions (not trained on SQuAD v2.0).
- It may produce incorrect or misleading answers if context is ambiguous.
Training Details
- Base model: bert-base-uncased
- Dataset: SQuAD v1.1
- Epochs: 3
- Batch size: 8
- Learning rate: 2e-5
- Optimizer: AdamW
- Max length: 384
- Hardware used: Colab/GPU T4
Evaluation Results
The model was evaluated on the SQuAD v1.1 development set using the standard metrics: Exact Match (EM) and F1.
Metric | Score |
---|---|
Exact Match | 82.7 |
F1 | 87.0039 |
How to Use
You can load this model using the pipeline
API:
from transformers import pipeline
qa_pipeline = pipeline("question-answering", model="tmt3103/SQuAD_BERT")
result = qa_pipeline({
"context": "Hugging Face is creating a tool that democratizes AI.",
"question": "What is Hugging Face creating?"
})
print(result)
- Downloads last month
- 2
Dataset used to train tmt3103/SQuAD_BERT
Evaluation results
- Exact Match on SQuAD v1.1self-reported82.700
- F1 on SQuAD v1.1self-reported87.004