
# Model Card of `lmqg/mbart-large-cc25-squad-qg`
This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25) 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:** [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25)   
- **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/mbart-large-cc25-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/mbart-large-cc25-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/mbart-large-cc25-squad-qg/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_squad.default.json) 

|            |   Score | Type    | Dataset                                                        |
|:-----------|--------:|:--------|:---------------------------------------------------------------|
| BERTScore  |   90.36 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| Bleu_1     |   56    | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| Bleu_2     |   39.41 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| Bleu_3     |   29.76 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| Bleu_4     |   23.03 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| METEOR     |   25.1  | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| MoverScore |   63.63 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
| ROUGE_L    |   50.58 | 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 | 11.05 | 0.0 | 1.05 | 44.94 | 3.4 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 60.73 | 0.57 | 5.27 | 48.76 | 18.99 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 16.47 | 0.02 | 1.55 | 45.35 | 5.13 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 41.46 | 0.48 | 3.84 | 47.28 | 13.25 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 19.89 | 0.06 | 1.74 | 45.51 | 6.11 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 31.67 | 0.38 | 3.06 | 46.59 | 10.34 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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 | 26.19 | 0.18 | 2.65 | 46.09 | 8.34 | [link](https://huggingface.co/lmqg/mbart-large-cc25-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: facebook/mbart-large-cc25
 - max_length: 512
 - max_length_output: 32
 - epoch: 6
 - batch: 32
 - lr: 0.0001
 - fp16: False
 - random_seed: 1
 - gradient_accumulation_steps: 2
 - label_smoothing: 0.15

The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-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",
}

```

{"language": "en", "license": "cc-by-4.0", "tags": ["question generation"], "datasets": ["lmqg/qg_squad"], "metrics": ["bleu4", "meteor", "rouge-l", "bertscore", "moverscore"], "pipeline_tag": "text2text-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/mbart-large-cc25-squad-qg", "results": [{"task": {"type": "text2text-generation", "name": "Text2text Generation"}, "dataset": {"name": "lmqg/qg_squad", "type": "default", "args": "default"}, "metrics": [{"type": "bleu4_question_generation", "value": 23.03, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 50.58, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 25.1, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 90.36, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 63.63, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 2.686340570600837e-05, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.03397475521530369, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.010515978067774446, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.11048383666712049, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.4493941232405224, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.005672252689793584, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.18992334199223262, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.05274950957467417, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.6073013716122506, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.48757358546040164, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.0001821224460799727, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.05125339570346254, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.01548956770801962, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.16469104031590331, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.4534570385273521, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.004844552822264277, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.13250186541527176, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.038353222799754755, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.4146486141562677, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.4728445477676274, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.000580985079476975, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.061105498685431664, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.017356502187049656, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.19885869893641336, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.45511280605512316, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.003844937568699274, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.10340875861662978, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.03055807556243841, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.31670614955157167, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.46585276167011397, "name": "MoverScore (Question Generation)"}, {"type": "bleu4_question_generation", "value": 0.001762940746250354, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 0.08335362618538794, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 0.02646938356016298, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 0.2618582114102392, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 0.46086294883961854, "name": "MoverScore (Question Generation)"}]}]}]}
transformers pytorch mbart text2text-generation question generation en dataset:lmqg/qg_squad arxiv:2210.03992 license:cc-by-4.0 model-index autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #mbart #text2text-generation #question generation #en #dataset-lmqg/qg_squad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #region-us 

Model Card of 'lmqg/mbart-large-cc25-squad-qg'
==============================================


This model is fine-tuned version of facebook/mbart-large-cc25 for question generation task on the lmqg/qg\_squad (dataset\_name: default) via 'lmqg'.


### Overview


* Language model: facebook/mbart-large-cc25
* Language: en
* Training data: lmqg/qg\_squad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL


### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Question Generation)*: raw metric file



* *Metrics (Question Generation, Out-of-Domain)*



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: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 6
* batch: 32
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 2
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.



### Overview


* Language model: facebook/mbart-large-cc25
* Language: en
* Training data: lmqg/qg\_squad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL ### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Question Generation)*: raw metric file



* *Metrics (Question Generation, Out-of-Domain)*



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: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 6
* batch: 32
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 2
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.
TAGS
#transformers #pytorch #mbart #text2text-generation #question generation #en #dataset-lmqg/qg_squad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #region-us 
 ### Overview


* Language model: facebook/mbart-large-cc25
* Language: en
* Training data: lmqg/qg\_squad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL ### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Question Generation)*: raw metric file



* *Metrics (Question Generation, Out-of-Domain)*



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: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 6
* batch: 32
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 2
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.
passage: TAGS
#transformers #pytorch #mbart #text2text-generation #question generation #en #dataset-lmqg/qg_squad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #region-us 
### Overview


* Language model: facebook/mbart-large-cc25
* Language: en
* Training data: lmqg/qg\_squad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Question Generation)*: raw metric file



* *Metrics (Question Generation, Out-of-Domain)*



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: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 6
* batch: 32
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 2
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.