model update
Browse files
README.md
CHANGED
@@ -21,12 +21,12 @@ widget:
|
|
21 |
example_title: "Question Generation Example 2"
|
22 |
- text: "generate question: como <hl> el gobierno de Abbott <hl> que asumió el cargo el 18 de septiembre de 2013."
|
23 |
example_title: "Question Generation Example 3"
|
24 |
-
- text: "<hl> En la diáspora somalí, múltiples eventos islámicos de recaudación de fondos se llevan a cabo cada año en ciudades como Birmingham, Londres, Toronto y Minneapolis, donde los académicos y profesionales somalíes dan conferencias y responden preguntas de la audiencia. <hl> El propósito de estos eventos es recaudar dinero para nuevas escuelas o universidades en Somalia, para ayudar a los somalíes que han sufrido como consecuencia de inundaciones y / o sequías, o para reunir fondos para la creación de nuevas mezquitas como."
|
25 |
example_title: "Answer Extraction Example 1"
|
26 |
-
- text: "<hl> Los estudiosos y los histori a dores están divididos en cuanto a qué evento señala el final de la era helenística. <hl> El período helenístico se puede ver que termina con la conquista final del corazón griego por Roma en 146 a. C. tras la guerra aquea, con la derrota final del reino ptolemaico en la batalla de Actium en 31 a. Helenístico se distingue de helénico en que el primero abarca toda la esfera de influencia griega antigua directa, mientras que el segundo se refiere a la propia Grecia."
|
27 |
example_title: "Answer Extraction Example 2"
|
28 |
model-index:
|
29 |
-
- name: lmqg/mt5-small-esquad-
|
30 |
results:
|
31 |
- task:
|
32 |
name: Text2text Generation
|
@@ -36,63 +36,44 @@ model-index:
|
|
36 |
type: default
|
37 |
args: default
|
38 |
metrics:
|
39 |
-
- name: BLEU4
|
40 |
-
type:
|
41 |
-
value:
|
42 |
-
- name: ROUGE-L
|
43 |
-
type:
|
44 |
-
value:
|
45 |
-
- name: METEOR
|
46 |
-
type:
|
47 |
-
value:
|
48 |
-
- name: BERTScore
|
49 |
-
type:
|
50 |
-
value:
|
51 |
-
- name: MoverScore
|
52 |
-
type:
|
53 |
-
value:
|
54 |
-
- name: QAAlignedF1Score (
|
55 |
-
type:
|
56 |
-
value:
|
57 |
-
- name: QAAlignedRecall (
|
58 |
-
type:
|
59 |
-
value:
|
60 |
-
- name: QAAlignedPrecision (
|
61 |
-
type:
|
62 |
-
value:
|
63 |
-
- name: QAAlignedF1Score (
|
64 |
-
type:
|
65 |
-
value:
|
66 |
-
- name: QAAlignedRecall (
|
67 |
-
type:
|
68 |
-
value:
|
69 |
-
- name: QAAlignedPrecision (
|
70 |
-
type:
|
71 |
-
value:
|
72 |
---
|
73 |
|
74 |
-
# Model Card of `lmqg/mt5-small-esquad-
|
75 |
-
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation
|
76 |
-
[lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
77 |
-
This model is fine-tuned on the answer extraction task as well as the question generation.
|
78 |
|
79 |
-
Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)).
|
80 |
-
|
81 |
-
```
|
82 |
-
|
83 |
-
@inproceedings{ushio-etal-2022-generative,
|
84 |
-
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
85 |
-
author = "Ushio, Asahi and
|
86 |
-
Alva-Manchego, Fernando and
|
87 |
-
Camacho-Collados, Jose",
|
88 |
-
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
89 |
-
month = dec,
|
90 |
-
year = "2022",
|
91 |
-
address = "Abu Dhabi, U.A.E.",
|
92 |
-
publisher = "Association for Computational Linguistics",
|
93 |
-
}
|
94 |
-
|
95 |
-
```
|
96 |
|
97 |
### Overview
|
98 |
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
|
@@ -105,44 +86,57 @@ Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](h
|
|
105 |
### Usage
|
106 |
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
107 |
```python
|
108 |
-
|
109 |
from lmqg import TransformersQG
|
|
|
110 |
# initialize model
|
111 |
-
model = TransformersQG(language=
|
|
|
112 |
# model prediction
|
113 |
-
|
114 |
|
115 |
```
|
116 |
|
117 |
- With `transformers`
|
118 |
```python
|
119 |
-
|
120 |
from transformers import pipeline
|
121 |
-
|
122 |
-
pipe = pipeline("text2text-generation",
|
|
|
123 |
# answer extraction
|
124 |
-
answer = pipe(
|
|
|
125 |
# question generation
|
126 |
-
question = pipe(
|
127 |
|
128 |
```
|
129 |
|
130 |
-
## Evaluation
|
131 |
|
132 |
|
133 |
-
|
134 |
|
135 |
-
|
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
|
140 |
-
|
141 |
|
142 |
-
|
|
143 |
-
|
144 |
-
|
|
145 |
-
|
|
|
|
|
|
|
|
|
146 |
|
147 |
|
148 |
|
@@ -165,11 +159,10 @@ The following hyperparameters were used during fine-tuning:
|
|
165 |
- gradient_accumulation_steps: 4
|
166 |
- label_smoothing: 0.15
|
167 |
|
168 |
-
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-esquad-
|
169 |
|
170 |
## Citation
|
171 |
```
|
172 |
-
|
173 |
@inproceedings{ushio-etal-2022-generative,
|
174 |
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
175 |
author = "Ushio, Asahi and
|
|
|
21 |
example_title: "Question Generation Example 2"
|
22 |
- text: "generate question: como <hl> el gobierno de Abbott <hl> que asumió el cargo el 18 de septiembre de 2013."
|
23 |
example_title: "Question Generation Example 3"
|
24 |
+
- text: "extract answers: <hl> En la diáspora somalí, múltiples eventos islámicos de recaudación de fondos se llevan a cabo cada año en ciudades como Birmingham, Londres, Toronto y Minneapolis, donde los académicos y profesionales somalíes dan conferencias y responden preguntas de la audiencia. <hl> El propósito de estos eventos es recaudar dinero para nuevas escuelas o universidades en Somalia, para ayudar a los somalíes que han sufrido como consecuencia de inundaciones y / o sequías, o para reunir fondos para la creación de nuevas mezquitas como."
|
25 |
example_title: "Answer Extraction Example 1"
|
26 |
+
- text: "extract answers: <hl> Los estudiosos y los histori a dores están divididos en cuanto a qué evento señala el final de la era helenística. <hl> El período helenístico se puede ver que termina con la conquista final del corazón griego por Roma en 146 a. C. tras la guerra aquea, con la derrota final del reino ptolemaico en la batalla de Actium en 31 a. Helenístico se distingue de helénico en que el primero abarca toda la esfera de influencia griega antigua directa, mientras que el segundo se refiere a la propia Grecia."
|
27 |
example_title: "Answer Extraction Example 2"
|
28 |
model-index:
|
29 |
+
- name: lmqg/mt5-small-esquad-qg-ae
|
30 |
results:
|
31 |
- task:
|
32 |
name: Text2text Generation
|
|
|
36 |
type: default
|
37 |
args: default
|
38 |
metrics:
|
39 |
+
- name: BLEU4 (Question Generation)
|
40 |
+
type: bleu4_question_generation
|
41 |
+
value: 8.79
|
42 |
+
- name: ROUGE-L (Question Generation)
|
43 |
+
type: rouge_l_question_generation
|
44 |
+
value: 23.13
|
45 |
+
- name: METEOR (Question Generation)
|
46 |
+
type: meteor_question_generation
|
47 |
+
value: 21.66
|
48 |
+
- name: BERTScore (Question Generation)
|
49 |
+
type: bertscore_question_generation
|
50 |
+
value: 83.39
|
51 |
+
- name: MoverScore (Question Generation)
|
52 |
+
type: moverscore_question_generation
|
53 |
+
value: 58.34
|
54 |
+
- name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
|
55 |
+
type: qa_aligned_f1_score_bertscore_question_answer_generation
|
56 |
+
value: 79.06
|
57 |
+
- name: QAAlignedRecall-BERTScore (Question & Answer Generation)
|
58 |
+
type: qa_aligned_recall_bertscore_question_answer_generation
|
59 |
+
value: 81.94
|
60 |
+
- name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
|
61 |
+
type: qa_aligned_precision_bertscore_question_answer_generation
|
62 |
+
value: 76.46
|
63 |
+
- name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
|
64 |
+
type: qa_aligned_f1_score_moverscore_question_answer_generation
|
65 |
+
value: 54.49
|
66 |
+
- name: QAAlignedRecall-MoverScore (Question & Answer Generation)
|
67 |
+
type: qa_aligned_recall_moverscore_question_answer_generation
|
68 |
+
value: 56.21
|
69 |
+
- name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
|
70 |
+
type: qa_aligned_precision_moverscore_question_answer_generation
|
71 |
+
value: 52.96
|
72 |
---
|
73 |
|
74 |
+
# Model Card of `lmqg/mt5-small-esquad-qg-ae`
|
75 |
+
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation and answer extraction jointly on the [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
|
|
|
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
### Overview
|
79 |
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
|
|
|
86 |
### Usage
|
87 |
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
88 |
```python
|
|
|
89 |
from lmqg import TransformersQG
|
90 |
+
|
91 |
# initialize model
|
92 |
+
model = TransformersQG(language="es", model="lmqg/mt5-small-esquad-qg-ae")
|
93 |
+
|
94 |
# model prediction
|
95 |
+
question_answer_pairs = model.generate_qa("a noviembre , que es también la estación lluviosa.")
|
96 |
|
97 |
```
|
98 |
|
99 |
- With `transformers`
|
100 |
```python
|
|
|
101 |
from transformers import pipeline
|
102 |
+
|
103 |
+
pipe = pipeline("text2text-generation", "lmqg/mt5-small-esquad-qg-ae")
|
104 |
+
|
105 |
# answer extraction
|
106 |
+
answer = pipe("generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India.")
|
107 |
+
|
108 |
# question generation
|
109 |
+
question = pipe("extract answers: <hl> En la diáspora somalí, múltiples eventos islámicos de recaudación de fondos se llevan a cabo cada año en ciudades como Birmingham, Londres, Toronto y Minneapolis, donde los académicos y profesionales somalíes dan conferencias y responden preguntas de la audiencia. <hl> El propósito de estos eventos es recaudar dinero para nuevas escuelas o universidades en Somalia, para ayudar a los somalíes que han sufrido como consecuencia de inundaciones y / o sequías, o para reunir fondos para la creación de nuevas mezquitas como.")
|
110 |
|
111 |
```
|
112 |
|
113 |
+
## Evaluation
|
114 |
|
115 |
|
116 |
+
- ***Metric (Question Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-esquad-qg-ae/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json)
|
117 |
|
118 |
+
| | Score | Type | Dataset |
|
119 |
+
|:-----------|--------:|:--------|:-----------------------------------------------------------------|
|
120 |
+
| BERTScore | 83.39 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
121 |
+
| Bleu_1 | 24.5 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
122 |
+
| Bleu_2 | 16.48 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
123 |
+
| Bleu_3 | 11.83 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
124 |
+
| Bleu_4 | 8.79 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
125 |
+
| METEOR | 21.66 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
126 |
+
| MoverScore | 58.34 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
127 |
+
| ROUGE_L | 23.13 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
128 |
|
129 |
|
130 |
+
- ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-esquad-qg-ae/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qg_esquad.default.json)
|
131 |
|
132 |
+
| | Score | Type | Dataset |
|
133 |
+
|:--------------------------------|--------:|:--------|:-----------------------------------------------------------------|
|
134 |
+
| QAAlignedF1Score (BERTScore) | 79.06 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
135 |
+
| QAAlignedF1Score (MoverScore) | 54.49 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
136 |
+
| QAAlignedPrecision (BERTScore) | 76.46 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
137 |
+
| QAAlignedPrecision (MoverScore) | 52.96 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
138 |
+
| QAAlignedRecall (BERTScore) | 81.94 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
139 |
+
| QAAlignedRecall (MoverScore) | 56.21 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
|
140 |
|
141 |
|
142 |
|
|
|
159 |
- gradient_accumulation_steps: 4
|
160 |
- label_smoothing: 0.15
|
161 |
|
162 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-esquad-qg-ae/raw/main/trainer_config.json).
|
163 |
|
164 |
## Citation
|
165 |
```
|
|
|
166 |
@inproceedings{ushio-etal-2022-generative,
|
167 |
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
168 |
author = "Ushio, Asahi and
|