metadata
license: apache-2.0
tags:
- question-answering
- squad
- transformers
- pytorch
- evaluation
- hf-course
- fine-tuned
datasets:
- squad
metrics:
- exact_match
- f1
model-index:
- name: QA-SQuAD-BERT
results:
- task:
type: question-answering
name: Question Answering
dataset:
name: SQuAD v1.1
type: squad
metrics:
- name: Exact Match
type: exact_match
value: 82.7
- name: F1
type: f1
value: 87.0039
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)