Edit model card

Model Card of lmqg/mbart-large-cc25-koquad-qg-ae

This model is fine-tuned version of facebook/mbart-large-cc25 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/mbart-large-cc25-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/mbart-large-cc25-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.52 default lmqg/qg_koquad
Bleu_1 26.03 default lmqg/qg_koquad
Bleu_2 18.93 default lmqg/qg_koquad
Bleu_3 14.14 default lmqg/qg_koquad
Bleu_4 10.7 default lmqg/qg_koquad
METEOR 29.73 default lmqg/qg_koquad
MoverScore 82.79 default lmqg/qg_koquad
ROUGE_L 27.02 default lmqg/qg_koquad
Score Type Dataset
QAAlignedF1Score (BERTScore) 80.81 default lmqg/qg_koquad
QAAlignedF1Score (MoverScore) 83.42 default lmqg/qg_koquad
QAAlignedPrecision (BERTScore) 77.64 default lmqg/qg_koquad
QAAlignedPrecision (MoverScore) 79.08 default lmqg/qg_koquad
QAAlignedRecall (BERTScore) 84.32 default lmqg/qg_koquad
QAAlignedRecall (MoverScore) 88.44 default lmqg/qg_koquad
Score Type Dataset
AnswerExactMatch 82.17 default lmqg/qg_koquad
AnswerF1Score 88.2 default lmqg/qg_koquad
BERTScore 95.53 default lmqg/qg_koquad
Bleu_1 68.81 default lmqg/qg_koquad
Bleu_2 56.84 default lmqg/qg_koquad
Bleu_3 40.49 default lmqg/qg_koquad
Bleu_4 24.34 default lmqg/qg_koquad
METEOR 59.82 default lmqg/qg_koquad
MoverScore 94.69 default lmqg/qg_koquad
ROUGE_L 82.78 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: facebook/mbart-large-cc25
  • max_length: 512
  • max_length_output: 32
  • epoch: 6
  • 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
7
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 research-backup/mbart-large-cc25-koquad-qg-ae

Evaluation results

  • BLEU4 (Question Generation) on lmqg/qg_koquad
    self-reported
    10.700
  • ROUGE-L (Question Generation) on lmqg/qg_koquad
    self-reported
    27.020
  • METEOR (Question Generation) on lmqg/qg_koquad
    self-reported
    29.730
  • BERTScore (Question Generation) on lmqg/qg_koquad
    self-reported
    83.520
  • MoverScore (Question Generation) on lmqg/qg_koquad
    self-reported
    82.790
  • QAAlignedF1Score-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    80.810
  • QAAlignedRecall-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    84.320
  • QAAlignedPrecision-BERTScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    77.640
  • QAAlignedF1Score-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    83.420
  • QAAlignedRecall-MoverScore (Question & Answer Generation (with Gold Answer)) on lmqg/qg_koquad
    self-reported
    88.440