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_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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: <hl> Dopo il 1971 <hl> , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.')
|
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-itquad-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_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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='it', model='lmqg/mt5-small-itquad-multitask')
|
94 |
+
# model prediction
|
95 |
+
question_answer = model.generate_qa("Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.")
|
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-itquad-multitask')
|
105 |
+
# answer extraction
|
106 |
+
answer = pipe('extract answers: <hl> Il 6 ottobre 1973 , la Siria e l' Egitto, con il sostegno di altre nazioni arabe, lanciarono un attacco a sorpresa su Israele, su Yom Kippur. <hl> Questo rinnovo delle ostilità nel conflitto arabo-israeliano ha liberato la pressione economica sottostante sui prezzi del petrolio. All' epoca, l' Iran era il secondo esportatore mondiale di petrolio e un vicino alleato degli Stati Uniti. Settimane più tardi, lo scià d' Iran ha detto in un' intervista: Naturalmente[il prezzo del petrolio] sta andando a salire Certamente! E come! Avete[Paesi occidentali] aumentato il prezzo del grano che ci vendete del 300 per cento, e lo stesso per zucchero e cemento.')
|
107 |
+
# question generation
|
108 |
question = pipe('generate question: <hl> Dopo il 1971 <hl> , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.')
|
109 |
|
110 |
```
|
|
|
143 |
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-itquad-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 |
+
```
|