Downloads · 30 days
22
18% of all-time downloads
omarbayoumi2/bert-base-qa-squad-colab
bert-base-qa-squad-colab is a question answering model from omarbayoumi2. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned bert-base-uncased on SQuAD v1.1 for English extractive question answering.
Downloads · 30 days
22
18% of all-time downloads
All-time downloads
119
Public
Parameters
109M
436 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
Fine-tuned bert-base-uncased on SQuAD v1.1 for English extractive question answering.
This model takes a context paragraph and a question and predicts the most likely answer span inside the context.
It is intended as a compact, educational example of fine-tuning a smol LM (~110M parameters) for QA on Google Colab and deploying it on Hugging Face.
Trainer⚠️ Not intended for production-critical use (medical/legal/financial advice, etc.).
bert-base-uncasedomarbayoumi2rajpurkar/squad)Each example provides:
context: paragraphquestion: question stringanswers: list with text and answer_start (character offset)Fine-tuning was performed with the Hugging Face Trainer API.
Trainer)Loss is computed as cross-entropy over the start and end token positions.
Evaluation was performed on the SQuAD v1.1 validation split using the standard SQuAD metric:
Typical results for this setup are:
| Metric | Score (approx) |
|---|---|
| Exact Match | 66–80% |
| F1 | 77–88% |
Scores may vary depending on number of training examples, epochs and random seed.
pipelinefrom transformers import pipeline
qa = pipeline(
"question-answering",
model="omarbayoumi2/bert-base-qa-squad-colab",
)
context = "BERT is a language representation model developed by researchers at Google."
question = "Who developed BERT?"
result = qa(question=question, context=context)
print(result)
# {'score': ..., 'start': ..., 'end': ..., 'answer': 'researchers at Google'}