google-research-datasets/natural_questions
Viewer • Updated • 26.3k • 32.3k • 123
How to use vasudevgupta/bigbird-roberta-natural-questions with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="vasudevgupta/bigbird-roberta-natural-questions") # Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("vasudevgupta/bigbird-roberta-natural-questions")
model = AutoModelForQuestionAnswering.from_pretrained("vasudevgupta/bigbird-roberta-natural-questions")This checkpoint is obtained after training BigBirdForQuestionAnswering (with extra pooler head) on natural_questions dataset for ~ 2 weeks on 2 K80 GPUs. Script for training can be found here: https://github.com/vasudevgupta7/bigbird
| Exact Match | 47.44 |
|---|
Use this model just like any other model from 🤗Transformers
from transformers import BigBirdForQuestionAnswering
model_id = "vasudevgupta/bigbird-roberta-natural-questions"
model = BigBirdForQuestionAnswering.from_pretrained(model_id)
tokenizer = BigBirdTokenizer.from_pretrained(model_id)
In case you are interested in predicting category (null, long, short, yes, no) as well, use BigBirdForNaturalQuestions (instead of BigBirdForQuestionAnswering) from my training script.