Edit model card

Model Card of lmqg/mt5-small-koquad-qg-ae

This model is fine-tuned version of google/mt5-small for question generation and answer extraction jointly on the lmqg/qg_koquad (dataset_name: default) via lmqg.

Overview

Usage

from lmqg import TransformersQG

# initialize model
model = TransformersQG(language="ko", model="lmqg/mt5-small-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-small-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

Score Type Dataset
BERTScore 83.4 default lmqg/qg_koquad
Bleu_1 25.91 default lmqg/qg_koquad
Bleu_2 19.09 default lmqg/qg_koquad
Bleu_3 14.37 default lmqg/qg_koquad
Bleu_4 10.91 default lmqg/qg_koquad
METEOR 27.52 default lmqg/qg_koquad
MoverScore 82.54 default lmqg/qg_koquad
ROUGE_L 25.83 default lmqg/qg_koquad
Score Type Dataset
QAAlignedF1Score (BERTScore) 80.36 default lmqg/qg_koquad
QAAlignedF1Score (MoverScore) 82.55 default lmqg/qg_koquad
QAAlignedPrecision (BERTScore) 77.34 default lmqg/qg_koquad
QAAlignedPrecision (MoverScore) 78.93 default lmqg/qg_koquad
QAAlignedRecall (BERTScore) 83.72 default lmqg/qg_koquad
QAAlignedRecall (MoverScore) 86.69 default lmqg/qg_koquad
Score Type Dataset
AnswerExactMatch 80.78 default lmqg/qg_koquad
AnswerF1Score 86.98 default lmqg/qg_koquad
BERTScore 95.65 default lmqg/qg_koquad
Bleu_1 75.14 default lmqg/qg_koquad
Bleu_2 66.16 default lmqg/qg_koquad
Bleu_3 53.61 default lmqg/qg_koquad
Bleu_4 38.2 default lmqg/qg_koquad
METEOR 59.91 default lmqg/qg_koquad
MoverScore 94.61 default lmqg/qg_koquad
ROUGE_L 82.32 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-small
  • max_length: 512
  • max_length_output: 32
  • epoch: 6
  • 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
29
Inference Examples
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-small-koquad-qg-ae

Evaluation results

  • BLEU4 (Question Generation) on lmqg/qg_koquad
    self-reported
    10.910
  • ROUGE-L (Question Generation) on lmqg/qg_koquad
    self-reported
    25.830
  • METEOR (Question Generation) on lmqg/qg_koquad
    self-reported
    27.520
  • BERTScore (Question Generation) on lmqg/qg_koquad
    self-reported
    83.400
  • MoverScore (Question Generation) on lmqg/qg_koquad
    self-reported
    82.540
  • QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    80.360
  • QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    83.720
  • QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    77.340
  • QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    82.550
  • QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    86.690