Downloads · 30 days
28
2% of all-time downloads
sjrhuschlee/bart-base-squad2
bart-base-squad2 is a question answering model from sjrhuschlee. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of facebook/bart-base on the SQuAD2.0 dataset.
Downloads · 30 days
28
2% of all-time downloads
All-time downloads
1.7K
Public
Parameters
139M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin558 MB · 50%
From the Hugging Face model README
This model is a fine-tuned version of facebook/bart-base on the SQuAD2.0 dataset.
Language model: bart-base
Language: English
Downstream-task: Extractive QA
Training data: SQuAD 2.0
Eval data: SQuAD 2.0
Infrastructure: 1x NVIDIA 3070
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
model_name = "sjrhuschlee/bart-base-squad2"
# a) Using pipelines
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
qa_input = {
'question': 'Where do I live?',
'context': 'My name is Sarah and I live in London'
}
res = nlp(qa_input)
# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Squad v2
{
"eval_HasAns_exact": 76.45074224021593,
"eval_HasAns_f1": 82.88605283171232,
"eval_HasAns_total": 5928,
"eval_NoAns_exact": 74.01177460050462,
"eval_NoAns_f1": 74.01177460050462,
"eval_NoAns_total": 5945,
"eval_best_exact": 75.23793481007327,
"eval_best_exact_thresh": 0.0,
"eval_best_f1": 78.45098300230696,
"eval_best_f1_thresh": 0.0,
"eval_exact": 75.22951233892024,
"eval_f1": 78.44256053115387,
"eval_runtime": 131.875,
"eval_samples": 11955,
"eval_samples_per_second": 90.654,
"eval_steps_per_second": 3.784,
"eval_total": 11873
}
# Squad
{
"eval_exact_match": 83.40586565752129,
"eval_f1": 90.37706849113668,
"eval_runtime": 117.2093,
"eval_samples": 10619,
"eval_samples_per_second": 90.599,
"eval_steps_per_second": 3.78
}
The following hyperparameters were used during training: