Back to all models
question-answering mask_token: [MASK]
Query this model
πŸ”₯ This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint  

⚑️ Upgrade your account to access the Inference API

Share Copied link to clipboard

Monthly model downloads

phiyodr/bert-large-finetuned-squad2 phiyodr/bert-large-finetuned-squad2
last 30 days



Contributed by

phiyodr Philipp
4 models

How to use this model directly from the πŸ€—/transformers library:

Copy to clipboard
from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("phiyodr/bert-large-finetuned-squad2") model = AutoModelForQuestionAnswering.from_pretrained("phiyodr/bert-large-finetuned-squad2")
Uploaded in S3


Model description

This model is based on bert-large-uncased and was finetuned on SQuAD2.0. The corresponding papers you can found here (model) and here (data).

How to use

from transformers.pipelines import pipeline

model_name = "phiyodr/bert-large-finetuned-squad2"
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
inputs = {
    'question': 'What discipline did Winkelmann create?',
    'context': 'Johann Joachim Winckelmann was a German art historian and archaeologist. He was a pioneering Hellenist who first articulated the difference between Greek, Greco-Roman and Roman art. "The prophet and founding hero of modern archaeology", Winckelmann was one of the founders of scientific archaeology and first applied the categories of style on a large, systematic basis to the history of art. '

Training procedure

    "base_model": "bert-large-uncased",
    "do_lower_case": True,
    "learning_rate": 3e-5,
    "num_train_epochs": 4,
    "max_seq_length": 384,
    "doc_stride": 128,
    "max_query_length": 64,
    "batch_size": 96 

Eval results

  "exact": 76.22336393497852,
  "f1": 79.72527570261339,
  "total": 11873,
  "HasAns_exact": 76.19770580296895,
  "HasAns_f1": 83.21157193271408,
  "HasAns_total": 5928,
  "NoAns_exact": 76.24894869638352,
  "NoAns_f1": 76.24894869638352,
  "NoAns_total": 5945