Model Card of lmqg/mbart-large-cc25-dequad-qg-ae
This model is fine-tuned version of facebook/mbart-large-cc25 for question generation and answer extraction jointly on the lmqg/qg_dequad (dataset_name: default) via lmqg
.
Overview
- Language model: facebook/mbart-large-cc25
- Language: de
- Training data: lmqg/qg_dequad (default)
- Online Demo: https://autoqg.net/
- Repository: https://github.com/asahi417/lm-question-generation
- Paper: https://arxiv.org/abs/2210.03992
Usage
- With
lmqg
from lmqg import TransformersQG
# initialize model
model = TransformersQG(language="de", model="lmqg/mbart-large-cc25-dequad-qg-ae")
# model prediction
question_answer_pairs = model.generate_qa("das erste weltweit errichtete Hermann Brehmer 1855 im niederschlesischen ''Görbersdorf'' (heute Sokołowsko, Polen).")
- With
transformers
from transformers import pipeline
pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-dequad-qg-ae")
# answer extraction
answer = pipe("generate question: Empfangs- und Sendeantenne sollen in ihrer Polarisation übereinstimmen, andernfalls <hl> wird die Signalübertragung stark gedämpft. <hl>")
# question generation
question = pipe("extract answers: Sommerzeit <hl> Frühling <hl>: Umstellung von Normalzeit auf Sommerzeit – die Uhr wird um eine Stunde ''vor''gestellt. Herbst: Umstellung von Sommerzeit auf Normalzeit – die Uhr wird um eine Stunde ''zurück''gestellt. Als Sommerzeit wird die gegenüber der Zonenzeit meist um eine Stunde vorgestellte Uhrzeit bezeichnet, die während eines bestimmten Zeitraums im Sommerhalbjahr (und oft auch etwas darüber hinaus) als gesetzliche Zeit dient. Eine solche Regelung wird fast nur in Ländern der gemäßigten Zonen angewandt. Die mitteleuropäische Sommerzeit beginnt am letzten Sonntag im März um 2:00 Uhr MEZ, indem die Stundenzählung um eine Stunde von 2:00 Uhr auf 3:00 Uhr vorgestellt wird. Sie endet jeweils am letzten Sonntag im Oktober um 3:00 Uhr MESZ, indem die Stundenzählung um eine Stunde von 3:00 Uhr auf 2:00 Uhr zurückgestellt wird.")
Evaluation
- Metric (Question Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
BERTScore | 80.57 | default | lmqg/qg_dequad |
Bleu_1 | 11.17 | default | lmqg/qg_dequad |
Bleu_2 | 4.71 | default | lmqg/qg_dequad |
Bleu_3 | 1.96 | default | lmqg/qg_dequad |
Bleu_4 | 0.78 | default | lmqg/qg_dequad |
METEOR | 15.43 | default | lmqg/qg_dequad |
MoverScore | 56.4 | default | lmqg/qg_dequad |
ROUGE_L | 12.36 | default | lmqg/qg_dequad |
- Metric (Question & Answer Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
QAAlignedF1Score (BERTScore) | 82.49 | default | lmqg/qg_dequad |
QAAlignedF1Score (MoverScore) | 54.84 | default | lmqg/qg_dequad |
QAAlignedPrecision (BERTScore) | 81.39 | default | lmqg/qg_dequad |
QAAlignedPrecision (MoverScore) | 54.58 | default | lmqg/qg_dequad |
QAAlignedRecall (BERTScore) | 83.67 | default | lmqg/qg_dequad |
QAAlignedRecall (MoverScore) | 55.13 | default | lmqg/qg_dequad |
- Metric (Answer Extraction): raw metric file
Score | Type | Dataset | |
---|---|---|---|
AnswerExactMatch | 22.69 | default | lmqg/qg_dequad |
AnswerF1Score | 48.09 | default | lmqg/qg_dequad |
BERTScore | 78.8 | default | lmqg/qg_dequad |
Bleu_1 | 21.99 | default | lmqg/qg_dequad |
Bleu_2 | 14.92 | default | lmqg/qg_dequad |
Bleu_3 | 10.06 | default | lmqg/qg_dequad |
Bleu_4 | 6.86 | default | lmqg/qg_dequad |
METEOR | 25.56 | default | lmqg/qg_dequad |
MoverScore | 63.5 | default | lmqg/qg_dequad |
ROUGE_L | 20.84 | default | lmqg/qg_dequad |
Training hyperparameters
The following hyperparameters were used during fine-tuning:
- dataset_path: lmqg/qg_dequad
- 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: 11
- 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.
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",
}
- Downloads last month
- 2
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Dataset used to train research-backup/mbart-large-cc25-dequad-qg-ae
Evaluation results
- BLEU4 (Question Generation) on lmqg/qg_dequadself-reported0.780
- ROUGE-L (Question Generation) on lmqg/qg_dequadself-reported12.360
- METEOR (Question Generation) on lmqg/qg_dequadself-reported15.430
- BERTScore (Question Generation) on lmqg/qg_dequadself-reported80.570
- MoverScore (Question Generation) on lmqg/qg_dequadself-reported56.400
- QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_dequadself-reported82.490
- QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_dequadself-reported83.670
- QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_dequadself-reported81.390
- QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_dequadself-reported54.840
- QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_dequadself-reported55.130