system's picture
system HF staff
Update README.md
b476ea0
metadata
language: en
tags:
  - pytorch
  - question-answering
datasets:
  - squad2
metrics:
  - exact
  - f1
widget:
  - text: 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.

roberta-large-finetuned-squad2

Model description

This model is based on roberta-large 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/roberta-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. '
}
nlp(inputs)

Training procedure

{
    "base_model": "roberta-large",
    "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": 84.38473848227069,
  "f1": 87.89711571225455,
  "total": 11873,
  "HasAns_exact": 80.9885290148448,
  "HasAns_f1": 88.02335608157898,
  "HasAns_total": 5928,
  "NoAns_exact": 87.77123633305298,
  "NoAns_f1": 87.77123633305298,
  "NoAns_total": 5945
}