Model Card of lmqg/mt5-small-esquad-qg-ae
This model is fine-tuned version of google/mt5-small for question generation and answer extraction jointly on the lmqg/qg_esquad (dataset_name: default) via lmqg
.
Overview
- Language model: google/mt5-small
- Language: es
- Training data: lmqg/qg_esquad (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="es", model="lmqg/mt5-small-esquad-qg-ae")
# model prediction
question_answer_pairs = model.generate_qa("a noviembre , que es también la estación lluviosa.")
- With
transformers
from transformers import pipeline
pipe = pipeline("text2text-generation", "lmqg/mt5-small-esquad-qg-ae")
# answer extraction
answer = pipe("generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India.")
# question generation
question = 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.")
Evaluation
- Metric (Question Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
BERTScore | 83.39 | default | lmqg/qg_esquad |
Bleu_1 | 24.5 | default | lmqg/qg_esquad |
Bleu_2 | 16.48 | default | lmqg/qg_esquad |
Bleu_3 | 11.83 | default | lmqg/qg_esquad |
Bleu_4 | 8.79 | default | lmqg/qg_esquad |
METEOR | 21.66 | default | lmqg/qg_esquad |
MoverScore | 58.34 | default | lmqg/qg_esquad |
ROUGE_L | 23.13 | default | lmqg/qg_esquad |
- Metric (Question & Answer Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
QAAlignedF1Score (BERTScore) | 79.06 | default | lmqg/qg_esquad |
QAAlignedF1Score (MoverScore) | 54.49 | default | lmqg/qg_esquad |
QAAlignedPrecision (BERTScore) | 76.46 | default | lmqg/qg_esquad |
QAAlignedPrecision (MoverScore) | 52.96 | default | lmqg/qg_esquad |
QAAlignedRecall (BERTScore) | 81.94 | default | lmqg/qg_esquad |
QAAlignedRecall (MoverScore) | 56.21 | default | lmqg/qg_esquad |
- Metric (Answer Extraction): raw metric file
Score | Type | Dataset | |
---|---|---|---|
AnswerExactMatch | 57.63 | default | lmqg/qg_esquad |
AnswerF1Score | 75.31 | default | lmqg/qg_esquad |
BERTScore | 89.77 | default | lmqg/qg_esquad |
Bleu_1 | 35.18 | default | lmqg/qg_esquad |
Bleu_2 | 30.48 | default | lmqg/qg_esquad |
Bleu_3 | 26.92 | default | lmqg/qg_esquad |
Bleu_4 | 23.89 | default | lmqg/qg_esquad |
METEOR | 43.11 | default | lmqg/qg_esquad |
MoverScore | 80.64 | default | lmqg/qg_esquad |
ROUGE_L | 48.58 | default | lmqg/qg_esquad |
Training hyperparameters
The following hyperparameters were used during fine-tuning:
- dataset_path: lmqg/qg_esquad
- dataset_name: default
- input_types: ['paragraph_answer', 'paragraph_sentence']
- output_types: ['question', 'answer']
- prefix_types: ['qg', 'ae']
- model: google/mt5-small
- max_length: 512
- max_length_output: 32
- epoch: 5
- batch: 16
- lr: 0.001
- fp16: False
- random_seed: 1
- gradient_accumulation_steps: 4
- 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",
}