Model Card of lmqg/mt5-base-koquad-qg-ae
This model is fine-tuned version of google/mt5-base for question generation and answer extraction jointly on the lmqg/qg_koquad (dataset_name: default) via lmqg
.
Overview
- Language model: google/mt5-base
- Language: ko
- Training data: lmqg/qg_koquad (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="ko", model="lmqg/mt5-base-koquad-qg-ae")
# model prediction
question_answer_pairs = model.generate_qa("1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
- With
transformers
from transformers import pipeline
pipe = pipeline("text2text-generation", "lmqg/mt5-base-koquad-qg-ae")
# answer extraction
answer = pipe("generate question: 1990년 영화 《 <hl> 남부군 <hl> 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
# question generation
question = pipe("extract answers: 또한 스피어스는 많은 새로운 여성 아티스트들에게 영향을 끼쳤는데, 대표적으로 데미 로바토, 케이티 페리, 크리스티니아 드바지, 레이디 가가, 리틀 부츠, 셀레나 고메즈 & 더씬, 픽시 로트 이 있다. 2007년 비욘세 놀스는 Total Request Live와의 인터뷰에서 '나는 브리트니를 사랑하고 팬이에요. 특히 새 앨범 Blackout을 좋아해요'라고 말했다. 린제이 로한은 '언제나 브리트니 스피어스에게 영감을 받는다. 학창시절 그녀처럼 타블로이드에 오르기를 꿈꿔왔다'고 말하며 롤 모델로 꼽았다. 스피어스는 현대 음악가들에게 음악적 영감으로 언급되기도 했다. <hl> 마일리 사이러스는 자신의 히트곡 Party in the U.S.A. 가 브리트니에게 영감과 영향을 받은 곡이라고 밝혔다. <hl> 베리 매닐로우의 앨범 15 Minutes 역시 브리트니에게 영감을 얻었다고 언급되었다.")
Evaluation
- Metric (Question Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
BERTScore | 84.19 | default | lmqg/qg_koquad |
Bleu_1 | 27.97 | default | lmqg/qg_koquad |
Bleu_2 | 20.84 | default | lmqg/qg_koquad |
Bleu_3 | 15.88 | default | lmqg/qg_koquad |
Bleu_4 | 12.22 | default | lmqg/qg_koquad |
METEOR | 29.86 | default | lmqg/qg_koquad |
MoverScore | 83.24 | default | lmqg/qg_koquad |
ROUGE_L | 28.55 | default | lmqg/qg_koquad |
- Metric (Question & Answer Generation): raw metric file
Score | Type | Dataset | |
---|---|---|---|
QAAlignedF1Score (BERTScore) | 80.28 | default | lmqg/qg_koquad |
QAAlignedF1Score (MoverScore) | 81.97 | default | lmqg/qg_koquad |
QAAlignedPrecision (BERTScore) | 77.03 | default | lmqg/qg_koquad |
QAAlignedPrecision (MoverScore) | 78.1 | default | lmqg/qg_koquad |
QAAlignedRecall (BERTScore) | 83.91 | default | lmqg/qg_koquad |
QAAlignedRecall (MoverScore) | 86.43 | default | lmqg/qg_koquad |
- Metric (Answer Extraction): raw metric file
Score | Type | Dataset | |
---|---|---|---|
AnswerExactMatch | 83.02 | default | lmqg/qg_koquad |
AnswerF1Score | 88.43 | default | lmqg/qg_koquad |
BERTScore | 96.14 | default | lmqg/qg_koquad |
Bleu_1 | 74.93 | default | lmqg/qg_koquad |
Bleu_2 | 65.39 | default | lmqg/qg_koquad |
Bleu_3 | 51.39 | default | lmqg/qg_koquad |
Bleu_4 | 34.98 | default | lmqg/qg_koquad |
METEOR | 61.26 | default | lmqg/qg_koquad |
MoverScore | 95.2 | default | lmqg/qg_koquad |
ROUGE_L | 83.83 | default | lmqg/qg_koquad |
Training hyperparameters
The following hyperparameters were used during fine-tuning:
- dataset_path: lmqg/qg_koquad
- dataset_name: default
- input_types: ['paragraph_answer', 'paragraph_sentence']
- output_types: ['question', 'answer']
- prefix_types: ['qg', 'ae']
- model: google/mt5-base
- max_length: 512
- max_length_output: 32
- epoch: 14
- 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.
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
- 7
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 lmqg/mt5-base-koquad-qg-ae
Evaluation results
- BLEU4 (Question Generation) on lmqg/qg_koquadself-reported12.220
- ROUGE-L (Question Generation) on lmqg/qg_koquadself-reported28.550
- METEOR (Question Generation) on lmqg/qg_koquadself-reported29.860
- BERTScore (Question Generation) on lmqg/qg_koquadself-reported84.190
- MoverScore (Question Generation) on lmqg/qg_koquadself-reported83.240
- QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquadself-reported80.280
- QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquadself-reported83.910
- QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquadself-reported77.030
- QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquadself-reported81.970
- QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquadself-reported86.430