Downloads · 30 days
15
0% of all-time downloads
saket12-hf/bert-base-uncased-finetuned-squad2
bert-base-uncased-finetuned-squad2 is a question answering model from saket12-hf. 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.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
15
0% of all-time downloads
All-time downloads
7.4K
Public
Parameters
109M
1.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin436 MB · 50%
From the Hugging Face model README
BERTbase fine-tuned on SQuAD 2.0 : Encoder-based Transformer Language model, pretrained with Masked Language Modeling and Next Sentence Prediction.<br> Suitable for Question-Answering tasks, predicts answer spans within the context provided.<br>
Language model: bert-base-uncased
Language: English
Downstream-task: Question-Answering
Training data: Train-set SQuAD 2.0
Evaluation data: Evaluation-set SQuAD 2.0
Hardware Accelerator used: GPU Tesla T4
For Question-Answering -
!pip install transformers
from transformers import pipeline
model_checkpoint = "IProject-10/bert-base-uncased-finetuned-squad2"
question_answerer = pipeline("question-answering", model=model_checkpoint)
context = """
🤗 Transformers is backed by the three most popular deep learning libraries — Jax, PyTorch and TensorFlow — with a seamless integration
between them. It's straightforward to train your models with one before loading them for inference with the other.
"""
question = "Which deep learning libraries back 🤗 Transformers?"
question_answerer(question=question, context=context)
Evaluation on SQuAD 2.0 validation dataset:
exact: 73.5029057525478,
f1: 76.79224102466394,
total: 11873,
HasAns_exact: 73.46491228070175,
HasAns_f1: 80.05301580395327,
HasAns_total: 5928,
NoAns_exact: 73.5407905803196,
NoAns_f1: 73.5407905803196,
NoAns_total: 5945,
best_exact: 73.5029057525478,
best_exact_thresh: 0.9997851848602295,
best_f1: 76.79224102466425,
best_f1_thresh: 0.9997851848602295,
total_time_in_seconds: 209.65395342100004,
samples_per_second: 56.63141479692573,
latency_in_seconds: 0.01765804374808389
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.0122 | 1.0 | 8235 | 1.0740 |
| 0.6805 | 2.0 | 16470 | 1.0820 |
| 0.4542 | 3.0 | 24705 | 1.3537 |
This model is a fine-tuned version of bert-base-uncased on the squad_v2 dataset. It achieves the following results on the evaluation set: