đ Model Card of lmqg/t5-small-squad-qg-ae
This model is a fine - tuned version of t5 - small for joint question generation and answer extraction. It is trained on the lmqg/qg_squad (dataset_name: default) via lmqg
.
đ Quick Start
Overview
⨠Features
This model supports both question generation and answer extraction tasks, which can be useful in various natural language processing applications such as information retrieval and question - answering systems.
đĻ Installation
The model can be used with the following libraries. You need to install the corresponding libraries first. For example, you can use pip
to install lmqg
and transformers
:
pip install lmqg transformers
đģ Usage Examples
Basic Usage
from lmqg import TransformersQG
model = TransformersQG(language="en", model="lmqg/t5-small-squad-qg-ae")
question_answer_pairs = model.generate_qa("William Turner was an English painter who specialised in watercolour landscapes")
from transformers import pipeline
pipe = pipeline("text2text-generation", "lmqg/t5-small-squad-qg-ae")
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 = 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.")
đ Documentation
Evaluation
Training hyperparameters
The following hyperparameters were used during fine - tuning:
- dataset_path: lmqg/qg_squad
- dataset_name: default
- input_types: ['paragraph_answer', 'paragraph_sentence']
- output_types: ['question', 'answer']
- prefix_types: ['qg', 'ae']
- model: t5 - small
- max_length: 512
- max_length_output: 32
- epoch: 7
- batch: 64
- lr: 0.0001
- fp16: False
- random_seed: 1
- gradient_accumulation_steps: 1
- label_smoothing: 0.15
The full configuration can be found at fine - tuning config file.
đ§ Technical Details
The model is based on the t5 - small
architecture and is fine - tuned on the lmqg/qg_squad
dataset. The fine - tuning process involves optimizing the model for both question generation and answer extraction tasks using specific hyperparameters.
đ License
This model is released under the CC - BY - 4.0 license.
Citation
@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",
}