
# Model Card of `lmqg/mbart-large-cc25-frquad-qg-ae`
This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25) for question generation and answer extraction jointly on the [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (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:** fr  
- **Training data:** [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (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="fr", model="lmqg/mbart-large-cc25-frquad-qg-ae")

# model prediction
question_answer_pairs = 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.")

```

- With `transformers`
```python
from transformers import pipeline

pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-frquad-qg-ae")

# answer extraction
answer = 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.")

# question generation
question = 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 ».")

```

## Evaluation


- ***Metric (Question Generation)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qg-ae/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json) 

|            |   Score | Type    | Dataset                                                          |
|:-----------|--------:|:--------|:-----------------------------------------------------------------|
| BERTScore  |   72.56 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_1     |   16.16 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_2     |    4.88 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_3     |    1.85 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_4     |    0.91 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| METEOR     |    8.56 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| MoverScore |   50.46 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| ROUGE_L    |   18.54 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |


- ***Metric (Question & Answer Generation)***:  [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qg-ae/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qg_frquad.default.json)

|                                 |   Score | Type    | Dataset                                                          |
|:--------------------------------|--------:|:--------|:-----------------------------------------------------------------|
| QAAlignedF1Score (BERTScore)    |   77.72 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| QAAlignedF1Score (MoverScore)   |   51.65 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| QAAlignedPrecision (BERTScore)  |   76.9  | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| QAAlignedPrecision (MoverScore) |   51.15 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| QAAlignedRecall (BERTScore)     |   78.58 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| QAAlignedRecall (MoverScore)    |   52.16 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |


- ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qg-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_frquad.default.json)

|                  |   Score | Type    | Dataset                                                          |
|:-----------------|--------:|:--------|:-----------------------------------------------------------------|
| AnswerExactMatch |    0    | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| AnswerF1Score    |    3.66 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| BERTScore        |   58.41 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_1           |    2.56 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_2           |    0.76 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_3           |    0    | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| Bleu_4           |    0    | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| METEOR           |    3.24 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| MoverScore       |   45.72 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |
| ROUGE_L          |    3.48 | default | [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) |



## Training hyperparameters

The following hyperparameters were used during fine-tuning:
 - dataset_path: lmqg/qg_frquad
 - dataset_name: default
 - input_types: ['paragraph_answer', 'paragraph_sentence']
 - output_types: ['question', 'answer']
 - prefix_types: ['qg', 'ae']
 - model: facebook/mbart-large-cc25
 - max_length: 512
 - max_length_output: 32
 - epoch: 5
 - batch: 2
 - lr: 0.0001
 - fp16: False
 - random_seed: 1
 - gradient_accumulation_steps: 32
 - label_smoothing: 0.15

The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-frquad-qg-ae/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": "fr", "license": "cc-by-4.0", "tags": ["question generation", "answer extraction"], "datasets": ["lmqg/qg_frquad"], "metrics": ["bleu4", "meteor", "rouge-l", "bertscore", "moverscore"], "pipeline_tag": "text2text-generation", "widget": [{"text": "generate question: Cr\u00e9ateur \u00bb (Maker), lui aussi au singulier, \u00ab <hl> le Supr\u00eame Berger <hl> \u00bb (The Great Shepherd) ; de l'autre, des r\u00e9miniscences de la th\u00e9ologie de l'Antiquit\u00e9 : le tonnerre, voix de Jupiter, \u00ab Et souvent ta voix gronde en un tonnerre terrifiant \u00bb, etc.", "example_title": "Question Generation Example 1"}, {"text": "generate question: Ce black dog peut \u00eatre li\u00e9 \u00e0 des \u00e9v\u00e8nements traumatisants issus du monde ext\u00e9rieur, tels que son renvoi de l'Amiraut\u00e9 apr\u00e8s la catastrophe des Dardanelles, lors de la <hl> Grande Guerre <hl> de 14-18, ou son rejet par l'\u00e9lectorat en juillet 1945.", "example_title": "Question Generation Example 2"}, {"text": "generate question: contre <hl> Normie Smith <hl> et 15 000 dollars le 28 novembre 1938.", "example_title": "Question Generation Example 3"}, {"text": "extract answers: Pourtant, la strophe spens\u00e9rienne, utilis\u00e9e cinq fois avant que ne commence le ch\u0153ur, constitue en soi un vecteur dont les r\u00e9p\u00e9titions structurelles, selon Ricks, rel\u00e8vent du pur lyrisme tout en constituant une menace potentielle. Apr\u00e8s les huit sages pentam\u00e8tres iambiques, l'alexandrin final <hl> permet une pause <hl>, \u00ab v\u00e9ritable illusion d'optique \u00bb qu'accentuent les nombreuses expressions archa\u00efsantes telles que did swoon, did seem, did go, did receive, did make, qui doublent le pr\u00e9t\u00e9rit en un temps compos\u00e9 et paraissent \u00e0 la fois \u00ab tr\u00e8s pr\u00e9cautionneuses et tr\u00e8s peu press\u00e9es \u00bb.", "example_title": "Answer Extraction Example 1"}, {"text": "extract answers: N\u00e9anmoins, une fois encore, l'arithm\u00e9tique modulaire est insuffisante pour venir \u00e0 bout du th\u00e9or\u00e8me. Dirichlet utilise de nombreuses techniques analytiques, comme les s\u00e9ries enti\u00e8res et l'analyse complexe. Le fruit de ces travaux donne naissance \u00e0 une nouvelle branche des math\u00e9matiques : la th\u00e9orie analytique des nombres. L'un des points cruciaux de cette th\u00e9orie provient de l'unique article de <hl> Bernhard Riemann <hl> en th\u00e9orie des nombres : Sur le nombre de nombres premiers inf\u00e9rieurs \u00e0 une taille donn\u00e9e. Il conjecture une localisation des racines de sa fonction \u03b6. La recherche de la position des racines, initi\u00e9e par Dirichlet, devient une pr\u00e9occupation centrale et reste l'une des conjectures pressenties comme les plus difficiles des math\u00e9matiques de notre \u00e9poque.", "example_title": "Answer Extraction Example 2"}], "model-index": [{"name": "lmqg/mbart-large-cc25-frquad-qg-ae", "results": [{"task": {"type": "text2text-generation", "name": "Text2text Generation"}, "dataset": {"name": "lmqg/qg_frquad", "type": "default", "args": "default"}, "metrics": [{"type": "bleu4_question_generation", "value": 0.91, "name": "BLEU4 (Question Generation)"}, {"type": "rouge_l_question_generation", "value": 18.54, "name": "ROUGE-L (Question Generation)"}, {"type": "meteor_question_generation", "value": 8.56, "name": "METEOR (Question Generation)"}, {"type": "bertscore_question_generation", "value": 72.56, "name": "BERTScore (Question Generation)"}, {"type": "moverscore_question_generation", "value": 50.46, "name": "MoverScore (Question Generation)"}, {"type": "qa_aligned_f1_score_bertscore_question_answer_generation_with_gold_answer", "value": 77.72, "name": "QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer))"}, {"type": "qa_aligned_recall_bertscore_question_answer_generation_with_gold_answer", "value": 78.58, "name": "QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer))"}, {"type": "qa_aligned_precision_bertscore_question_answer_generation_with_gold_answer", "value": 76.9, "name": "QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer))"}, {"type": "qa_aligned_f1_score_moverscore_question_answer_generation_with_gold_answer", "value": 51.65, "name": "QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer))"}, {"type": "qa_aligned_recall_moverscore_question_answer_generation_with_gold_answer", "value": 52.16, "name": "QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer))"}, {"type": "qa_aligned_precision_moverscore_question_answer_generation_with_gold_answer", "value": 51.15, "name": "QAAlignedPrecision-MoverScore (Question & Answer Generation (with Gold Answer))"}, {"type": "bleu4_answer_extraction", "value": 0.0, "name": "BLEU4 (Answer Extraction)"}, {"type": "rouge_l_answer_extraction", "value": 3.48, "name": "ROUGE-L (Answer Extraction)"}, {"type": "meteor_answer_extraction", "value": 3.24, "name": "METEOR (Answer Extraction)"}, {"type": "bertscore_answer_extraction", "value": 58.41, "name": "BERTScore (Answer Extraction)"}, {"type": "moverscore_answer_extraction", "value": 45.72, "name": "MoverScore (Answer Extraction)"}, {"type": "answer_f1_score__answer_extraction", "value": 3.66, "name": "AnswerF1Score (Answer Extraction)"}, {"type": "answer_exact_match_answer_extraction", "value": 0.0, "name": "AnswerExactMatch (Answer Extraction)"}]}]}]}
transformers pytorch mbart text2text-generation question generation answer extraction fr dataset:lmqg/qg_frquad arxiv:2210.03992 license:cc-by-4.0 model-index autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #mbart #text2text-generation #question generation #answer extraction #fr #dataset-lmqg/qg_frquad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #region-us 

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


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


### Overview


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


### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


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



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



* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_frquad
* dataset\_name: default
* input\_types: ['paragraph\_answer', 'paragraph\_sentence']
* output\_types: ['question', 'answer']
* prefix\_types: ['qg', 'ae']
* model: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 2
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 32
* label\_smoothing: 0.15


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



### Overview


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


* With 'lmqg'
* With 'transformers'


Evaluation
----------


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



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



* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_frquad
* dataset\_name: default
* input\_types: ['paragraph\_answer', 'paragraph\_sentence']
* output\_types: ['question', 'answer']
* prefix\_types: ['qg', 'ae']
* model: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 2
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 32
* label\_smoothing: 0.15


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


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


* With 'lmqg'
* With 'transformers'


Evaluation
----------


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



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



* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_frquad
* dataset\_name: default
* input\_types: ['paragraph\_answer', 'paragraph\_sentence']
* output\_types: ['question', 'answer']
* prefix\_types: ['qg', 'ae']
* model: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 2
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 32
* label\_smoothing: 0.15


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


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


* With 'lmqg'
* With 'transformers'


Evaluation
----------


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



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



* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_frquad
* dataset\_name: default
* input\_types: ['paragraph\_answer', 'paragraph\_sentence']
* output\_types: ['question', 'answer']
* prefix\_types: ['qg', 'ae']
* model: facebook/mbart-large-cc25
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 2
* lr: 0.0001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 32
* label\_smoothing: 0.15


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