Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- qa
|
5 |
+
- question
|
6 |
+
- answering
|
7 |
+
- SQuAD
|
8 |
+
- data2text
|
9 |
+
- metric
|
10 |
+
- nlg
|
11 |
+
- t5-small
|
12 |
+
license: mit
|
13 |
+
datasets:
|
14 |
+
- squad_v2
|
15 |
+
model-index:
|
16 |
+
- name: t5-qa_webnlg_synth-en
|
17 |
+
results:
|
18 |
+
- task:
|
19 |
+
name: Data Question Answering
|
20 |
+
type: extractive-qa
|
21 |
+
widget:
|
22 |
+
- text: "What is the food type at The Eagle? </s> name [ The Eagle ] , eatType [ coffee shop ] , food [ French ] , priceRange [ £ 2 0 - 2 5 ]"
|
23 |
+
---
|
24 |
+
# t5-qa_webnlg_synth-en
|
25 |
+
|
26 |
+
## Model description
|
27 |
+
This model is a *Data Question Answering* model based on T5-small, that answer questions given a structured table as input.
|
28 |
+
It is actually a component of [QuestEval](https://github.com/recitalAI/QuestEval) metric but can be used independently as it is, for QA only.
|
29 |
+
|
30 |
+
|
31 |
+
## How to use
|
32 |
+
```python
|
33 |
+
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
34 |
+
|
35 |
+
tokenizer = T5Tokenizer.from_pretrained("ThomasNLG/t5-qa_webnlg_synth-en")
|
36 |
+
|
37 |
+
model = T5ForConditionalGeneration.from_pretrained("ThomasNLG/t5-qa_webnlg_synth-en")
|
38 |
+
```
|
39 |
+
|
40 |
+
You can play with the model using the inference API, the text input format should follow this template (accordingly to the training stage of the model):
|
41 |
+
|
42 |
+
`text_input = "{QUESTION} </s> {CONTEXT}"`
|
43 |
+
|
44 |
+
where CONTEXT is a structured table that is linearised this way:
|
45 |
+
|
46 |
+
'name [ The Eagle ] , eatType [ coffee shop ] , food [ French ] , priceRange [ £ 2 0 - 2 5 ]'
|
47 |
+
|
48 |
+
|
49 |
+
## Training data
|
50 |
+
The model was trained on synthetic data as described in [Data-QuestEval: A Referenceless Metric for Data to Text Semantic Evaluation](https://arxiv.org/abs/2104.07555).
|
51 |
+
|
52 |
+
### Citation info
|
53 |
+
|
54 |
+
```bibtex
|
55 |
+
@article{rebuffel2021data,
|
56 |
+
title={Data-QuestEval: A Referenceless Metric for Data to Text Semantic Evaluation},
|
57 |
+
author={Rebuffel, Cl{\'e}ment and Scialom, Thomas and Soulier, Laure and Piwowarski, Benjamin and Lamprier, Sylvain and Staiano, Jacopo and Scoutheeten, Geoffrey and Gallinari, Patrick},
|
58 |
+
journal={arXiv preprint arXiv:2104.07555},
|
59 |
+
year={2021}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
```
|