Question Answering
Transformers
Safetensors
PyTorch
bert
squad
evaluation
hf-course
fine-tuned
Eval Results (legacy)
Instructions to use tmt3103/SQuAD_BERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tmt3103/SQuAD_BERT with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="tmt3103/SQuAD_BERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("tmt3103/SQuAD_BERT") model = AutoModelForQuestionAnswering.from_pretrained("tmt3103/SQuAD_BERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from tmt3103/SQuAD_BERT: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/tmt3103/SQuAD_BERT/resolve/main/README.md
- Command line
-
hf download hf://tmt3103/SQuAD_BERT/README.md
-
curl -L -o README.md https://huggingface.co/tmt3103/SQuAD_BERT/resolve/main/README.md
2.3 kB
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)