Commit
路
d8f8236
1
Parent(s):
1ea537c
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
datasets:
|
4 |
+
- mrqa
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
metrics:
|
8 |
+
- squad
|
9 |
+
library_name: adapter-transformers
|
10 |
+
pipeline_tag: question-answering
|
11 |
---
|
12 |
+
|
13 |
+
# Description
|
14 |
+
This is the single-dataset adapter for the TriviaQA partition of the MRQA 2019 Shared Task Dataset. The adapter was created by Friedman et al. (2021) and should be used with the `roberta-base` encoder.
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
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
|
19 |
+
|
20 |
+
# Usage
|
21 |
+
This model contains the same weights as https://huggingface.co/princeton-nlp/MADE/resolve/main/single_dataset_ft/TriviaQA/model.pt. The only difference is that our repository follows the standard format of AdapterHub. Therefore, you could load this model as follows:
|
22 |
+
|
23 |
+
```
|
24 |
+
from transformers import RobertaForQuestionAnswering, RobertaTokenizerFast
|
25 |
+
|
26 |
+
model = RobertaForQuestionAnswering.from_pretrained("roberta-base")
|
27 |
+
model.load_adapter("UKP-SQuARE/TriviaQA_Adapter_RoBERTa", source="hf")
|
28 |
+
model.set_active_adapters("TriviaQA")
|
29 |
+
|
30 |
+
tokenizer = RobertaTokenizerFast.from_pretrained('roberta-base')
|
31 |
+
|
32 |
+
pipe = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
33 |
+
pipe({"question": "What is the capital of Germany?", "context": "The capital of Germany is Berlin."})
|
34 |
+
```
|
35 |
+
|
36 |
+
Note you need the adapter-transformers library https://adapterhub.ml
|
37 |
+
|
38 |
+
# Evaluation
|
39 |
+
Friedman et al. report an F1 score of 79.6 on TriviaQA.
|
40 |
+
|
41 |
+
Please refer to the original publication for more information.
|
42 |
+
|
43 |
+
# Citation
|
44 |
+
Single-dataset Experts for Multi-dataset Question Answering (Friedman et al., EMNLP 2021)
|