Team Ai
Modelpublic

samandar1105/Question_Answering

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes15downloads
Model Card

BERT Fine-Tuned on SQuAD (Extractive Question Answering)

This model extracts answers to questions directly from a provided text passage. It was fine-tuned from bert-base-cased on the SQuAD v1.1 dataset.

How It Works

Given a context (a paragraph of text) and a question, the model finds and returns the exact span of text in the context that answers the question.

Performance

MetricScore
Exact Match81.05%
F1 Score88.55%

(Evaluated on SQuAD v1.1 validation set — 10,570 examples)

How to Use

python
from transformers import pipeline

qa = pipeline(
    "question-answering",
    model="samandar1105/Question_Answering"
)

result = qa(
    question="Who designed the Eiffel Tower?",
    context="The Eiffel Tower was designed by Gustave Eiffel and built between 1887 and 1889 in Paris."
)
print(result)
# {'answer': 'Gustave Eiffel', 'score': 0.99, 'start': 31, 'end': 45}

Training Details

ParameterValue
Base modelbert-base-cased
DatasetSQuAD v1.1 (87,599 train / 10,570 val)
Learning rate2e-5
Epochs3
Batch size16
Max sequence length384
Stride128
FrameworkPyTorch + HuggingFace Transformers