🚀 research-backup/bart-base-squad-qg-no-answer
模型卡片
本模型是facebook/bart-base的微调版本,用于在lmqg/qg_squad(数据集名称:默认)上进行问题生成任务,微调借助了lmqg
工具。该模型在微调时不使用答案信息,即仅根据段落生成问题(请注意,普通模型是根据段落和段落中的相关答案来生成问题的)。
🚀 快速开始
本模型可用于文本到文本的生成任务,特别是问题生成。以下是使用该模型的快速指南。
✨ 主要特性
- 模型类型:基于
facebook/bart-base
微调的问题生成模型。
- 训练数据:使用
lmqg/qg_squad
数据集进行训练。
- 评估指标:使用了多种评估指标,包括BLEU4、METEOR、ROUGE-L、BERTScore和MoverScore等。
属性 |
详情 |
模型类型 |
基于facebook/bart-base 微调的问题生成模型 |
训练数据 |
lmqg/qg_squad 数据集 |
📦 安装指南
使用该模型前,需要安装相关依赖库,如lmqg
或transformers
。
💻 使用示例
基础用法
使用lmqg
库调用模型:
from lmqg import TransformersQG
model = TransformersQG(language="en", model="research-backup/bart-base-squad-qg-no-answer")
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", "research-backup/bart-base-squad-qg-no-answer")
output = pipe("<hl> Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records. <hl>")
📚 详细文档
评估
训练超参数
以下是微调过程中使用的超参数:
- 数据集路径:lmqg/qg_squad
- 数据集名称:默认
- 输入类型:['paragraph_sentence']
- 输出类型:['question']
- 前缀类型:无
- 模型:facebook/bart-base
- 最大长度:512
- 最大输出长度:32
- 训练轮数:4
- 批次大小:32
- 学习率:0.0001
- 混合精度训练:否
- 随机种子:1
- 梯度累积步数:8
- 标签平滑:0.15
完整的配置可以在微调配置文件中找到。
🔧 技术细节
本模型基于facebook/bart-base
进行微调,通过特定的训练策略和超参数设置,在lmqg/qg_squad
数据集上进行问题生成任务的训练。在训练过程中,不使用答案信息,仅根据段落生成问题,这与传统的问题生成模型有所不同。
📄 许可证
本模型使用CC BY 4.0许可证。
📖 引用
如果您使用了本模型,请引用以下论文:
@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",
}