英文

lmqg/t5-large-squad-qg-ae 的模型卡

该模型是基于 t5-large lmqg/qg_squad (数据集名称:default)上进行的问题生成和答案提取的联合微调版本。该模型使用 lmqg 进行训练。

概述

用法

from lmqg import TransformersQG

# initialize model
model = TransformersQG(language="en", model="lmqg/t5-large-squad-qg-ae")

# model prediction
question_answer_pairs = model.generate_qa("William Turner was an English painter who specialised in watercolour landscapes")
  • 与 transformers 一起使用
from transformers import pipeline

pipe = pipeline("text2text-generation", "lmqg/t5-large-squad-qg-ae")

# answer extraction
answer = pipe("generate question: <hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.")

# question generation
question = pipe("extract answers: <hl> Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records. <hl> Her performance in the film received praise from critics, and she garnered several nominations for her portrayal of James, including a Satellite Award nomination for Best Supporting Actress, and a NAACP Image Award nomination for Outstanding Supporting Actress.")

评估

Score Type Dataset
BERTScore 90.69 default 12313321
Bleu_1 59.93 default 12313321
Bleu_2 43.98 default 12313321
Bleu_3 34.19 default 12313321
Bleu_4 27.2 default 12313321
METEOR 27.81 default 12313321
MoverScore 65.29 default 12313321
ROUGE_L 54.23 default 12313321
Score Type Dataset
QAAlignedF1Score (BERTScore) 92.87 default 12313321
QAAlignedF1Score (MoverScore) 64.67 default 12313321
QAAlignedPrecision (BERTScore) 92.72 default 12313321
QAAlignedPrecision (MoverScore) 64.82 default 12313321
QAAlignedRecall (BERTScore) 93.04 default 12313321
QAAlignedRecall (MoverScore) 64.63 default 12313321
Score Type Dataset
AnswerExactMatch 59.26 default 12313321
AnswerF1Score 70.3 default 12313321
BERTScore 91.63 default 12313321
Bleu_1 60.87 default 12313321
Bleu_2 56.96 default 12313321
Bleu_3 53.12 default 12313321
Bleu_4 49.73 default 12313321
METEOR 44.46 default 12313321
MoverScore 82.48 default 12313321
ROUGE_L 69.82 default 12313321

训练超参数

微调期间使用了以下超参数:

  • dataset_path: lmqg/qg_squad
  • dataset_name: default
  • input_types: ['paragraph_answer', 'paragraph_sentence']
  • output_types: ['question', 'answer']
  • prefix_types: ['qg', 'ae']
  • model: t5-large
  • max_length: 512
  • max_length_output: 32
  • epoch: 3
  • batch: 16
  • lr: 0.0001
  • fp16: False
  • random_seed: 1
  • gradient_accumulation_steps: 4
  • label_smoothing: 0.15

完整的配置可以在 fine-tuning config file 中找到。

引用

@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",
}