rajpurkar/squad
Viewer • Updated • 98.2k • 202k • 1.23k
How to use mbartolo/roberta-large-synqa with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "question-answering" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# pip install "transformers<5.0.0"
from transformers import pipeline
pipe = pipeline("question-answering", model="mbartolo/roberta-large-synqa") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("mbartolo/roberta-large-synqa")
model = AutoModelForQuestionAnswering.from_pretrained("mbartolo/roberta-large-synqa", device_map="auto")This is a RoBERTa-Large QA Model trained from https://huggingface.co/roberta-large in two stages. First, it is trained on synthetic adversarial data generated using a BART-Large question generator on Wikipedia passages from SQuAD, and then it is trained on SQuAD and AdversarialQA (https://arxiv.org/abs/2002.00293) in a second stage of fine-tuning.
Training data: SQuAD + AdversarialQA Evaluation data: SQuAD + AdversarialQA
Approx. 1 training epoch on the synthetic data and 2 training epochs on the manually-curated data.
Please refer to https://arxiv.org/abs/2104.08678 for full details.