This is the MADE Adapter for the HotpotQA partition of the MRQA 2019 Shared Task dataset. The adapter was created by Friedman et al. (2021) and should be used with this encoder: https://huggingface.co/UKP-SQuARE/MADE_Encoder
The UKP-SQuARE team created this model repository to simplify the deployment of this model on the UKP-SQuARE platform. The GitHub repository of the original authors is https://github.com/princeton-nlp/MADE
from transformers import RobertaForQuestionAnswering, RobertaTokenizerFast
model = RobertaForQuestionAnswering.from_pretrained("UKP-SQuARE/MADE_Encoder")
model.load_adapter("UKP-SQuARE/MADE_HotpotQA_Adapter", source="hf")
model.set_active_adapters("HotpotQA")
tokenizer = RobertaTokenizerFast.from_pretrained('UKP-SQuARE/MADE_Encoder')
pipe = pipeline("question-answering", model=model, tokenizer=tokenizer)
pipe({"question": "What is the capital of Germany?", "context": "The capital of Germany is Berlin."})