t5 large subjqa grocery qg

research-backup

Introduction

The T5-LARGE-SUBJQA-GROCERY-QG model is a fine-tuned version of the lmqg/t5-large-squad specifically designed for the task of question generation using the lmqg/qg_subjqa dataset in the grocery domain. It leverages the T5 model architecture to generate questions from given passages or contexts.

Architecture

  • Base Model: lmqg/t5-large-squad
  • Language: English
  • Pipeline Tag: Text2text Generation
  • Tags: Question Generation

Training

The model was fine-tuned with the following hyperparameters:

  • Dataset Path: lmqg/qg_subjqa
  • Dataset Name: Grocery
  • Input Types: ['paragraph_answer']
  • Output Types: ['question']
  • Prefix Types: ['qg']
  • Model: lmqg/t5-large-squad
  • Max Length: 512
  • Max Length Output: 32
  • Epochs: 3
  • Batch Size: 16
  • Learning Rate: 5e-05
  • Floating Point Precision: 16-bit not used (fp16: False)
  • Random Seed: 1
  • Gradient Accumulation Steps: 32
  • Label Smoothing: 0.15

Metrics for evaluating the model include BLEU4, METEOR, ROUGE-L, BERTScore, and MoverScore.

Guide: Running Locally

Basic Steps

  1. Install Dependencies: Ensure you have transformers and lmqg libraries installed.

    pip install transformers
    pip install lmqg
    
  2. Initialize the Model: Use the provided classes to load and interact with the model.

    from lmqg import TransformersQG
    model = TransformersQG(language="en", model="lmqg/t5-large-subjqa-grocery-qg")
    
  3. Generate Questions: Use the model to generate questions based on provided context.

    questions = model.generate_q(list_context="William Turner was an English painter...", list_answer="William Turner")
    
  4. Alternative with Transformers Pipeline:

    from transformers import pipeline
    pipe = pipeline("text2text-generation", "lmqg/t5-large-subjqa-grocery-qg")
    output = pipe("generate question: <hl> Beyonce <hl> further expanded her acting career...")
    

Cloud GPUs

For more efficient processing and training, consider using cloud-based GPU services like AWS, Google Cloud, or Azure to run the model.

License

This model is licensed under the Creative Commons Attribution 4.0 International (cc-by-4.0). This means you are free to share and adapt the model as long as appropriate credit is given, and any changes are indicated.

More Related APIs in Text2text Generation