YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
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",
}
- Downloads last month
- 19
Dataset used to train lmqg/mt5-small-esquad-qg-ae
Paper for lmqg/mt5-small-esquad-qg-ae
Evaluation results
- BLEU4 (Question Generation) on lmqg/qg_esquadself-reported8.790
- ROUGE-L (Question Generation) on lmqg/qg_esquadself-reported23.130
- METEOR (Question Generation) on lmqg/qg_esquadself-reported21.660
- BERTScore (Question Generation) on lmqg/qg_esquadself-reported83.390
- MoverScore (Question Generation) on lmqg/qg_esquadself-reported58.340
- QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported79.060
- QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported81.940
- QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported76.460
- QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported54.490
- QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported56.210
- QAAlignedPrecision-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_esquadself-reported52.960
- BLEU4 (Answer Extraction) on lmqg/qg_esquadself-reported23.890
- ROUGE-L (Answer Extraction) on lmqg/qg_esquadself-reported48.580
- METEOR (Answer Extraction) on lmqg/qg_esquadself-reported43.110
- BERTScore (Answer Extraction) on lmqg/qg_esquadself-reported89.770
- MoverScore (Answer Extraction) on lmqg/qg_esquadself-reported80.640
- AnswerF1Score (Answer Extraction) on lmqg/qg_esquadself-reported75.310
- AnswerExactMatch (Answer Extraction) on lmqg/qg_esquadself-reported57.630