model update
Browse files
README.md
CHANGED
@@ -58,14 +58,14 @@ This model is fine-tuned version of [google/mt5-small](https://huggingface.co/go
|
|
58 |
[lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
59 |
This model is fine-tuned on the answer extraction task as well as the question generation.
|
60 |
|
61 |
-
Please cite our paper if you use the model ([
|
62 |
|
63 |
```
|
64 |
|
65 |
@inproceedings{ushio-etal-2022-generative,
|
66 |
-
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration
|
67 |
author = "Ushio, Asahi and
|
68 |
-
Alva-Manchego, Fernando
|
69 |
Camacho-Collados, Jose",
|
70 |
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
71 |
month = dec,
|
@@ -82,20 +82,29 @@ Please cite our paper if you use the model ([TBA](TBA)).
|
|
82 |
- **Training data:** [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (default)
|
83 |
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
84 |
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
85 |
-
- **Paper:** [
|
86 |
|
87 |
### Usage
|
|
|
88 |
```python
|
89 |
|
90 |
-
from
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
|
93 |
-
pipe = pipeline("text2text-generation", model_path)
|
94 |
|
95 |
-
|
96 |
-
|
97 |
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
99 |
question = pipe('generate question: Créateur » (Maker), lui aussi au singulier, « <hl> le Suprême Berger <hl> » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.')
|
100 |
|
101 |
```
|
@@ -134,11 +143,12 @@ The following hyperparameters were used during fine-tuning:
|
|
134 |
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-frquad-multitask/raw/main/trainer_config.json).
|
135 |
|
136 |
## Citation
|
|
|
137 |
|
138 |
@inproceedings{ushio-etal-2022-generative,
|
139 |
-
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration
|
140 |
author = "Ushio, Asahi and
|
141 |
-
Alva-Manchego, Fernando
|
142 |
Camacho-Collados, Jose",
|
143 |
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
144 |
month = dec,
|
@@ -147,3 +157,4 @@ The full configuration can be found at [fine-tuning config file](https://hugging
|
|
147 |
publisher = "Association for Computational Linguistics",
|
148 |
}
|
149 |
|
|
|
|
58 |
[lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
59 |
This model is fine-tuned on the answer extraction task as well as the question generation.
|
60 |
|
61 |
+
Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)).
|
62 |
|
63 |
```
|
64 |
|
65 |
@inproceedings{ushio-etal-2022-generative,
|
66 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
67 |
author = "Ushio, Asahi and
|
68 |
+
Alva-Manchego, Fernando and
|
69 |
Camacho-Collados, Jose",
|
70 |
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
71 |
month = dec,
|
|
|
82 |
- **Training data:** [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (default)
|
83 |
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
84 |
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
85 |
+
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
|
86 |
|
87 |
### Usage
|
88 |
+
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
89 |
```python
|
90 |
|
91 |
+
from lmqg import TransformersQG
|
92 |
+
# initialize model
|
93 |
+
model = TransformersQG(language='fr', model='lmqg/mt5-small-frquad-multitask')
|
94 |
+
# model prediction
|
95 |
+
question_answer = model.generate_qa("Créateur » (Maker), lui aussi au singulier, « le Suprême Berger » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.")
|
96 |
|
97 |
+
```
|
|
|
98 |
|
99 |
+
- With `transformers`
|
100 |
+
```python
|
101 |
|
102 |
+
from transformers import pipeline
|
103 |
+
# initialize model
|
104 |
+
pipe = pipeline("text2text-generation", 'lmqg/mt5-small-frquad-multitask')
|
105 |
+
# answer extraction
|
106 |
+
answer = pipe('extract answers: Pourtant, la strophe spensérienne, utilisée cinq fois avant que ne commence le chœur, constitue en soi un vecteur dont les répétitions structurelles, selon Ricks, relèvent du pur lyrisme tout en constituant une menace potentielle. Après les huit sages pentamètres iambiques, l'alexandrin final <hl> permet une pause <hl>, « véritable illusion d'optique » qu'accentuent les nombreuses expressions archaïsantes telles que did swoon, did seem, did go, did receive, did make, qui doublent le prétérit en un temps composé et paraissent à la fois « très précautionneuses et très peu pressées ».')
|
107 |
+
# question generation
|
108 |
question = pipe('generate question: Créateur » (Maker), lui aussi au singulier, « <hl> le Suprême Berger <hl> » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.')
|
109 |
|
110 |
```
|
|
|
143 |
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-frquad-multitask/raw/main/trainer_config.json).
|
144 |
|
145 |
## Citation
|
146 |
+
```
|
147 |
|
148 |
@inproceedings{ushio-etal-2022-generative,
|
149 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
150 |
author = "Ushio, Asahi and
|
151 |
+
Alva-Manchego, Fernando and
|
152 |
Camacho-Collados, Jose",
|
153 |
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
154 |
month = dec,
|
|
|
157 |
publisher = "Association for Computational Linguistics",
|
158 |
}
|
159 |
|
160 |
+
```
|