英文

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

该模型是 google/flan-t5-base 的fine-tuned版本,用于 lmqg 数据集上的问题生成任务 (数据集名称:default)。

概述

用法

from lmqg import TransformersQG

# initialize model
model = TransformersQG(language="en", model="lmqg/flan-t5-base-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-base-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.53 default 12313321
Bleu_1 58.79 default 12313321
Bleu_2 42.68 default 12313321
Bleu_3 32.99 default 12313321
Bleu_4 26.1 default 12313321
METEOR 26.99 default 12313321
MoverScore 64.67 default 12313321
ROUGE_L 53.2 default 12313321
Score Type Dataset
QAAlignedF1Score (BERTScore) 92.69 default 12313321
QAAlignedF1Score (MoverScore) 64.38 default 12313321
QAAlignedPrecision (BERTScore) 92.51 default 12313321
QAAlignedPrecision (MoverScore) 64.49 default 12313321
QAAlignedRecall (BERTScore) 92.88 default 12313321
QAAlignedRecall (MoverScore) 64.37 default 12313321

训练超参数

以下是fine-tuning期间使用的超参数:

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