|
|
|
--- |
|
license: cc-by-4.0 |
|
metrics: |
|
- bleu4 |
|
- meteor |
|
- rouge-l |
|
- bertscore |
|
- moverscore |
|
language: en |
|
datasets: |
|
- lmqg/qg_squad |
|
pipeline_tag: text2text-generation |
|
tags: |
|
- question generation |
|
widget: |
|
- text: "<hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records." |
|
example_title: "Question Generation Example 1" |
|
- text: "Beyonce further expanded her acting career, starring as blues singer <hl> Etta James <hl> in the 2008 musical biopic, Cadillac Records." |
|
example_title: "Question Generation Example 2" |
|
- text: "Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, <hl> Cadillac Records <hl> ." |
|
example_title: "Question Generation Example 3" |
|
model-index: |
|
- name: lmqg/mt5-small-squad-qg |
|
results: |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_squad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 21.65 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 48.95 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 23.83 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 90.01 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 62.75 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_dequad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 9.242783121165897e-12 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.01556150764938016 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.04809700451843158 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.7353078946893743 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.5036973829954939 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_esquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 0.0059191752064594125 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.05208940592236566 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.06021086135293597 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.7494422899749911 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.5062373132800192 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_frquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 0.0171464639522496 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.1583673053928925 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.08244973027319356 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.7291012183458674 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.509610854598101 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_itquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 0.005438910607183992 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.05010570221421983 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.05890828426558759 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.7260160158030385 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.5023119088393686 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_jaquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 4.4114578660129224e-08 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.06084267343290677 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.005149267426183168 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.6608093198082075 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.46526108687696893 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_koquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 1.4750917137316939e-12 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.0006466767450454226 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.007310046912436679 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.6634288882769679 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.4586124640357038 |
|
- task: |
|
name: Text2text Generation |
|
type: text2text-generation |
|
dataset: |
|
name: lmqg/qg_ruquad |
|
type: default |
|
args: default |
|
metrics: |
|
- name: BLEU4 (Question Generation) |
|
type: bleu4_question_generation |
|
value: 4.229109829516021e-12 |
|
- name: ROUGE-L (Question Generation) |
|
type: rouge_l_question_generation |
|
value: 0.009881091250723615 |
|
- name: METEOR (Question Generation) |
|
type: meteor_question_generation |
|
value: 0.017796529053904556 |
|
- name: BERTScore (Question Generation) |
|
type: bertscore_question_generation |
|
value: 0.7089446693028568 |
|
- name: MoverScore (Question Generation) |
|
type: moverscore_question_generation |
|
value: 0.49098728551715626 |
|
--- |
|
|
|
# Model Card of `lmqg/mt5-small-squad-qg` |
|
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation task on the [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation). |
|
|
|
|
|
### Overview |
|
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small) |
|
- **Language:** en |
|
- **Training data:** [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (default) |
|
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/) |
|
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation) |
|
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992) |
|
|
|
### Usage |
|
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-) |
|
```python |
|
from lmqg import TransformersQG |
|
|
|
# initialize model |
|
model = TransformersQG(language="en", model="lmqg/mt5-small-squad-qg") |
|
|
|
# model prediction |
|
questions = model.generate_q(list_context="William Turner was an English painter who specialised in watercolour landscapes", list_answer="William Turner") |
|
|
|
``` |
|
|
|
- With `transformers` |
|
```python |
|
from transformers import pipeline |
|
|
|
pipe = pipeline("text2text-generation", "lmqg/mt5-small-squad-qg") |
|
output = pipe("<hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.") |
|
|
|
``` |
|
|
|
## Evaluation |
|
|
|
|
|
- ***Metric (Question Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_squad.default.json) |
|
|
|
| | Score | Type | Dataset | |
|
|:-----------|--------:|:--------|:---------------------------------------------------------------| |
|
| BERTScore | 90.01 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| Bleu_1 | 54.07 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| Bleu_2 | 37.62 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| Bleu_3 | 28.18 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| Bleu_4 | 21.65 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| METEOR | 23.83 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| MoverScore | 62.75 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
| ROUGE_L | 48.95 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | |
|
|
|
|
|
- ***Metrics (Question Generation, Out-of-Domain)*** |
|
|
|
| Dataset | Type | BERTScore| Bleu_4 | METEOR | MoverScore | ROUGE_L | Link | |
|
|:--------|:-----|---------:|-------:|-------:|-----------:|--------:|-----:| |
|
| [lmqg/qg_dequad](https://huggingface.co/datasets/lmqg/qg_dequad) | default | 73.53 | 0.0 | 4.81 | 50.37 | 1.56 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json) | |
|
| [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) | default | 74.94 | 0.59 | 6.02 | 50.62 | 5.21 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json) | |
|
| [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) | default | 72.91 | 1.71 | 8.24 | 50.96 | 15.84 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json) | |
|
| [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) | default | 72.6 | 0.54 | 5.89 | 50.23 | 5.01 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json) | |
|
| [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) | default | 66.08 | 0.0 | 0.51 | 46.53 | 6.08 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_jaquad.default.json) | |
|
| [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) | default | 66.34 | 0.0 | 0.73 | 45.86 | 0.06 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json) | |
|
| [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) | default | 70.89 | 0.0 | 1.78 | 49.1 | 0.99 | [link](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_ruquad.default.json) | |
|
|
|
|
|
## Training hyperparameters |
|
|
|
The following hyperparameters were used during fine-tuning: |
|
- dataset_path: lmqg/qg_squad |
|
- dataset_name: default |
|
- input_types: ['paragraph_answer'] |
|
- output_types: ['question'] |
|
- prefix_types: None |
|
- model: google/mt5-small |
|
- max_length: 512 |
|
- max_length_output: 32 |
|
- epoch: 15 |
|
- batch: 64 |
|
- lr: 0.0005 |
|
- fp16: False |
|
- random_seed: 1 |
|
- gradient_accumulation_steps: 1 |
|
- label_smoothing: 0.15 |
|
|
|
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-squad-qg/raw/main/trainer_config.json). |
|
|
|
## Citation |
|
``` |
|
@inproceedings{ushio-etal-2022-generative, |
|
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration", |
|
author = "Ushio, Asahi and |
|
Alva-Manchego, Fernando and |
|
Camacho-Collados, Jose", |
|
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing", |
|
month = dec, |
|
year = "2022", |
|
address = "Abu Dhabi, U.A.E.", |
|
publisher = "Association for Computational Linguistics", |
|
} |
|
|
|
``` |
|
|