英文

lmqg/mt5-small-itquad-qg 的模型卡片

此模型是 google/mt5-small 在默认数据集(dataset_name: default)上通过 lmqg 进行问答生成任务的微调版本。

概述

用法

from lmqg import TransformersQG

# initialize model
model = TransformersQG(language="it", model="lmqg/mt5-small-itquad-qg")

# model prediction
questions = model.generate_q(list_context="Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.", list_answer="Dopo il 1971")
  • 使用 transformers 的方式
from transformers import pipeline

pipe = pipeline("text2text-generation", "lmqg/mt5-small-itquad-qg")
output = pipe("<hl> Dopo il 1971 <hl> , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.")

评估

Score Type Dataset
BERTScore 80.8 default 12313321
Bleu_1 22.78 default 12313321
Bleu_2 14.93 default 12313321
Bleu_3 10.34 default 12313321
Bleu_4 7.37 default 12313321
METEOR 17.57 default 12313321
MoverScore 56.79 default 12313321
ROUGE_L 21.93 default 12313321
  • 指标(问题和回答生成,参考答案):每个问题是根据黄金答案生成的。 raw metric file
Score Type Dataset
QAAlignedF1Score (BERTScore) 87.66 default 12313321
QAAlignedF1Score (MoverScore) 61.6 default 12313321
QAAlignedPrecision (BERTScore) 87.76 default 12313321
QAAlignedPrecision (MoverScore) 61.73 default 12313321
QAAlignedRecall (BERTScore) 87.57 default 12313321
QAAlignedRecall (MoverScore) 61.48 default 12313321
Score Type Dataset
QAAlignedF1Score (BERTScore) 81.63 default 12313321
QAAlignedF1Score (MoverScore) 55.85 default 12313321
QAAlignedPrecision (BERTScore) 81.04 default 12313321
QAAlignedPrecision (MoverScore) 55.6 default 12313321
QAAlignedRecall (BERTScore) 82.28 default 12313321
QAAlignedRecall (MoverScore) 56.14 default 12313321

训练超参数

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

  • 数据集路径:lmqg/qg_itquad
  • 数据集名称:default
  • 输入类型:['paragraph_answer']
  • 输出类型:['question']
  • 前缀类型:None
  • 模型:google/mt5-small
  • 最大长度:512
  • 输出最大长度:32
  • 迭代轮数:15
  • 批次大小:16
  • 学习率:0.0005
  • fp16:False
  • 随机种子:1
  • 梯度累积步数:4
  • 标签平滑因子:0.0

完整配置详见 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",
}