英文

lmqg/flan-t5-large-squad-qg 模型卡片

这个模型是通过 lmqg lmqg/qg_squad 上对问题生成任务进行微调得到的 google/flan-t5-large 的版本(数据集名称:default)。

概述

用法

from lmqg import TransformersQG

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

# model prediction
questions = model.generate_q(list_context="William Turner was an English painter who specialised in watercolour landscapes", list_answer="William Turner")
  • 使用 transformers
from transformers import pipeline

pipe = pipeline("text2text-generation", "lmqg/flan-t5-large-squad-qg")
output = pipe("generate question: <hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.")

评估

Score Type Dataset
BERTScore 90.78 default 12313321
Bleu_1 60.18 default 12313321
Bleu_2 44.36 default 12313321
Bleu_3 34.68 default 12313321
Bleu_4 27.72 default 12313321
METEOR 27.96 default 12313321
MoverScore 65.41 default 12313321
ROUGE_L 54.56 default 12313321
Score Type Dataset
QAAlignedF1Score (BERTScore) 92.77 default 12313321
QAAlignedF1Score (MoverScore) 64.61 default 12313321
QAAlignedPrecision (BERTScore) 92.62 default 12313321
QAAlignedPrecision (MoverScore) 64.76 default 12313321
QAAlignedRecall (BERTScore) 92.94 default 12313321
QAAlignedRecall (MoverScore) 64.56 default 12313321

训练超参数

在微调过程中使用了以下超参数:

  • 数据集路径:lmqg/qg_squad
  • 数据集名称:default
  • 输入类型:paragraph_answer
  • 输出类型:question
  • 前缀类型:['qg']
  • 模型:google/flan-t5-large
  • 最大长度:512
  • 输出最大长度:32
  • 迭代轮数:8
  • 批次:2
  • 学习率:5e-05
  • fp16:False
  • 随机种子:1
  • 渐变累积步数:32
  • 标签平滑: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",
}