asahi417 commited on
Commit
2a94a68
1 Parent(s): 2ceb778

model update

Browse files
Files changed (1) hide show
  1. README.md +23 -12
README.md CHANGED
@@ -58,14 +58,14 @@ This model is fine-tuned version of [google/mt5-small](https://huggingface.co/go
58
  [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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 ([TBA](TBA)).
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: {A} {U}nified {B}enchmark and {E}valuation",
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,20 +82,29 @@ Please cite our paper if you use the model ([TBA](TBA)).
82
  - **Training data:** [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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:** [TBA](TBA)
86
 
87
  ### Usage
 
88
  ```python
89
 
90
- from transformers import pipeline
 
 
 
 
91
 
92
- model_path = 'lmqg/mt5-small-esquad-multitask'
93
- pipe = pipeline("text2text-generation", model_path)
94
 
95
- # Answer Extraction
96
- answer = 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.')
97
 
98
- # Question Generation
 
 
 
 
 
99
  question = pipe('generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India.')
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-esquad-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: {A} {U}nified {B}enchmark and {E}valuation",
140
  author = "Ushio, Asahi and
141
- Alva-Manchego, Fernando and
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_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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='es', model='lmqg/mt5-small-esquad-multitask')
94
+ # model prediction
95
+ question_answer = model.generate_qa("a noviembre , que es también la estación lluviosa.")
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-esquad-multitask')
105
+ # answer extraction
106
+ answer = 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.')
107
+ # question generation
108
  question = pipe('generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India.')
109
 
110
  ```
 
143
  The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-esquad-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
+ ```